MODULE Hello;
VAR
code : POINTER TO ARRAY OF RECORD
label : POINTER TO RECORD END;
END;
BEGIN
NEW(code, 666);
END Hello.
$ gdb --args voc Hello.mod
Program received signal SIGSEGV, Segmentation fault.
0x000000000042244a in OPC_Ident (obj=0x0) at OPC.c:184
184 mode = obj->mode;
(gdb) bt
#0 0x000000000042244a in OPC_Ident (obj=0x0) at OPC.c:184
#1 0x000000000042adc1 in OPV_NewArr (d=0x7ffff7ff1dd0, x=0x7ffff7ff1d50) at OPV.c:1186
#2 0x000000000042b6c2 in OPV_stat (n=0x7ffff7ff1d90, outerProc=0x0) at OPV.c:1342
#3 0x000000000042b13b in OPV_stat (n=0x7ffff7ff1c90, outerProc=0x0) at OPV.c:1258
#4 0x000000000042c115 in OPV_Module (prog=0x7ffff7ff1c90) at OPV.c:1557
#5 0x0000000000400b33 in Compiler_Module (done=0x7fffffffde9f "\001") at Compiler.c:46
#6 0x00000000004011e1 in Compiler_Translate () at Compiler.c:152
#7 0x000000000040144e in main (argc=2, argv=0x7fffffffe808) at Compiler.c:211
But if remove field "label" or make field static or remove call NEW then everythin work.
But if remove field "label" or make field static or remove call NEW then everythin work.