mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
Kernel: Stop walking the stack when we encounter return address 0
This commit is contained in:
parent
d164da7d19
commit
64639de4d2
Notes:
sideshowbarker
2024-07-18 19:04:41 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/64639de4d25 Pull-request: https://github.com/SerenityOS/serenity/pull/6639 Reviewed-by: https://github.com/awesomekling
@ -45,6 +45,8 @@ static Vector<FlatPtr, PerformanceEvent::max_stack_frame_count> raw_backtrace(Fl
|
||||
FlatPtr retaddr;
|
||||
if (!safe_memcpy(&retaddr, (void*)(stack_ptr + sizeof(FlatPtr)), sizeof(FlatPtr), fault_at))
|
||||
break;
|
||||
if (retaddr == 0)
|
||||
break;
|
||||
backtrace.append(retaddr);
|
||||
if (backtrace.size() == PerformanceEvent::max_stack_frame_count)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user