beehive-lab/mambo

The post-thread callback should be executed for all threads still active when the exit_group syscall is called

lgeek opened this issue · 0 comments

lgeek commented

This would simplify writing instrumentation which maintains thread-private data collected at the end of execution. Execution of these threads must be stopped before delivering the callback to avoid race conditions. Execution cannot be stopped when arbitrary MAMBO code is executing, otherwise it might cause a deadlock if it holds any locks. Even better, execution should be stopped at safe points, when neither inline instrumentation, nor compiled plugin functions might be executing, to ensure that plugin data is in a consistent state. Reusing the signal delivery points is probably the easiest.