-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb][AArch64] Do not crash if NT_ARM_TLS is missing (#106478)
[D156118](https://reviews.llvm.org/D156118) states that this note is always present, but it is better to check it explicitly, as otherwise `lldb` may crash when trying to read registers.
- Loading branch information
1 parent
d2b8969
commit ce7c828
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
lldb/test/Shell/Process/elf-core/aarch64-no-NT_ARM_TLS.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Check that lldb does not crash if a core file does not contain an NT_ARM_TLS | ||
## note while there are notes for other dynamic register sets. | ||
|
||
# RUN: yaml2obj %s -o %t | ||
# RUN: %lldb -c %t -o "re r -a" | FileCheck %s | ||
|
||
# CHECK: Pointer Authentication Registers: | ||
# CHECK-NEXT: data_mask = | ||
# CHECK-NEXT: code_mask = | ||
# CHECK-NOT: Thread Local Storage Registers: | ||
|
||
--- !ELF | ||
FileHeader: | ||
Class: ELFCLASS64 | ||
Data: ELFDATA2LSB | ||
Type: ET_CORE | ||
Machine: EM_AARCH64 | ||
ProgramHeaders: | ||
- Type: PT_NOTE | ||
FirstSec: .note | ||
LastSec: .note | ||
Sections: | ||
- Name: .note | ||
Type: SHT_NOTE | ||
Notes: | ||
- Name: CORE | ||
Desc: 0b00000000000000000000000b00000000000000000000000000000000000000389300001b930000389300001b930000000000000000000000000000000000000000000000000000e02e0000000000000000000000000000119100000000000000000000000000005ee100000000000000000000000000002f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400162e2ffff00005801400000000000200162e2ffff0000240140000000000000000000000000000100000000000000 | ||
Type: NT_PRSTATUS | ||
- Name: LINUX | ||
Desc: 0000000000007f000000000000007f00 | ||
Type: NT_ARM_PAC_MASK | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config.suffixes = ['.yaml'] |