Skip to content

Commit

Permalink
Add unignorable info on memory leaks for affected platforms (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin authored Feb 16, 2024
1 parent 87ef7f6 commit 906bb0b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/from_exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@
#if !BOOST_STACKTRACE_ALWAYS_STORE_IN_PADDING
#include <mutex>
#include <unordered_map>

#ifndef BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK

#ifdef BOOST_HAS_THREADS

#error On this platform memory leaks are possible if capturing stacktrace from \
exceptions is enabled and exceptions are thrown concurrently \
and libc++ runtime is used. \
\
Define `BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK` to \
suppress this error if the library would not be used with libc++ \
runtime (for example, would be used with GCC's runtime).
#endif
#endif
#endif
namespace {
Expand Down

0 comments on commit 906bb0b

Please sign in to comment.