diff options
-rw-r--r-- | handle_event.c | 2 | ||||
-rw-r--r-- | library.c | 9 | ||||
-rw-r--r-- | sysdeps/linux-gnu/trace.c | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/handle_event.c b/handle_event.c index 8aa35aa..5b6cc40 100644 --- a/handle_event.c +++ b/handle_event.c @@ -700,6 +700,7 @@ callstack_push_syscall(Process *proc, int sysnum) { } elem = &proc->callstack[proc->callstack_depth]; + *elem = (struct callstack_element){}; elem->is_syscall = 1; elem->c_un.syscall = sysnum; elem->return_addr = NULL; @@ -724,6 +725,7 @@ callstack_push_symfunc(Process *proc, struct library_symbol *sym) { } elem = &proc->callstack[proc->callstack_depth++]; + *elem = (struct callstack_element){}; elem->is_syscall = 0; elem->c_un.libfunc = sym; @@ -207,11 +207,18 @@ static void private_library_init(struct library *lib, enum library_type type) { lib->next = NULL; - lib->key = NULL; + + lib->key = 0; + lib->base = 0; + lib->entry = 0; + lib->dyn_addr = 0; + lib->soname = NULL; lib->own_soname = 0; + lib->pathname = NULL; lib->own_pathname = 0; + lib->symbols = NULL; lib->type = type; } diff --git a/sysdeps/linux-gnu/trace.c b/sysdeps/linux-gnu/trace.c index 3fc4df0..cef8e3d 100644 --- a/sysdeps/linux-gnu/trace.c +++ b/sysdeps/linux-gnu/trace.c @@ -363,15 +363,15 @@ process_stopping_done(struct process_stopping_handler * self, Process * leader) { debug(DEBUG_PROCESS, "process stopping done %d", self->task_enabling_breakpoint->pid); - size_t i; + if (!self->exiting) { + size_t i; for (i = 0; i < self->pids.count; ++i) if (self->pids.tasks[i].pid != 0 && (self->pids.tasks[i].delivered || self->pids.tasks[i].sysret)) continue_process(self->pids.tasks[i].pid); continue_process(self->task_enabling_breakpoint->pid); - destroy_event_handler(leader); } if (self->exiting) { @@ -387,6 +387,7 @@ process_stopping_done(struct process_stopping_handler * self, Process * leader) case CBS_CONT: goto ugly_workaround; } + destroy_event_handler(leader); } } |