From: Julian Seward Date: Sat, 4 May 2002 19:49:21 +0000 (+0000) Subject: Fix from Lionel Ulmer to not have an infinite loop/stack overflow X-Git-Tag: svn/VALGRIND_1_0_3~241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15f93fef49d793e88b42ecc1eb36656a780dcd7a;p=thirdparty%2Fvalgrind.git Fix from Lionel Ulmer to not have an infinite loop/stack overflow with sigaction on glibc 2.1.3. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@214 --- diff --git a/coregrind/arch/x86-linux/vg_libpthread.c b/coregrind/arch/x86-linux/vg_libpthread.c index 55846f06a8..f125ea7991 100644 --- a/coregrind/arch/x86-linux/vg_libpthread.c +++ b/coregrind/arch/x86-linux/vg_libpthread.c @@ -869,11 +869,19 @@ void* (*__libc_internal_tsd_get) #include #include +#ifdef GLIBC_2_1 +extern +int __sigaction + (int signum, + const struct sigaction *act, + struct sigaction *oldact); +#else extern int __libc_sigaction (int signum, const struct sigaction *act, struct sigaction *oldact); +#endif int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) @@ -1415,9 +1423,10 @@ strong_alias(__pthread_key_create, pthread_key_create) strong_alias(__pthread_getspecific, pthread_getspecific) strong_alias(__pthread_setspecific, pthread_setspecific) -//strong_alias(__sigaction, sigaction) +#ifndef GLIBC_2_1 strong_alias(sigaction, __sigaction) - +#endif + strong_alias(close, __close) strong_alias(fcntl, __fcntl) strong_alias(lseek, __lseek) diff --git a/coregrind/vg_libpthread.c b/coregrind/vg_libpthread.c index 55846f06a8..f125ea7991 100644 --- a/coregrind/vg_libpthread.c +++ b/coregrind/vg_libpthread.c @@ -869,11 +869,19 @@ void* (*__libc_internal_tsd_get) #include #include +#ifdef GLIBC_2_1 +extern +int __sigaction + (int signum, + const struct sigaction *act, + struct sigaction *oldact); +#else extern int __libc_sigaction (int signum, const struct sigaction *act, struct sigaction *oldact); +#endif int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) @@ -1415,9 +1423,10 @@ strong_alias(__pthread_key_create, pthread_key_create) strong_alias(__pthread_getspecific, pthread_getspecific) strong_alias(__pthread_setspecific, pthread_setspecific) -//strong_alias(__sigaction, sigaction) +#ifndef GLIBC_2_1 strong_alias(sigaction, __sigaction) - +#endif + strong_alias(close, __close) strong_alias(fcntl, __fcntl) strong_alias(lseek, __lseek) diff --git a/vg_libpthread.c b/vg_libpthread.c index 55846f06a8..f125ea7991 100644 --- a/vg_libpthread.c +++ b/vg_libpthread.c @@ -869,11 +869,19 @@ void* (*__libc_internal_tsd_get) #include #include +#ifdef GLIBC_2_1 +extern +int __sigaction + (int signum, + const struct sigaction *act, + struct sigaction *oldact); +#else extern int __libc_sigaction (int signum, const struct sigaction *act, struct sigaction *oldact); +#endif int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) @@ -1415,9 +1423,10 @@ strong_alias(__pthread_key_create, pthread_key_create) strong_alias(__pthread_getspecific, pthread_getspecific) strong_alias(__pthread_setspecific, pthread_setspecific) -//strong_alias(__sigaction, sigaction) +#ifndef GLIBC_2_1 strong_alias(sigaction, __sigaction) - +#endif + strong_alias(close, __close) strong_alias(fcntl, __fcntl) strong_alias(lseek, __lseek)