From 9ae71ac4ee5ff7a081fca573f85f32fc2a7d3d32 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 27 Feb 2020 13:28:45 +0100 Subject: [PATCH] Dl_info doesn't destroy data. --- client/TracyCallstack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/TracyCallstack.cpp b/client/TracyCallstack.cpp index 43efbc4a..cc2e8709 100644 --- a/client/TracyCallstack.cpp +++ b/client/TracyCallstack.cpp @@ -379,7 +379,7 @@ static int SymbolAddressDataCb( void* data, uintptr_t pc, const char* fn, int li if( !fn ) { const char* symloc = nullptr; - static Dl_info dlinfo; + Dl_info dlinfo; if( dladdr( (void*)ptr, &dlinfo ) ) symloc = dlinfo.dli_fname; if( !symloc ) symloc = "[unknown]"; sym.file = symloc; @@ -581,7 +581,7 @@ const char* DecodeCallstackPtrFast( uint64_t ptr ) SymbolData DecodeSymbolAddress( uint64_t ptr ) { const char* symloc = nullptr; - static Dl_info dlinfo; + Dl_info dlinfo; if( dladdr( (void*)ptr, &dlinfo ) ) symloc = dlinfo.dli_fname; if( !symloc ) symloc = "[unknown]"; return SymbolData { symloc, 0, false };