Bug 439590 - glibc-2.34 breaks suppressions against obj:*/lib*/libc-2.*so*
Summary: glibc-2.34 breaks suppressions against obj:*/lib*/libc-2.*so*
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: helgrind (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Mark Wielaard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-07 10:21 UTC by Mark Wielaard
Modified: 2021-07-21 17:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Update helgrind and drd suppression libc and libpthread paths (7.19 KB, text/plain)
2021-07-17 21:54 UTC, Mark Wielaard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2021-07-07 10:21:30 UTC
glibc-2.34 (unreleased at this point) comes with the following change:

* Previously, glibc installed its various shared objects under versioned
  file names such as libc-2.33.so.  The ABI sonames (e.g., libc.so.6)
  were provided as symbolic links.  Starting with glibc 2.34, the shared
  objects are installed under their ABI sonames directly, without
  symbolic links.  This increases compatibility with distribution
  package managers that delete removed files late during the package
  upgrade or downgrade process.

This means that the in memory mapped file name changes from libc-2.xx.so to libc.so.6. This causes some stack traces to show a different file name (which has fairly low impact). And it break suppressions against obj:*/lib*/libc-2.*so* which we use a lot in the default.suppression.

In particular (combined with moving all pthread symbols from libpthread.so to libc.so) it breaks the suppressions for helgrind and drd for which we have:

{
   helgrind-glibc2X-004
   Helgrind:Race
   obj:*/lib*/libc-2.*so*
}

{
   drd-libc-stdio
   drd:ConflictingAccess
   obj:*/lib*/libc-*
}
Comment 1 Mark Wielaard 2021-07-17 21:54:15 UTC
Created attachment 140150 [details]
Update helgrind and drd suppression libc and libpthread paths

Proposed patch which resolves most helgrind/drd testsuite regressions.
Comment 2 Mark Wielaard 2021-07-21 17:55:36 UTC
commit a1364805fc74b5690f763033c0c9b43f27613572
Author: Mark Wielaard <mark@klomp.org>
Date:   Fri Jul 16 15:47:08 2021 -0400

    Update helgrind and drd suppression libc and libpthread paths in glibc 2.34
    
    glibc 2.34 moved all pthread functions into the main libc library.
    And it changed the (in memory) path of the main libc library to
    libc.so.6 (before it was libc-2.xx.so).
    
    This breaks various standard suppressions for helgrind and drd.
    Fix this by doing a configure check for whether we are using glibc
    2.34 by checking whether pthread_create is in libc instead of in
    libpthread. If we are using glibc then define GLIBC_LIBC_PATH and
    GLIBC_LIBPTHREAD_PATH variables that point to the (regexp) path
    of the library that contains all libc functions and pthread functions
    (which will be the same path for glibc 2.34+).
    
    Rename glibc-2.34567-NPTL-helgrind.supp to glibc-2.X-helgrind.supp.in
    and glibc-2.X-drd.supp to glibc-2.X-drd.supp.in and replace the
    GLIBC_LIBC_PATH and GLIBC_LIBPTHREAD_PATH at configure time.
    
    The same could be done for the glibc-2.X.supp.in file, but hasn't
    yet because it looks like most suppressions in that file are obsolete.