-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Closed
Copy link
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbugin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
Reproduction:
static int _intStatic;
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.AggressiveOptimization)]
public static bool Problem()
{
[MethodImpl(MethodImplOptions.NoInlining)]
static void Throw()
{
_intStatic = 1;
throw new Exception();
}
_intStatic = 2;
try
{
Throw();
_intStatic = 2;
}
catch (Exception)
{
if (_intStatic == 2)
{
return true;
}
}
return false;
}Call Problem().
Expected result: false.
Actual result: true.
Cause: each possible modification of globally visible memory in a protected region must induce a PHI in all reachable handlers.
Putting into Future for now as the bug is very old.
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbugin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged