valgrind problem no glibc debug info
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux Mint |
New
|
Undecided
|
Unassigned |
Bug Description
Im using LM15 cinnamon 64 bit. I installed valgrind and compiled my code with debug symbols enabled.
Running valgrind results in a failure,
matthew@Blessed /data/Projects/
==27625== Memcheck, a memory error detector
==27625== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==27625== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==27625== Command: bfl
==27625==
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld-linux-
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux-
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
Based on the discussion here:
http://
I ran,
matthew@Blessed ~ $ apt policy libc6-dbg
libc6-dbg:
Installed: 2.17-0ubuntu5
Candidate: 2.17-0ubuntu5
Version table:
*** 2.17-0ubuntu5 0
500 http://
100 /var/lib/
So it appears that the debug symbols are installed, but valgrind is not picking it up. It's a big problem for me since I need valgrind for development on this box.
There is a workaround for this bug, but it requires recompiling valgrind from source. I was able to duplicate the patch in comment 8 of the valgrind bug report, /bugs.kde. org/show_ bug.cgi? id=286864
https:/
It appears the problem is that strlen has been removed via optimization and is now only an inlined function. Thus the symbol is actually unavailable in the library. One would think that's an odd effect given it's place in the ANSI C standard library.
Not sure legitimately who should be fixing this, but I sure hope someone steps up. Right now it means you only get a working valgrind for a 64 bit machine if you apply thos bug fix or alter glibc to include strlen().