Opened 11 years ago

Closed 11 years ago

#3140 closed bug (invalid)

SIGSEGV handler not called upon stack overflow

Reported by: bhaible Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

After installing a SIGSEGV handler and an alternate stack (and verifying that both the sigaction and sigaltstack system calls succeeded!), a stack overflow still does not invoke the SIGSEGV handler.

Expected behaviour of the attach program: A message on stderr, either "program error" or "stack overflow".

Actual behaviour: A dialog allowing to debug the program. If I enter Debug, then "continue", the error message on stderr is "Segmentation violation" - the handler was still not caught.

This works on BeOS.

Attachments (2)

stack-overflow-bug.c (1.8 KB) - added by bhaible 11 years ago.
test program provoking a stack overflow
haiku-long-double-bug.png (8.3 KB) - added by bhaible 11 years ago.
screenshot of dialog appearing

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by bhaible

Attachment: stack-overflow-bug.c added

test program provoking a stack overflow

Changed 11 years ago by bhaible

Attachment: haiku-long-double-bug.png added

screenshot of dialog appearing

comment:1 Changed 11 years ago by bhaible

Oops, my mistake. When I add SA_ONSTACK to the sigaction flags, the signal handler is called.

You can close or trash this ticket.

comment:2 Changed 11 years ago by anevilyak

Resolution: invalid
Status: newclosed

Thanks for the note!

Note: See TracTickets for help on using tickets.