diff options
author | Maurice van der Pot <griffon26@gentoo.org> | 2004-12-19 18:36:31 +0000 |
---|---|---|
committer | Maurice van der Pot <griffon26@gentoo.org> | 2004-12-19 18:36:31 +0000 |
commit | 21faf21a425c6cad1de8f8d9fd3e80ea83743053 (patch) | |
tree | 07a925677c41a9d4b8dceb23bf7318a663a37d0d /dev-util/valgrind/files | |
parent | Closes #73700 (Manifest recommit) (diff) | |
download | gentoo-2-21faf21a425c6cad1de8f8d9fd3e80ea83743053.tar.gz gentoo-2-21faf21a425c6cad1de8f8d9fd3e80ea83743053.tar.bz2 gentoo-2-21faf21a425c6cad1de8f8d9fd3e80ea83743053.zip |
Fixed segfault in valgrind because of executable stack
Diffstat (limited to 'dev-util/valgrind/files')
-rw-r--r-- | dev-util/valgrind/files/digest-valgrind-2.2.0-r1 | 2 | ||||
-rw-r--r-- | dev-util/valgrind/files/valgrind-2.2.0-no-exec-stack.patch | 62 |
2 files changed, 64 insertions, 0 deletions
diff --git a/dev-util/valgrind/files/digest-valgrind-2.2.0-r1 b/dev-util/valgrind/files/digest-valgrind-2.2.0-r1 new file mode 100644 index 000000000000..b7acbc96ccc1 --- /dev/null +++ b/dev-util/valgrind/files/digest-valgrind-2.2.0-r1 @@ -0,0 +1,2 @@ +MD5 30dc51f6fc94751b90b04af9c2e2c656 valgrind-2.2.0.tar.bz2 964987 +MD5 a9f5bf8d548ceed56343f8298887bb43 valgrind-2.2.0-ppc.tar.bz2 1000093 diff --git a/dev-util/valgrind/files/valgrind-2.2.0-no-exec-stack.patch b/dev-util/valgrind/files/valgrind-2.2.0-no-exec-stack.patch new file mode 100644 index 000000000000..e5e87dcfd53e --- /dev/null +++ b/dev-util/valgrind/files/valgrind-2.2.0-no-exec-stack.patch @@ -0,0 +1,62 @@ +diff -ruN valgrind-2.2.0/coregrind/vg_libpthread.c valgrind-2.2.0-fixed/coregrind/vg_libpthread.c +--- valgrind-2.2.0/coregrind/vg_libpthread.c 2004-12-19 17:30:53.383502976 +0100 ++++ valgrind-2.2.0-fixed/coregrind/vg_libpthread.c 2004-12-19 17:31:23.680897072 +0100 +@@ -1830,12 +1830,6 @@ + /* Initialiser has completed. */ + #define P_ONCE_COMPLETED ((PTHREAD_ONCE_INIT) + 2) + +-int __pthread_once ( pthread_once_t *once_control, +- void (*init_routine) (void) ) +-{ +- int res; +- int done; +- + # define TAKE_LOCK \ + res = __pthread_mutex_lock(&once_masterlock); \ + my_assert(res == 0); +@@ -1844,11 +1838,19 @@ + res = __pthread_mutex_unlock(&once_masterlock); \ + my_assert(res == 0); + +- void cleanup(void *v) { +- TAKE_LOCK; +- *once_control = P_ONCE_NOT_DONE; +- RELEASE_LOCK; +- } ++static void cleanup(void *once_control) { ++ int res; ++ TAKE_LOCK; ++ *(pthread_once_t *)once_control = P_ONCE_NOT_DONE; ++ RELEASE_LOCK; ++} ++ ++int __pthread_once ( pthread_once_t *once_control, ++ void (*init_routine) (void) ) ++{ ++ int res; ++ int done; ++ + + ensure_valgrind("pthread_once"); + +@@ -1863,7 +1865,7 @@ + /* Not started. Change state to indicate running, drop the + lock and run. */ + *once_control = P_ONCE_RUNNING; +- _pthread_cleanup_push(NULL, cleanup, NULL); ++ _pthread_cleanup_push(NULL, cleanup, once_control); + RELEASE_LOCK; + init_routine(); + /* re-take the lock, and set state to indicate done. */ +@@ -1904,9 +1906,10 @@ + + return 0; + ++} ++ + # undef TAKE_LOCK + # undef RELEASE_LOCK +-} + + #undef P_ONCE_NOT_DONE + #undef P_ONCE_RUNNING |