https://bugs.kde.org/show_bug.cgi?id=478837
Bug ID: 478837 Summary: valgrind fails to read debug info for rust binaries Classification: Developer tools Product: valgrind Version: 3.22.0 Platform: Arch Linux OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: den...@kobert.dev Target Milestone: --- SUMMARY Trying to load the debug info for a rust program fails: --1647944-- WARNING: Serious error when reading debug info --1647944-- When reading debug info from /home/dennis/build/valgrind/test-rust: --1647944-- Can't make sense of .rodata section mapping Bisect output: 5472a7a54000692f9f58e9b551d36b8c68c44873 is the first bad commit commit 5472a7a54000692f9f58e9b551d36b8c68c44873 Author: Jogn Reiser <jrei...@bitwagon.com> Date: Sat Oct 7 16:02:24 2023 +0200 Bug 390871 - ELF debug info reader confused with multiple .rodata* sections NEWS | 1 + coregrind/m_debuginfo/readelf.c | 53 +++++++++++++++++++++++------------------ STEPS TO REPRODUCE 1. Create an empty rust project using `cargo new foo` 2. Build binary with `cargo build` 3. Execute valgrind using `valgrind target/debug/foo` OBSERVED RESULT ==1647944== Memcheck, a memory error detector ==1647944== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==1647944== Using Valgrind-3.22.0.GIT and LibVEX; rerun with -h for copyright info ==1647944== Command: ./test-rust ==1647944== --1647944-- WARNING: Serious error when reading debug info --1647944-- When reading debug info from /home/dennis/build/valgrind/test-rust: --1647944-- Can't make sense of .rodata section mapping Hello, world! ==1647944== ==1647944== HEAP SUMMARY: ==1647944== in use at exit: 0 bytes in 0 blocks ==1647944== total heap usage: 14 allocs, 14 frees, 3,273 bytes allocated ==1647944== ==1647944== All heap blocks were freed -- no leaks are possible ==1647944== ==1647944== For lists of detected and suppressed errors, rerun with: -s ==1647944== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) EXPECTED RESULT The debug symbols should be properly parsed SOFTWARE/OS VERSIONS Linux xarchie 6.6.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 29 Nov 2023 00:37:40 +0000 x86_64 GNU/Linux ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.