Skip to content

Diff in checked vs. release #98772

@kunalspathak

Description

@kunalspathak

Call to GetSwitchDescMap() that creates m_switchDescMap if it is nullptr. m_switchDescMap is invalidated everytime we renumber blocks or we replace jump targets. However, if I trace the caller of GetSwitchDescMap(), I see that it can get called from DEBUG via fgDebugCheckProfileWeights() and repopulate the map, which will behave differently at later point of time when we UpdateSwitchTableTarget().

if (m_switchDescMap == nullptr)
{
return; // No mappings, nothing to do.
}

In Debug, map != nullptr and hence we update the target, but in Release, it is still nullptr. In Debug, since we updated the target, it changes the successors we visit and variables created, offsets they get assigned to, etc.

image

Mostly caused by #98526

Metadata

Metadata

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIblocking-clean-ci-optionalBlocking optional rolling runs

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions