https://bugs.kde.org/show_bug.cgi?id=475780

            Bug ID: 475780
           Summary: helgrind and drd: undefined symbol for shared library
                    which calls pthread_mutex_init with attribute
    Classification: Developer tools
           Product: valgrind
           Version: 3.21.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: helgrind
          Assignee: jsew...@acm.org
          Reporter: piotr.troja...@gmail.com
  Target Milestone: ---

Created attachment 162400
  --> https://bugs.kde.org/attachment.cgi?id=162400&action=edit
Script and code to reproduce the problem

SUMMARY

When the application loads a shared library that calls pthread_mutex_init with
its second parameter "attr" being other than NULL, then helgrind and drd die
with message:

undefined symbol: pthread_mutexattr_gettype

STEPS TO REPRODUCE
1. extract the attached archive and execute ./run.sh
2. this will build the shared library and a program that loads it
3. then it will run the valgrind tools that die

OBSERVED RESULT

./load: symbol lookup error: vgpreload_drd-amd64-linux.so: undefined symbol: 
./load: symbol lookup error: vgpreload_helgrind-amd64-linux.so: undefined
symbol: pthread_mutexattr_gettyp

EXPECTED RESULT

The script should only print debug output about activating the shared library
code.

SOFTWARE/OS VERSIONS
Linux: Debian GNU/Linux 11 (bullseye), x86_64
Valgrind Version: 3.21.0 (compiled from source)

ADDITIONAL INFORMATION

I guess the problem is that the interceptors in helgrind/hg_intercepts.c and
drd/drd_pthread_intercepts.c call pthread_mutexattr_gettype, which fails to be
dynamically loaded by the vgpreload_helgrind-amd64-linux.so and
vgpreload_drd-amd64-linux.so libraries.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to