DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.6k stars 554 forks source link

better Mac thread support: earlier ptrhead interception, and intercept workqueue threads and raw Mach threads #1403

Open derekbruening opened 9 years ago

derekbruening commented 9 years ago

From bruen...@google.com on March 27, 2014 16:47:57

For initial thread support to get simple pthreads apps working I'm just planning to intercept bsdthread_create(). This intercepts threads a little late, and misses workqueue threads. But we need earlier injection in order to intercept bsdthread_register() and intercept the entries for both regular and workqueue threads.

We also want to eventually handle raw Mach threads created via other means.

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1403

derekbruening commented 9 years ago

From bruen...@google.com on March 29, 2014 11:55:30

When we terminate a thread on MacOS we fail to free the app's stack: we need to pass the stack base and size to bsdthread_terminate.

Summary: better Mac thread support: earlier ptrhead interception, and intercept workqueue threads and raw Mach threads (was: better Mac thread support: intercept workqueue threads and raw Mach threads)