Waldek Hebisch wrote:
The traces seem to be quite consistent, and suggest crash when printing error message.
Yes, the same backtrace.
Silly question: can you see _any_ message about failing range checks?
At compile time (error: constant out of range), but not at runtime, e.g.
[G5:gcc/p/test] adriaan% cat pack2-debug3.pas Program Pack2;
Var a: array [ 1..1 ] of Boolean; i: integer; begin writeln('for i:= 1 to 2 do'); for i:= 1 to 2 do begin writeln('i = ', i); writeln('a [ i ]:= true;'); a [ i ]:= true end end. [G5:gcc/p/test] adriaan% gpc pack2-debug3.pas [G5:gcc/p/test] adriaan% ./a.out for i:= 1 to 2 do i = 1 a [ i ]:= true; i = 2 a [ i ]:= true; Segmentation fault
Or the same with a packed array of boolean ...
[G5:gcc/p/test] adriaan% cat pack2-debug4.pas Program Pack2;
Var a: packed array [ 1..1 ] of Boolean; i: integer; begin writeln('for i:= 1 to 1 do'); for i:= 1 to 1 do begin writeln('i = ', i); writeln('a [ i ]:= true;'); a [ i ]:= true end end. [G5:gcc/p/test] adriaan% gpc pack2-debug4.pas [G5:gcc/p/test] adriaan% ./a.out for i:= 1 to 1 do i = 1 a [ i ]:= true; Segmentation fault <-- same backtrace for a range check (??) error