https://bugs.kde.org/show_bug.cgi?id=476548
Bug ID: 476548 Summary: valgrind 3.22.0 fails on assertion when loading debuginfo file produced by mold Classification: Developer tools Product: valgrind Version: 3.22 GIT Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: jpalus+...@fastmail.com Target Milestone: --- SUMMARY After valgrind upgrade to 3.22.0 it started failing with: valgrind: m_debuginfo/readelf.c:3394 (vgModuleLocal_read_elf_debug): Assertion 'di->rodata_size == a_shdr.sh_size' failed. when loading debuginfo file produced with mold 2.3.1. Binaries linked with bfd/lld work fine. valgrind 3.21.0 works fine. Also raised in mold under https://github.com/rui314/mold/issues/1139 as it's not clear who is to blame. STEPS TO REPRODUCE 1. Build sample c++ binary with debug symbols and link with mold: g++ -x c++ -g2 -fuse-ld=mold -o test - <<EOF #include <iostream> int main() { std::cout << "hello world" << std::endl; } EOF 2. Create debuginfo file: eu-strip -f test.di test 3. Run valgrind against binary: valgrind -v ./test OBSERVED RESULT valgrind fails: ... --413198-- Considering /home/users/builder/test.di .. --413198-- .. CRC is valid valgrind: m_debuginfo/readelf.c:3394 (vgModuleLocal_read_elf_debug): Assertion 'di->rodata_size == a_shdr.sh_size' failed. ... EXPECTED RESULT valgrind works fine -- You are receiving this mail because: You are watching all bug changes.