[all-commits] [llvm/llvm-project] 328029: [lldb] Don't scan more than 10MB of assembly insns...
Jason Molenda via All-commits
all-commits at lists.llvm.org
Tue Aug 27 14:51:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 328029242136950204ce8bf953eb592bff946d30
https://github.com/llvm/llvm-project/commit/328029242136950204ce8bf953eb592bff946d30
Author: Jason Molenda <jmolenda at apple.com>
Date: 2024-08-27 (Tue, 27 Aug 2024)
Changed paths:
M lldb/source/Symbol/FuncUnwinders.cpp
Log Message:
-----------
[lldb] Don't scan more than 10MB of assembly insns (#105890)
For supported architectures, lldb will do a static scan of the assembly
instructions of a function to detect stack/frame pointer changes,
register stores and loads, so we can retrieve register values for the
caller stack frames. We trust that the function address range reflects
the actual function range, but in a stripped binary or other unusual
environment, we can end up scanning all of the text as a single
"function" which is (1) incorrect and useless, but more importantly (2)
slow.
Cap the max size we will profile to 10MB of instructions. There will
surely be functions longer than this with no unwind info, and we will
miss the final epilogue or mid-function epilogues past the first 10MB,
but I think this will be unusual, and the failure more to missing the
epilogue is that the user will need to step out an extra time or two as
the StackID is not correctly calculated mid-epilogue. I think this is a
good tradeoff of behaviors.
rdar://134391577
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list