{
Addr fault;
Addr esp;
- NSegment const* seg;
+ NSegment const *seg, *seg_next;
if (info->si_signo != VKI_SIGSEGV)
return False;
fault = (Addr)info->VKI_SIGINFO_si_addr;
esp = VG_(get_SP)(tid);
seg = VG_(am_find_nsegment)(fault);
+ seg_next = seg ? VG_(am_next_nsegment)( seg, True/*fwds*/ )
+ : NULL;
if (VG_(clo_trace_signals)) {
if (seg == NULL)
if (info->si_code == VKI_SEGV_MAPERR
&& seg
+ && seg->kind == SkResvn
+ && seg->smode == SmUpper
+ && seg_next
+ && seg_next->kind == SkAnonC
&& fault >= fault_mask(esp - VG_STACK_REDZONE_SZB)) {
/* If the fault address is above esp but below the current known
stack segment base, and it was a fault because there was
filter_stderr
EXTRA_DIST = \
+ hang.stderr.exp hang.vgtest \
seg_override.stderr.exp seg_override.stdout.exp seg_override.vgtest \
sigcontext.stdout.exp sigcontext.stderr.exp sigcontext.vgtest
check_PROGRAMS = \
+ hang \
seg_override \
sigcontext
--- /dev/null
+int main ( void )
+{
+ *(volatile char *)0xDEADBEEF = 'x';
+ return 0;
+}
--- /dev/null
+
+Process terminating with default action of signal 11 (SIGSEGV)
+ Access not within mapped region at address 0x........
+ at 0x........: main (hang.c:3)
+ If you believe this happened as a result of a stack
+ overflow in your program's main thread (unlikely but
+ possible), you can try to increase the size of the
+ main thread stack using the --main-stacksize= flag.
+ The main thread stack size used in this run was ....
--- /dev/null
+# r14974 introduced a bug which cause code to hang due to
+# an infinite signal-delivery loop.
+# Can only be reproduced on an x86 box running a 32-bit kernel.
+prog: hang
+vgopts: -q