<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61496>61496</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Custom stack traces in sanitizers
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
denizevrenci
</td>
</tr>
</table>
<pre>
One very useful feature of ASAN and the other sanitizers is the stack trace we get when the problematic code is executed. However, the stack traces are a lot less useful when we have coroutines that may resume in different threads, in that case, the trace before the resumption is belonging to the thread or thread pool creation. Folly [introduced](https://developers.facebook.com/blog/post/2021/09/16/async-stack-traces-folly-Introduction/) the mechanism to get stack traces from async contexts. As far as I am aware, sanitizers do not have the ability to override the stack trace mechanism:
* https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/asan/asan_stack.h
* https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
I would like to flag this as an enhancement for the sanitizer infrastructure.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0lMGSozYQhp9GXLpMgTDe4cDBu1NU5pIc8gBbjdSAMkJNScJe79OnJI9ndpJTDrkgqqXu_9fXDRiCmR1RL9qvon0ucI8L-16TMz_p4skpU4ysb_0fjuBC_gZ7oGm3MBHG3RPwBOc_z78DOg1xIeC4kIeAzkTzk3wAE3I8RFSvED0qgivBTBGuC7m8t3keLa0YjQLFmlIO_SC1R9Il_MZXupAX8ts_CwVAT4BgOYKlEB7ecuErwYIXAsWe92gcJR8YYcUbeAr7SmAcaDNN5MlFiIsn1CHJGHc_qjDQQ_bufKSJPeVArrFFwy7ZHcmym42bIfL9fC4H7B9vG7MF5QlTSgkDW3sD0X41LnrWuyIt2mchn5YYtyCas5CDkIOmC1neyIdyQkUj82upeBVyGC3PQg4bhyjkICtZCzlUnZBDfRJywHBz6pBhHe6wDlOSPLy86SUbWaPLfldSCzoT1nSB1J1PnCfPK-SSoNhF-hFDCecAE3rAAC-AK-AVfcb1S_M1g-N4b0RSwdFYE29Jgy_kvdH0r-l4d5IgVM-iOgt5hs9YZhOXfXwjYe3lsRw2z3-Rinc-o5DDiiZdU_G6GUv-4NOeNWNGhO5t-Z4NlMv_qvfO5bvidc30P0LZQAbw7iI_X-DKu9VgzSslbJPFGeJiQuKODsgt6BStaYSnPG300QAwbvIYot9V-ljLQveN7poOC-rr05eubuvTsS6WvkJqiUgTdUiq1o2cjq3qdNM2sqtaVZheVrKpmvqpbqvqWJdPNH3ppFKjnLpTU3XiWNGKxpYJS8l-LkwIO_Wn-tidCosj2fD4yfg-sxv3OYhjZU2I4SMtmmip_7aHyOvnITTul9Eqdm_7_9yk7CkIOWRbfwcAAP__d9K39A">