This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI unwinder vDSO exception bugfix


Hi Mark,

just updating the reviewed off-trunk branch jankratochvil/unwindx86 with this
fix.  If vDSO happened to be first in the module list it failed to unwind.


Jan

--- a/libdwfl/dwfl_frame.c
+++ b/libdwfl/dwfl_frame.c
@@ -157,6 +157,12 @@ dwfl_attach_state (Dwfl *dwfl, int machine, pid_t pid,
       ebl = NULL;
       for (Dwfl_Module *mod = dwfl->modulelist; mod != NULL; mod = mod->next)
 	{
+	  /* Reading of the vDSO module may fail as /proc/PID/mem is unreadable
+	     without PTRACE_ATTACH and we may not be PTRACE_ATTACH-ed now.
+	     MOD would not be re-read later to unwind it when we are already
+	     PTRACE_ATTACH-ed to PID.  */
+	  if (strncmp (mod->name, "[vdso: ", 7) == 0)
+	    continue;
 	  Dwfl_Error error = __libdwfl_module_getebl (mod);
 	  if (error != DWFL_E_NOERROR)
 	    continue;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]