-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
JIT: invalid flags handling by fgMorphStoreDynBlock #79750
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Comments
dotnet-issue-labeler
bot
added
the
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
label
Dec 16, 2022
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue Details
using System.Runtime.CompilerServices;
class Runtime_12345
{
static unsafe int Main(string[] args)
{
byte dest = 0;
byte source = 100;
uint size = GetSize();
Unsafe.CopyBlock(ref dest, ref GetAddr(ref source), size);
return dest;
}
[MethodImpl(MethodImplOptions.NoInlining)]
private static ref byte GetAddr(ref byte a) => ref a;
[MethodImpl(MethodImplOptions.NoInlining)]
private static uint GetSize() => 1;
} Assert failure(PID 24244 [0x00005eb4], Thread: 18180 [0x4704]): Assertion failed '!"Missing flags on tree"' in 'superfluous_mov.Program:Main(System.String[])' during 'Morph - Global' (IL size 26; hash 0x264ab10b; FullOpts)
File: C:\dev\dotnet\runtime4\src\coreclr\jit\fgdiagnostic.cpp Line: 3195
Image: C:\dev\dotnet\runtime4\artifacts\bin\coreclr\windows.x64.Checked\CoreRun.exe Will extract my fix from #79346 and add the test case.
|
jakobbotsch
removed
the
untriaged
New issue has not been triaged by the area owner
label
Dec 16, 2022
jakobbotsch
added a commit
to jakobbotsch/runtime
that referenced
this issue
Dec 16, 2022
SetIndirExceptionFlags expects only unary indirs (reads) and does not handle other cases correctly. Add an assert for it and fix the users. Only fgMorphStoreDynBlock had the bug since gtUpdateNodeOperSideEffects assumes the caller will propagate effect flags from operands afterwards. Extracted from early liveness PR. Fix dotnet#79750
ghost
added
the
in-pr
There is an active PR which will close this issue when it is merged
label
Dec 16, 2022
jakobbotsch
added a commit
that referenced
this issue
Dec 17, 2022
SetIndirExceptionFlags expects only unary indirs (reads) and does not handle other cases correctly. Add an assert for it and fix the users. Only fgMorphStoreDynBlock had the bug since gtUpdateNodeOperSideEffects assumes the caller will propagate effect flags from operands afterwards. Extracted from early liveness PR. Fix #79750
ghost
removed
the
in-pr
There is an active PR which will close this issue when it is merged
label
Dec 17, 2022
ghost
locked as resolved and limited conversation to collaborators
Jan 16, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
fgMorphStoreDynBlock
callsSetIndirExceptionFlags
, but that function should not be used for stores.Will extract my fix from #79346 and add the test case.
The text was updated successfully, but these errors were encountered: