Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not read __builtin_return_address when async stacks is disabled #640

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/unifex/tracing/async_stack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ struct instruction_ptr final {
// Generally a function that uses this macro should be declared FOLLY_NOINLINE
// to prevent this returning surprising results in cases where the function
// is inlined.
#if UNIFEX_HAS_BUILTIN(__builtin_return_address)
#if UNIFEX_HAS_BUILTIN(__builtin_return_address) && !UNIFEX_NO_ASYNC_STACKS
static constexpr instruction_ptr
read_return_address(void* p = __builtin_return_address(0)) noexcept {
#else
Expand Down Expand Up @@ -311,7 +311,7 @@ struct frame_ptr {
// Generally a function that uses this macro should be declared FOLLY_NOINLINE
// to prevent this returning surprising results in cases where the function
// is inlined.
#if UNIFEX_HAS_BUILTIN(__builtin_frame_address)
#if UNIFEX_HAS_BUILTIN(__builtin_frame_address) && !UNIFEX_NO_ASYNC_STACKS
static constexpr frame_ptr
read_frame_pointer(void* p = __builtin_frame_address(0)) noexcept {
#else
Expand Down
Loading