SIGILL occurs before the main() fucntion has even been called!

If you get a SIGILL when starting debugging it can be because one of the libraries is doing a runtime check to see what instructions are supported and they can do it by installing a trap and attempting to execute a possibly illegal instruction. When debugging the debugger picks the illegal instruction up rather than the temporary one that the library installed.

First ensure you've updated+upgraded Linux to make sure everything is up to date, this may well fix it.

If not you can try telling the debugger to ignore it and continue without any problems by giving gdb the following instruction before running the program it will let the program deal with it:

handle SIGILL pass nostop noprint



We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.


Your email address will not be published. Required fields are marked *