]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
m_debuginfo/debuginfo.c VG_(get_fnname_kind) _start is below main
authorMark Wielaard <mark@klomp.org>
Wed, 21 Jul 2021 15:55:40 +0000 (17:55 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 21 Jul 2021 15:56:06 +0000 (17:56 +0200)
With glibc 2.34 we might see the _start symbol as the frame that
called main instead of directly after __libc_start_main or
generic_start_main.

Fixes memcheck/tests/badjump[2], memcheck/tests/origin4-many,
helgrind/tests/tc04_free_lock, helgrind/tests/tc09_bad_unlock
and helgrind/tests/tc20_verifywrap.

coregrind/m_debuginfo/debuginfo.c

index bc2578b37786fd52d9ea3fd42a36cbe239785a7c..e2218f266823b2ca70c2aee13d4da979b9b7783a 100644 (file)
@@ -2289,6 +2289,7 @@ Vg_FnNameKind VG_(get_fnname_kind) ( const HChar* name )
        VG_STREQN(18, "__libc_start_main.", name) || // gcc optimization
        VG_STREQ("generic_start_main", name) ||  // Yellow Dog doggedness
        VG_STREQN(19, "generic_start_main.", name) || // gcc optimization
+       VG_STREQ("_start", name) ||
 #      elif defined(VGO_darwin)
        // See readmacho.c for an explanation of this.
        VG_STREQ("start_according_to_valgrind", name) ||  // Darwin, darling