After working fine for a while, my code started to raise a SIGILL exception when used. I didn't understand the documentation. What does the SIGILL exception means in practical therms?
This is the code that is raising the exception, could you help me pointing out why?
function TfrmPascal.valorElemento(lin, col: integer): integer;
begin
if lin < 0 then valorElemento:= 0
else if col < 0 then valorElemento:= 0
else if (col=0) or (col = lin) then valorElemento:=1
else valorElemento:= valorElemento(lin-1, col-1) + valorElemento(lin-1, col);
end;
SIGILL is a signal issued when a illegal instruction is encountered. If the code in your question is resulting in SIGILL that would suggest one of the following:
The final option is the most likely. This might happen if you have written off the end of an array, corrupted the stack, etc.
The code in the question appears, in itself, to be quite harmless. Almost certainly the defect in your code lies elsewhere.