From a1f5a5a48fa50e556af1767243f70a0cb7ea493b Mon Sep 17 00:00:00 2001 From: Lukas Berk Date: Thu, 24 Apr 2014 16:22:18 -0400 Subject: [PATCH] Change how we assign _stp_module_self name/path to use THIS_MODULE *runtime/sym.c - change _stp_module_self name/path member variables to be assigned using THIS_MODULE->name instead of strcpy --- runtime/sym.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/runtime/sym.c b/runtime/sym.c index bed05d1b3..dd5099902 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -609,12 +609,10 @@ static void _stp_kmodule_update_address(const char* module, unsigned mi, si; #if defined(STP_USE_DWARF_UNWINDER) && defined(STP_NEED_UNWIND_DATA) if(!strcmp(module, THIS_MODULE->name)){ - static char modname[STP_MODULE_NAME_LEN]; - strlcpy(modname, module, strlen(module)+1); if(reloc && !strcmp(".altinstr_replacement", reloc)){ _stp_num_modules++; - _stp_module_self.name = modname; - _stp_module_self.path = modname; //we've already been inserted at this point, so the path variable will still be unique + _stp_module_self.name = THIS_MODULE->name; + _stp_module_self.path = THIS_MODULE->name; //we've already been inserted at this point, so the path variable will still be unique } if(reloc && !strcmp(".note.gnu.build-id",reloc)){ _stp_module_self.notes_sect = address; -- 2.43.5