Ticket #3265 (closed bug: fixed)

Opened 15 months ago

Last modified 15 months ago

Custom signal handlers always receive SIGSEGV signals

Reported by: oco Owned by: bonefish
Priority: high Milestone: R1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Platform: All
Blocking:

Description

While tracking down remaining bugs in the freepascal test suite, i discover that custom signal handlers only received SIGSEGV signal instead of the one associated with the handler.

For example, in case of a zero divide, the signal handler associated with SIGFPE (8) only receive SIGSEGV (11).

This behavior is also true for C programs (see attached file test_custom_signal_handling.c).

I think this problem was introduced in r27757.

If i am not wrong, send_signal should send the real signal to the custom handler instead of SIGSEGV (see attached patch).

Attachments

test_custom_signal_handling.c Download (0.6 KB) - added by oco 15 months ago.
arch_int.c_r28821.diff Download (486 bytes) - added by oco 15 months ago.

Change History

Changed 15 months ago by oco

Changed 15 months ago by oco

Changed 15 months ago by axeld

  • owner changed from axeld to bonefish
  • priority changed from normal to high

Changed 15 months ago by bonefish

The patch looks fine. If anyone has the time to apply and test it, feel free to commit.

Changed 15 months ago by axeld

  • status changed from new to closed
  • resolution set to fixed

Patch applied in r28852, thanks Olivier!

Note: See TracTickets for help on using tickets.