Commit 56933329 authored by Mor-sarid, Nitzan's avatar Mor-sarid, Nitzan Committed by Elliott Hughes
Browse files

Fix the way to get main thread stack start address.



For previous way to get the stack using the [stack] string from
/proc/self/task/<pid>/maps is not enough. On x86/x86_64, if an
alternative signal stack is used while a task switch happens,
the [stack] indicator may no longer be correct.

Instead, stack_start from /proc/self/stat which is always inside
the main stack, is used to find the main stack in /proc/self/maps.

Change-Id: Ieb010e71518b57560d541cd3b3563e5aa9660750
Signed-off-by: default avatarNitzan Mor-sarid <nitzan.mor-sarid@intel.com>
Signed-off-by: default avatarMingwei Shi <mingwei.shi@intel.com>
parent 14545d4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment