[Issue 11983] RDMD masks out segmentation faults

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 31 06:45:31 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11983


Lars T. Kyllingstad <bugzilla at kyllingen.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at kyllingen.net
          Component|DMD                         |tools


--- Comment #5 from Lars T. Kyllingstad <bugzilla at kyllingen.net> 2014-01-31 06:45:27 PST ---
When the child process is terminated by a signal, wait() returns a negative
number whose absolute value is the sigmal number.  In this case, the signal is
SIGSEGV, or 11, so wait() returns -11.  Rdmd apparently uses this directly as
its exit code, and since POSIX exit codes are restricted to the range 0-255, it
wraps around to 245.

In other words, rdmd should probably check the value of wait(), and print
something like "Terminated by signal X" if it is negative.

The 139 is set by the shell.  Explanation here:
https://stackoverflow.com/questions/1101957/are-there-any-standard-exit-status-codes-in-linux

Since this is an RDMD bug (if that), I'm changing "Component" from "DMD2" to
"tools".

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list