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


Former-commit-id: 42ecf2464c
This commit is contained in:
norayr 2015-03-12 21:39:13 +04:00
parent 5c9ef62469
commit d0cfd06289
3 changed files with 3 additions and 3 deletions

View file

@ -200,7 +200,7 @@ VAR i: INTEGER;
BEGIN (* garbage collection *) BEGIN (* garbage collection *)
CloseScope; CloseScope;
i := 0; WHILE i < maxImps DO GlbMod[i] := NIL; INC(i) END ; 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; END Close;
PROCEDURE FindImport*(mod: Object; VAR res: Object); PROCEDURE FindImport*(mod: Object; VAR res: Object);

View file

@ -1 +1 @@
d2c8d82b7f397b66ebf6a08a17c3a4f294942403 8b5292ff2d9cf79496998d1d70418ee752189589

View file

@ -1 +1 @@
d2c8d82b7f397b66ebf6a08a17c3a4f294942403 8b5292ff2d9cf79496998d1d70418ee752189589