Free Dyninst lock before unloading the RT library in test_thread_1#272
Free Dyninst lock before unloading the RT library in test_thread_1#272bbiiggppiigg wants to merge 1 commit into
Conversation
func1_1() called dlclose(RTlib) before invoking DYNINSTfree_thelock, which is a function pointer resolved via dlsym into that same library. If the dlopen'd handle was the last reference (i.e., it did not resolve to the copy Dyninst injected), dlclose unmaps the library and the subsequent call jumps into unmapped memory, crashing the mutatee with SIGSEGV. This matches the sporadic signal-11 failures seen for test_thread_1. Free the lock while the library is still mapped, then dlclose. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Derp. I broke that in #228 when I added the destruction of the lock. Not sure how I missed that I added it after unloading the rtlib... Have you tested this anywhere? |
|
@hainest |
That's quite possible. proccontrol is a quagmire. There are so many times that a test will hang that I have a |
func1_1() called dlclose(RTlib) before invoking DYNINSTfree_thelock, which is a function pointer resolved via dlsym into that same library. If the dlopen'd handle was the last reference (i.e., it did not resolve to the copy Dyninst injected), dlclose unmaps the library and the subsequent call jumps into unmapped memory, crashing the mutatee with SIGSEGV. This matches the sporadic signal-11 failures seen for test_thread_1.
Free the lock while the library is still mapped, then dlclose.