]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
drd: Re-enable the pthread_cancel() intercept now that the CALL_FN_*() ABI
authorBart Van Assche <bvanassche@acm.org>
Tue, 28 Aug 2012 17:57:09 +0000 (17:57 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 28 Aug 2012 17:57:09 +0000 (17:57 +0000)
violation has been fixed (r12811).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12907

drd/drd_pthread_intercepts.c

index bf3f1349830377cc4cd18ac02eb1fb822fb0cee0..f883f7c3da8887359ebcc6d61fc11d166664da2e 100644 (file)
@@ -533,28 +533,6 @@ int pthread_detach_intercept(pthread_t pt_thread)
 PTH_FUNCS(int, pthreadZudetach, pthread_detach_intercept,
           (pthread_t thread), (thread));
 
-// Don't intercept pthread_cancel() because pthread_cancel_init() loads
-// libgcc.so. That library is loaded by calling _dl_open(). The function
-// dl_open_worker() looks up from which object the caller is calling in
-// GL(dn_ns)[]. Since the DRD intercepts are linked into vgpreload_drd-*.so
-// and since that object file is not loaded through glibc, glibc does not
-// have any information about that object. That results in the following
-// segmentation fault on at least Fedora 17 x86_64:
-//   Process terminating with default action of signal 11 (SIGSEGV)
-//    General Protection Fault
-//      at 0x4006B75: _dl_map_object_from_fd (dl-load.c:1580)
-//      by 0x4008312: _dl_map_object (dl-load.c:2355)
-//      by 0x4012FFB: dl_open_worker (dl-open.c:226)
-//      by 0x400ECB5: _dl_catch_error (dl-error.c:178)
-//      by 0x4012B2B: _dl_open (dl-open.c:652)
-//      by 0x5184511: do_dlopen (dl-libc.c:89)
-//      by 0x400ECB5: _dl_catch_error (dl-error.c:178)
-//      by 0x51845D1: __libc_dlopen_mode (dl-libc.c:48)
-//      by 0x4E4A703: pthread_cancel_init (unwind-forcedunwind.c:53)
-//      by 0x4E476F2: pthread_cancel (pthread_cancel.c:40)
-//      by 0x4C2C050: pthread_cancel (drd_pthread_intercepts.c:547)
-//      by 0x400B3A: main (bar_bad.c:83)
-#if 0
 // NOTE: be careful to intercept only pthread_cancel() and not
 // pthread_cancel_init() on Linux.
 
@@ -574,7 +552,6 @@ int pthread_cancel_intercept(pthread_t pt_thread)
 
 PTH_FUNCS(int, pthreadZucancel, pthread_cancel_intercept,
           (pthread_t thread), (thread))
-#endif
 
 static __always_inline
 int pthread_once_intercept(pthread_once_t *once_control,