Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
January 21, 2021 Exit code -4 | ||||
---|---|---|---|---|
| ||||
Hi all, From time to time my program crashes with exit code -4. I can't seem to find much on the code. Does anyone know what this means and how to debug the issue? |
January 21, 2021 Re: Exit code -4 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tim | On Thursday, 21 January 2021 at 00:37:19 UTC, Tim wrote:
> Hi all,
>
> From time to time my program crashes with exit code -4. I can't seem to find much on the code. Does anyone know what this means and how to debug the issue?
Unix signal #4 is illegal instruction (negative returns usually mean it was killed by that number signal). Most common way to hit that is a broken function pointer or corrupted class leading into data that isn't supposed to be executed as code. Also possible an assert(0) got hit in release mode or something like that.
Easiest way to debug it is to open it in a debugger and look at the stack trace to see where it came from.
|
January 21, 2021 Re: Exit code -4 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On Thursday, 21 January 2021 at 00:47:36 UTC, Adam D. Ruppe wrote:
> On Thursday, 21 January 2021 at 00:37:19 UTC, Tim wrote:
>> Hi all,
>>
>> From time to time my program crashes with exit code -4. I can't seem to find much on the code. Does anyone know what this means and how to debug the issue?
>
> Unix signal #4 is illegal instruction (negative returns usually mean it was killed by that number signal). Most common way to hit that is a broken function pointer or corrupted class leading into data that isn't supposed to be executed as code. Also possible an assert(0) got hit in release mode or something like that.
>
> Easiest way to debug it is to open it in a debugger and look at the stack trace to see where it came from.
Oh, so it's just signal 4, not -4?
|
January 21, 2021 Re: Exit code -4 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tim | On Thursday, 21 January 2021 at 00:49:26 UTC, Tim wrote: > > Oh, so it's just signal 4, not -4? The signal is 4. The exit status is -4. https://en.wikipedia.org/wiki/Signal_(IPC)#POSIX_signals https://en.wikipedia.org/wiki/Exit_status#POSIX |
January 21, 2021 Re: Exit code -4 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul Backus | On Thursday, 21 January 2021 at 01:07:22 UTC, Paul Backus wrote:
> On Thursday, 21 January 2021 at 00:49:26 UTC, Tim wrote:
>>
>> Oh, so it's just signal 4, not -4?
>
> The signal is 4. The exit status is -4.
>
> https://en.wikipedia.org/wiki/Signal_(IPC)#POSIX_signals
> https://en.wikipedia.org/wiki/Exit_status#POSIX
Those lines were super useful! Not sure why I couldn't find that info on my own ...
|
Copyright © 1999-2021 by the D Language Foundation