From 42ecf2464c39d8949d0296eb3532418b6da92fb1 Mon Sep 17 00:00:00 2001 From: norayr Date: Thu, 12 Mar 2015 21:39:13 +0400 Subject: [PATCH] on line 605 of OPT.Mod typ := impCtxt.ref[-tag] read let's say, 19, i. e. int64 typ, but because in procedure Close set to NIL everything upper than FirstRef, which is 16, that's why obj.typ was not set in InStruct, which caused crash later. for now fixed by starting to NIL array from Comp + 1, not from FirstRef. changing FirstRef causes crashes, which I did not investigate yet. -- noch --- src/voc/OPT.Mod | 2 +- voc | Bin 1288647 -> 1288647 bytes vocstatic.linux.gcc.x86_64 | Bin 1288647 -> 1288647 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/voc/OPT.Mod b/src/voc/OPT.Mod index 2239dce0..2270a143 100644 --- a/src/voc/OPT.Mod +++ b/src/voc/OPT.Mod @@ -200,7 +200,7 @@ VAR i: INTEGER; BEGIN (* garbage collection *) CloseScope; i := 0; WHILE i < maxImps DO GlbMod[i] := NIL; INC(i) END ; -i := FirstRef; WHILE i < maxStruct DO impCtxt.ref[i] := NIL; impCtxt.old[i] := NIL; INC(i) END +i := (*FirstRef*)Comp + 1; WHILE i < maxStruct DO impCtxt.ref[i] := NIL; impCtxt.old[i] := NIL; INC(i) END END Close; PROCEDURE FindImport*(mod: Object; VAR res: Object); diff --git a/voc b/voc index d2c8d82b7f397b66ebf6a08a17c3a4f294942403..8b5292ff2d9cf79496998d1d70418ee752189589 100755 GIT binary patch delta 91 zcmWN=-3fpo6o65#{g;^)P1L(H1qzLF7YH1|0bHo>z$rD98lF$0%Jn7{8a8a%vFE^% T6K5{8To USd5r3!(qXS4gU|=-=xQBK3N7QssI20 diff --git a/vocstatic.linux.gcc.x86_64 b/vocstatic.linux.gcc.x86_64 index d2c8d82b7f397b66ebf6a08a17c3a4f294942403..8b5292ff2d9cf79496998d1d70418ee752189589 100755 GIT binary patch delta 91 zcmWN=-3fpo6o65#{g;^)P1L(H1qzLF7YH1|0bHo>z$rD98lF$0%Jn7{8a8a%vFE^% T6K5{8To USd5r3!(qXS4gU|=-=xQBK3N7QssI20