|
From: Ashley P. <as...@qu...> - 2006-01-20 10:20:55
|
Hi, Is it possible to use SIGRTMAX inside valgrind? in the past we have always used SIGUSR2 but this causes conflicts with python of all things so we tried changing only now our code doesn't work under valgrind. This problem only manifests itself on x86_64 where SIGRTMAX is a function which returns the value 64. Ashley, |
|
From: Julian S. <js...@ac...> - 2006-01-21 03:23:40
|
> Is it possible to use SIGRTMAX inside valgrind? Er, I don't know. In theory yes, but theory and practice are equal only in theory. > in the past we have > always used SIGUSR2 but this causes conflicts with python of all things > so we tried changing only now our code doesn't work under valgrind. > > This problem only manifests itself on x86_64 where SIGRTMAX is a > function which returns the value 64. Can you send the simplest possible test program using SIGRTMAX that doesn't work under V, and I'll have a look? I was hoping to look at a couple of other signal-related bugs next week, so I'll add it to the list. J |
|
From: Ashley P. <as...@qu...> - 2006-01-23 16:44:46
|
On Sat, 2006-01-21 at 03:23 +0000, Julian Seward wrote:
> Can you send the simplest possible test program using SIGRTMAX
> that doesn't work under V, and I'll have a look? I was hoping to
> look at a couple of other signal-related bugs next week, so I'll
> add it to the list.
int main () {
int sig = SIGRTMAX;
int res;
struct sigaction act;
memset(&act,0,sizeof(act));
act.sa_handler = cb;
act.sa_flags = SA_RESTART;
res = sigaction(sig,&act,NULL);
printf("Sig %d res %d\n",sig,res);
exit(0);
}
Natively on x86_64 it prints "Sig 64 res 0", withing valgrind you get
quorumi:ashley> /opt/ashley/valgrind/bin/valgrind ./a.out
==25156== Memcheck, a memory error detector.
==25156== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et
al.
==25156== Using LibVEX rev 1426, a library for dynamic binary
translation.
==25156== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==25156== Using valgrind-3.2.0.SVN, a dynamic binary instrumentation
framework.
==25156== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et
al.
==25156== For more details, rerun with: -v
==25156==
==25156== Warning: ignored attempt to set SIGRT32 handler in
sigaction();
==25156== the SIGRT32 signal is used internally by Valgrind
Sig 64 res -1
==25156==
==25156== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 7 from 4)
==25156== malloc/free: in use at exit: 0 bytes in 0 blocks.
==25156== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==25156== For counts of detected errors, rerun with: -v
==25156== No malloc'd blocks -- no leaks are possible.
On i686 SIGRTMAX is 63 and there isn't a problem.
I guess the Warning message means I need to work around it myself, I
didn't stop that message on friday.
Ashley
|