Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 1 | From 200b6a5a0ea3e1e154663b0fc575bfe2becf177d Mon Sep 17 00:00:00 2001 |
| 2 | From: Mark Wielaard <mark@klomp.org> |
| 3 | Date: Wed, 21 Jul 2021 17:55:40 +0200 |
| 4 | Subject: [PATCH] m_debuginfo/debuginfo.c VG_(get_fnname_kind) _start is below |
| 5 | main |
| 6 | |
| 7 | With glibc 2.34 we might see the _start symbol as the frame that |
| 8 | called main instead of directly after __libc_start_main or |
| 9 | generic_start_main. |
| 10 | |
| 11 | Fixes memcheck/tests/badjump[2], memcheck/tests/origin4-many, |
| 12 | helgrind/tests/tc04_free_lock, helgrind/tests/tc09_bad_unlock |
| 13 | and helgrind/tests/tc20_verifywrap. |
| 14 | |
| 15 | Upstream-Status: Backport |
| 16 | --- |
| 17 | coregrind/m_debuginfo/debuginfo.c | 1 + |
| 18 | 1 file changed, 1 insertion(+) |
| 19 | |
| 20 | diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c |
| 21 | index bc2578b377..e2218f2668 100644 |
| 22 | --- a/coregrind/m_debuginfo/debuginfo.c |
| 23 | +++ b/coregrind/m_debuginfo/debuginfo.c |
| 24 | @@ -2289,6 +2289,7 @@ Vg_FnNameKind VG_(get_fnname_kind) ( const HChar* name ) |
| 25 | VG_STREQN(18, "__libc_start_main.", name) || // gcc optimization |
| 26 | VG_STREQ("generic_start_main", name) || // Yellow Dog doggedness |
| 27 | VG_STREQN(19, "generic_start_main.", name) || // gcc optimization |
| 28 | + VG_STREQ("_start", name) || |
| 29 | # elif defined(VGO_darwin) |
| 30 | // See readmacho.c for an explanation of this. |
| 31 | VG_STREQ("start_according_to_valgrind", name) || // Darwin, darling |
| 32 | -- |
| 33 | 2.27.0 |
| 34 | |