aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2025-06-25 10:31:38 +0100
committerGitHub <noreply@github.com>2025-06-25 10:31:38 +0100
commit3a3d1bf4a39bbbe1cfdc56ab9eeeb13cb438348a (patch)
tree3021a7974a2f83ca451dc4879c9c289068cbb5cb /lldb/packages/Python/lldbsuite
parent97b8cec789fe3b8558a6d2b7fac269c5606ab4a3 (diff)
downloadllvm-3a3d1bf4a39bbbe1cfdc56ab9eeeb13cb438348a.zip
llvm-3a3d1bf4a39bbbe1cfdc56ab9eeeb13cb438348a.tar.gz
llvm-3a3d1bf4a39bbbe1cfdc56ab9eeeb13cb438348a.tar.bz2
[lldb][AArch64] Handle core file tag segments missing tag data (#145338)
In the same way that memory regions may be known from a core file but not readable, tag segments can also have no content. For example: ``` $ readelf --segments core <...> Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align <...> LOAD 0x0000000000002000 0x0000ffff93899000 0x0000000000000000 0x0000000000000000 0x0000000000001000 RW 0x1000 <...> LOPROC+0x2 0x0000000000008000 0x0000ffff93899000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0 ``` This happens if you have a restricted coredump filter or size limit. The area of virtual memory this segment covers is 0x1000, or 4096 bytes aka one tagged page. It's FileSiz would normally be 0x80. Tags are packed 2 per byte and granules are 16 bytes. 4096 / 16 / 2 = 128 or 0x80. But here it has no data, and in theory a corrupt file might have some data but not all. This triggered an assert in UnpackTagsFromCoreFileSegment and crashed lldb. To fix this I have made UnpackTagsFromCoreFileSegment return an expected and returned an error in this case instead of asserting. This will be seen by the user, as shown in the added API test.
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
0 files changed, 0 insertions, 0 deletions