-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random jit stress failures in JIT\Directed\arglist\vararg #81049
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsWindows x64
|
Also failed again this week, same two parts of the tests
|
Assigning to @jakobbotsch for struct related failure. |
I bisected this to 559aa0e, i.e. the new stress mode I added recently. Investigating in more detail now. |
After some forward subs, morph and some stress cloning we end up with: fgMorphTree BB01, STMT00021 (after)
[000237] -ACXG------ ▌ ASG int
[000238] D------N--- ├──▌ LCL_VAR int V00 loc0
[000239] -ACXG------ └──▌ CALL int NativeVarargTest.VarArg:ReportFailure(bool,System.String,int,int):int
[000240] -ACXG------ arg0 setup ├──▌ ASG int
[000241] D------N--- │ ├──▌ LCL_VAR int V15 tmp9
[000242] -ACXG------ │ └──▌ EQ int
[000243] ----------- │ ├──▌ ADD double
[000244] ----------- │ │ ├──▌ LCL_VAR double V05 loc5 (last use)
[000245] ----------- │ │ └──▌ ADD double
[000246] ----------- │ │ ├──▌ ADD double
[000247] ----------- │ │ │ ├──▌ LCL_FLD double(AX) V04 loc4 [+0]
[000248] ----------- │ │ │ └──▌ LCL_FLD double(AX) V04 loc4 [+8]
[000249] ----------- │ │ └──▌ LCL_FLD double(AX) V04 loc4 [+16]
[000250] -ACXG------ │ └──▌ CALL double NativeVarargTest.VarArg:check_passing_four_three_double_struct(NativeVarargTest.ThreeDoubleStruct,NativeVarargTest.ThreeDoubleStruct,NativeVarargTest.ThreeDoubleStruct,NativeVarargTest.ThreeDoubleStruct):double
[000252] -A--------- arg1 setup │ ├──▌ COMMA void
[000253] -A--------- │ │ ├──▌ COMMA void
[000254] -A--------- │ │ │ ├──▌ ASG double
[000255] U------N--- │ │ │ │ ├──▌ LCL_FLD double(AX) V13 tmp7 [+0]
[000256] ----------- │ │ │ │ └──▌ LCL_VAR double V07 tmp1
[000257] -A--------- │ │ │ └──▌ ASG double
[000258] U------N--- │ │ │ ├──▌ LCL_FLD double(AX) V13 tmp7 [+8]
[000259] ----------- │ │ │ └──▌ LCL_VAR double V08 tmp2
[000260] -A--------- │ │ └──▌ ASG double
[000261] U------N--- │ │ ├──▌ LCL_FLD double(AX) V13 tmp7 [+16]
[000262] ----------- │ │ └──▌ LCL_VAR double V09 tmp3
[000265] -A--------- arg3 setup │ ├──▌ COMMA void
[000266] -A--------- │ │ ├──▌ COMMA void
[000267] -A--------- │ │ │ ├──▌ ASG double
[000268] U------N--- │ │ │ │ ├──▌ LCL_FLD double(AX) V14 tmp8 [+0]
[000269] ----------- │ │ │ │ └──▌ LCL_VAR double V10 tmp4
[000270] -A--------- │ │ │ └──▌ ASG double
[000271] U------N--- │ │ │ ├──▌ LCL_FLD double(AX) V14 tmp8 [+8]
[000272] ----------- │ │ │ └──▌ LCL_VAR double V11 tmp5
[000273] -A--------- │ │ └──▌ ASG double
[000274] U------N--- │ │ ├──▌ LCL_FLD double(AX) V14 tmp8 [+16]
[000275] ----------- │ │ └──▌ LCL_VAR double V12 tmp6
( 3, 3) [000277] ----------- arg4 out+20 │ ├──▌ LCL_VAR_ADDR long V04 loc4
[000263] ----------- arg1 in rdx │ ├──▌ LCL_VAR_ADDR long V13 tmp7
[000276] ----------- arg3 in r9 │ ├──▌ LCL_VAR_ADDR long V14 tmp8
( 3, 3) [000264] ----------- arg2 in r8 │ ├──▌ LCL_VAR_ADDR long V02 loc2
[000251] H---------- va cookie in rcx │ └──▌ CNS_INT(h) long 0x24af975fed0 vararg
[000278] ----------- arg0 in rcx ├──▌ LCL_VAR int V15 tmp9
[000279] H---------- arg1 in rdx ├──▌ CNS_INT(h) ref 'check_passing_four_three_double_struct(first, second, third, fo'
[000280] ----------- arg2 in r8 ├──▌ CNS_INT int 100
[000281] ----------- arg3 in r9 └──▌ CNS_INT int 84 This misses some There is a fundamental problem here which is that we don't set Need to ponder a bit how to fix it. The temporary simple workaround might be to revisit the current statement and recompute |
Morph is responsible for marking accesses of address-exposed locals with GTF_GLOB_REF, however the last-use copy elision can newly address expose a preexisting local. This means previous uses that morph already saw have not had GTF_GLOB_REF added. This updates the JIT to at least add GTF_GLOB_REF on locals within the same statement as the call. This is not a complete fix as nothing prevents downstream phases from reordering the call with uses from earlier statements, but this at least fixes the one issue we know of right now (which is itself stress-only). A more complete fix will likely entail moving the identifying of last-use candidates earlier and address exposing them at that point. However, that first requires ABI determination to be moved earlier, so this depends on dotnet#76926, which I expect to get to within the near future. Fix dotnet#81049
Morph is responsible for marking accesses of address-exposed locals with GTF_GLOB_REF, however the last-use copy elision can newly address expose a preexisting local. This means previous uses that morph already saw have not had GTF_GLOB_REF added. This updates the JIT to at least add GTF_GLOB_REF on locals within the same statement as the call. This is not a complete fix as nothing prevents downstream phases from reordering the call with uses from earlier statements, but this at least fixes the one issue we know of right now (which is itself stress-only). A more complete fix will likely entail moving the identifying of last-use candidates earlier and address exposing them at that point. However, that first requires ABI determination to be moved earlier, so this depends on #76926, which I expect to get to within the near future. Fix #81049
https://dev.azure.com/dnceng-public/public/_build/results?buildId=144710&view=ms.vss-test-web.build-test-results-tab
Windows x64
The text was updated successfully, but these errors were encountered: