From: Aaron Merey Date: Wed, 30 Aug 2023 18:49:09 +0000 (-0400) Subject: Fix lazy debuginfo loading on ppc64le X-Git-Tag: VALGRIND_3_22_0~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a01d8e01fceb9e8e1c5fba67d9322fb2c45e9c83;p=thirdparty%2Fvalgrind.git Fix lazy debuginfo loading on ppc64le Lazy debuginfo loading introduced in commit 60f7e89ba32 assumed that either describe_IP or find_DiCfSI will be called before stacktrace printing. describe_IP and find_DiCfSI cause debuginfo to be lazily loaded before symtab lookup occurs during stacktraces. However this assumption does not hold true on ppc64le, resulting in debuginfo failing to load in time for stacktraces. Fix this by loading debuginfo during get_StackTrace_wrk on ppc arches. --- diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index 308bebdd86..0ec6f5993a 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -772,6 +772,8 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, # endif Addr fp_min = sp - VG_STACK_REDZONE_SZB; + VG_(addr_load_di)(ip); + /* Snaffle IPs from the client's stack into ips[0 .. max_n_ips-1], stopping when the trail goes cold, which we guess to be when FP is not a reasonable stack location. */ @@ -913,6 +915,7 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, play safe, a la x86/amd64 above. See extensive comments above. */ RECURSIVE_MERGE(cmrf,ips,i); + VG_(addr_load_di)(ip); continue; }