[Bug libelf/31225] Crash when using elf_memory() on a compressed section; fixed with s/ELF_C_READ/ELF_C_READ_MMAP/

2024-02-01 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31225 Mark Wielaard changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[PATCH] libelf: Treat elf_memory as if using ELF_C_READ_MMAP

2024-02-01 Thread Mark Wielaard
An Elf handle created through elf_memory was treated as if opened with ELF_C_READ. Which means libelf believed it had read the memory itself and could simply write to it if it wanted (because it wasn't mmaped directly on top of a file). This causes issues when that memory was actually read-only. Wo

Optimizing elfutils usage for unwinding

2024-02-01 Thread Milian Wolff
Hey all, I'm working on perfparser/hotspot which ingests perf.data files and does unwinding and symbolication etc. We got a bug report by a user [1] with a worst-case performance situation in usage of elfutils, which I do not know how to handle - thus me reaching out to you all here. The prob