The attached patch allows the stack at signal delivery
to be in a mapped file, and also gives some diagnosis
when sigprocmask fails. Patch is against valgrind-3.2.3.
--
John Reiser, [EMAIL PROTECTED]
diff -Nur valgrind-3.2.3/coregrind/m_libcsignal.c valgrind-3.2.3.new/coregrind/m_libcsignal.c
--- valgrind-3.2.3/coregrind/m_libcsignal.c 2007-01-07 23:43:15.000000000 -0800
+++ valgrind-3.2.3.new/coregrind/m_libcsignal.c 2007-11-29 12:35:21.000000000 -0800
@@ -149,6 +149,9 @@
SysRes res = VG_(do_syscall4)(__NR_rt_sigprocmask,
how, (UWord)set, (UWord)oldset,
_VKI_NSIG_WORDS * sizeof(UWord));
+ if (res.isError) {
+ VG_(printf)("VG_(sigprocmask) isError; val=0x%x\n", res.val);
+ }
return res.isError ? -1 : 0;
}
diff -Nur valgrind-3.2.3/coregrind/m_signals.c valgrind-3.2.3.new/coregrind/m_signals.c
--- valgrind-3.2.3/coregrind/m_signals.c 2007-01-07 23:43:15.000000000 -0800
+++ valgrind-3.2.3.new/coregrind/m_signals.c 2007-12-01 08:30:45.000000000 -0800
@@ -866,6 +866,9 @@
VG_(sigfillset)(&block_procmask);
ret = VG_(sigprocmask)
(VKI_SIG_SETMASK, &block_procmask, saved_mask);
+ if (0!=ret) {
+ VG_(message)(Vg_DebugMsg, "block_all_host_signals ret=%d\n", ret);
+ }
vg_assert(ret == 0);
}
@@ -1521,7 +1524,7 @@
NSegment* seg_next = seg ? VG_(am_next_nsegment)( seg, True/*fwds*/ )
: NULL;
- if (seg && seg->kind == SkAnonC)
+ if (seg && (seg->kind == SkAnonC || seg->kind == SkFileC))
/* addr is already mapped. Nothing to do. */
return True;
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers