Files
llvm/libunwind
Alexander Richardson eb21049b4b [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (#68815)
I was running the tests with baremetal picolibc which has a linker
script that __eh_frame_start==__eh_frame_end (not equal to zero) in
case there is no .eh_frame_hdr.
I noticed that libunwind was trying to read nonsense data because it
was printing messages such as
`libunwind: unsupported .eh_frame_hdr version: 20 at
8000d30814`

This change adds a ehHdr size check to avoid reading this out-of-bounds
data and potentially crashing.
2023-10-11 19:46:09 +01:00
..
2023-09-06 00:56:09 -04:00