<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61961>61961</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Is libunwind safe to use from a signal handler?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ionyshch
</td>
</tr>
</table>
<pre>
I'm looking for a way to create stack trace which is safe to use from a signal handler on Linux, x86-64 architecture.
I doubt libc backtrace() is good for this, so looking for alternatives.
While googling for backtrace() signal safety I saw couple of articles / notes stating [link one](https://blog.openj9.org/2022/03/16/collecting-native-stack-traces-on-macos-with-libunwind/) [link two](https://github.com/WAVM/WAVM/issues/80#issuecomment-381118318) LLVM libunwind is safe for use from a signal handler.
[Docs](https://bcain-llvm.readthedocs.io/projects/libunwind/en/latest/) I found say nothing about signal safety.
So is libunwind signal safe?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU0uPozgQ_jXmUgIZ8wgcOHRvhBSp57TSzNmYAjwxrsg2k8m_X5lOP7Lq3bnECip_z7L0Xs8WsWPVM6uOidzCQq7TZG9-UUsy0HjrTkwcVjBEZ21nmMiBhKu8QSBQDmVA8EGqMwQnFcJ10WoB7cHLCePM5hEmRytIiGTSwCLtaNABWXjRdvvNxF_wu6nTugTp1KIDqrA5zBg_Mv50gpG2IYDRg4JBqvPOw0TDRBt5ZqJxVxUW7SOUp0exJqCzMuhf6O-Qr78_Fm0wXp_N2-y_4e-Co5VwgxN4eQVF28Ug0ATSBa0MemCiB0sBfUwiRDBWPRttz0AWWXVkollCuHhWPDHRM9EPhuaMLmh_thm5mYlecCGY6HnBRJ_XTPSKjEEVwdJX8emecrrL8ynZdJWKfHrVYUmNHjZ71Xbc4dt3-nClr-hnHZZtyBStTPQ_nr5_-zi09xt6JvqGM1Hs_xStK9qQFk2e502R78m8vHz_Bu-0733HEP-z8Lf0q-cjKf9lLkpqmxrza80cyjEsOJLymSYm-oujn6hC1PbZLtr4QQb04W7-BBNtdgQvb7GVJfYhB9rCY50Pu_A3RQsffj5NsqJPxq4Y26KVCXZ53fCDaMShTJaOt7WoRsHbWk3iMPFxRD4WdV7WddVioxLdCS4KXvJK8OpQldko8rKqq6lqK5WXdcNKjqvUJttNk5uTPfOuzts6T4wc0Pi31-m6OJQO2-xZyY32wX9cCzoY7E4PJv70AqO1zZnuf7Yj4t-P9N7A5y3ZZf4TAAD___IsZgM">