2
0
Эх сурвалжийг харах

Identified the GC related bug: pass-by-value parameters (open MathArrays) were copied right before the procedure descriptor was published, thus there was a very short moment where the pointer was not visible to the GC. This explains why the problem occurred so seldomly. Metadata based GC should work again.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7165 8c9fc860-2736-0410-a75d-ab315db34111
felixf 8 жил өмнө
parent
commit
d72a490e82

+ 4 - 1
source/FoxIntermediateBackend.Mod

@@ -10859,7 +10859,6 @@ TYPE
 					END;
 				END;
 
-				ParameterCopies(procedureType);
 				InitVariables(scope);
 				
 				
@@ -10872,6 +10871,10 @@ TYPE
 					IntermediateCode.InitMemory(left,addressType,fp,0);
 					Emit(Mov(position, left, right));
 				END;
+				
+				(* must be done after the descriptor is there, otherwise copied parameters are forgotten to be traced *)
+				ParameterCopies(procedureType);
+
 				IF x.code = NIL THEN
 					VisitStatementBlock(x);
 				ELSE

+ 1 - 0
source/Release.Tool

@@ -693,6 +693,7 @@ PACKAGE Compiler ARCHIVE "Compiler.zip" SOURCE "CompilerSrc.zip" DESCRIPTION "Ac
 	#FPU32 { I386.Math.Mod I386.MathL.Mod }
 	AMD64, UNIX64 { XMM.AMD64.Math.Mod XMM.AMD64.MathL.Mod }
 	#FPU64 { AMD64.Math.Mod AMD64.MathL.Mod }
+	ComplexNumbers.Mod
 	FoxArrayBase.Mod
 	I386, WIN, UNIX32,UNIXG32 { I386.FoxArrayBaseOptimized.Mod }
 END