Opened 14 years ago
Closed 13 years ago
#6704 closed bug (fixed)
SIGBUS and SIGSEGV must be different
Reported by: | scottmc | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | Cc: | andreasf | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Currently SIGSEGV and SIGBUS are set the same, as was done in BeOS.
Separate SIGBUS signal should be added eventually. Might require a bit of caution to do that in a binary compatible way.
Change History (8)
comment:1 by , 14 years ago
Cc: | added |
---|
comment:2 by , 14 years ago
follow-up: 4 comment:3 by , 14 years ago
Can't we raise SIGBUS too when SIGSEGV signal is raised, making SIGBUS an alias of SIGSEGV but allowing two signal handlers as required by POSIX?
comment:4 by , 14 years ago
Replying to phoudoin:
Can't we raise SIGBUS too when SIGSEGV signal is raised, making SIGBUS an alias of SIGSEGV but allowing two signal handlers as required by POSIX?
The problem is that SIGSEGV == SIGBUS (i.e. the constants are equal). Redefining SIGBUS and actually raising the signal could be a binary compatibility issue, since old applications might expect that the signal is never thrown -- though I suspect there aren't that many programs that actually handle these signals anyway (at least all ported code could be updated accordingly). Redefining it and not raising it might work, but the signals do have a different meaning (cf. the specs), so it would make most sense to implement them correctly.
comment:5 by , 14 years ago
I forgot to add: Introducing a new signal means incrementing NSIG, which also is a binary compatibility issue that needs to be investigated.
comment:6 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:7 by , 14 years ago
Status: | assigned → in-progress |
---|
SIGSEGV - Invalid memory reference
SIGBUS - Bus error
SIGBUS should be value 7 (or 10) depending on hardware platform.
http://www.koders.com/c/fidF560E3FC4BCD5200C7F55D4DFE77D0A3B6984BFD.aspx