How to produce a ill legal fault?
hello,
i encounter a problem with my program recently, i get the core dump of my program, and it produced by a segill signal, i wondered that how my program can happen to generate this error, and i never write a "0 divide" code, i have no ideas, help me please!:rolleyes: |
It requires the following:
Code:
ulimit -c unlimited http://www.geocities.ws/murugesan/te...reExample.html |
Quote:
Typically this is caused by a stack corruption (eg writing off the end of an array that is a local variable) which corrupts the return address. There are other ways it can happen too (eg a function pointer that is not initialized). |
Thanks very much!
|
In the RAM, there is nothing that says whether a byte is an instruction or data. The CPU simply executes them one after another, jumping to a different location if that's what that certain byte happened to mean.
What happened is that you CPU tried to execute a byte that wasn't assigned any instruction hard-wired into the CPU. |
All times are GMT -5. The time now is 03:48 PM. |