DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.59k stars 552 forks source link

i#6611: Fix pthread lock hang #6626

Closed derekbruening closed 5 months ago

derekbruening commented 5 months ago

Fixes a hang on glibc 2.37 by initializing the tid pthread TLS field. Its offset is located by decoding an exported function known to reference it in a new routine privload_set_pthread_tls_fields().

Only x86 is supported with this fix as no aarch64 machine with the required glibc is available for developing and testing the decode fix.

Tested on a glibc 2.37 machine where without this fix the client.drcallstack test hangs in release build.

Also tested on a Dr. Memory 2.6.19737 build pointing at a release build DR with this fix and confirmed it fixes the hang there.

Fixes #6611