runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[ARM/Linux] dblarray3 tests failures

Open papaslavik opened this issue 10 years ago • 2 comments

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?

papaslavik avatar May 27 '16 12:05 papaslavik

@lemmaa @leemgs

papaslavik avatar May 30 '16 18:05 papaslavik

This bug is obsolete; I will close it. Many, many fixes have been made since this was last touched.

BruceForstall avatar Apr 25 '18 00:04 BruceForstall