We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c6740b commit 1ad62e5Copy full SHA for 1ad62e5
1 file changed
include/boost/stacktrace/detail/collect_unwind.ipp
@@ -71,7 +71,10 @@ std::size_t this_thread_frames::collect(native_frame_ptr_t* out_frames, std::siz
71
skip += 1;
72
73
#if defined(BOOST_STACKTRACE_USE_LIBC_BACKTRACE_FUNCTION)
74
+ // According to https://opensource.apple.com/source/Libc/Libc-1272.200.26/gen/backtrace.c.auto.html
75
+ // it looks like the `::backtrace` is async signal safe.
76
frames_count = static_cast<size_t>(::backtrace(const_cast<void **>(out_frames), static_cast<int>(max_frames_count)));
77
+
78
// NOTE: There is no way to pass "skip" count to backtrace function so we need to perform left shift operation.
79
// If number of elements in result backtrace is >= max_frames_count then "skip" elements are wasted.
80
if (frames_count && skip) {
0 commit comments