valgrind problem no glibc debug info

Bug #1222550 reported by Matt
6
This bug affects 1 person
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/BFL/dist/Debug/GNU-Linux-x86 $ valgrind bfl
==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-x86-64.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux-x86-64.so.2
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://forums.linuxmint.com/viewtopic.php?f=190&t=128204&p=762297

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://archive.ubuntu.com/ubuntu/ raring/main amd64 Packages
        100 /var/lib/dpkg/status

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.

Revision history for this message
Matt (mattcbro) wrote :

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,
https://bugs.kde.org/show_bug.cgi?id=286864

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().

Revision history for this message
Martin Pagh Goodwin (martin-goodwin-e) wrote :

This is also reported against Ubuntu (see https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/1247026)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.