[ARM/Linux] dblarray3 tests failures
While comparing tests running on arm and arm-softfp we encountered an issue with dblarray3 related tests. E.g. JIT.Methodical.doublearray.dblarray3_cs_d.dblarray3_cs_d
All the tests fail in the same code in the function f2a() - the generation appears to be equal to 1 and the exception is thrown after the check if (GC.GetGeneration(arr) != 0)
The issue is somehow random - it depends on the instance of the coreclr build. E.g. sometimes it happens in ARM and not ARM softfp, sometimes vice versa, sometimes it doesn't happen at all.
Debugging on arm-softfp I found that the array reference was first provided and saved in the stack frame, but then it's changed on relocation in the call corresponding to the allocation arr[0] = new double[1000];
And later the new ref's generation number changes from 0 to 1 in src/gc/gc.cpp somewhere inside the last line of the code below:
relocate_phase (condemned_gen_number, first_condemned_address); compact_phase (condemned_gen_number, first_condemned_address, (!settings.demotion && settings.promotion)); fix_generation_bounds (condemned_gen_number, consing_gen);
So, the generation changes to 1 only when the corresponding compacting and relocation code is called.
Is the test correct? Should there be a guarantee that the generation of arr doesn't change?
@lemmaa @leemgs
This bug is obsolete; I will close it. Many, many fixes have been made since this was last touched.