Exit code -4

Adam D. Ruppe destructionator at gmail.com
Thu Jan 21 00:47:36 UTC 2021


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.


More information about the Digitalmars-d-learn mailing list