Commit 00f8c399 by Abseil Team Committed by Copybara-Service

Only check if the frame pointer is inside a signal stack with known bounds

This function previously returned true whenever the signal stack had unknown
bounds, that is obviously incorrect.

PiperOrigin-RevId: 620084964
Change-Id: I3821730b45773300569b9cbdb7e72442ed109d04
parent 160d3906
...@@ -89,6 +89,8 @@ struct StackInfo { ...@@ -89,6 +89,8 @@ struct StackInfo {
static bool InsideSignalStack(void** ptr, const StackInfo* stack_info) { static bool InsideSignalStack(void** ptr, const StackInfo* stack_info) {
uintptr_t comparable_ptr = reinterpret_cast<uintptr_t>(ptr); uintptr_t comparable_ptr = reinterpret_cast<uintptr_t>(ptr);
if (stack_info->sig_stack_high == kUnknownStackEnd)
return false;
return (comparable_ptr >= stack_info->sig_stack_low && return (comparable_ptr >= stack_info->sig_stack_low &&
comparable_ptr < stack_info->sig_stack_high); comparable_ptr < stack_info->sig_stack_high);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment