-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Added DEBUG switches for roundtrip ILASM #72128
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
/azp run runtime-coreclr ilasm |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
/azp run runtime-coreclr ilasm |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsDescription Should resolve: #72127 - this was failing because Acceptance Criteria
|
/azp run runtime-coreclr ilasm |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Triggered manually: https://dev.azure.com/dnceng/public/_build/results?buildId=1888046&view=results |
@dotnet/jit-contrib This is ready. I'm running the ilasm roundtrip tests in CI, there are known failures, but we should not see the poison in the list. I tested this manually and adding the |
Pinging @dotnet/jit-contrib again - should be a quick review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't seem quite right; it's not general.
Why is this specific to the poison test?
There is already code that uses the various project file configurations to set the correct ilasm flags. Is this not getting used somehow? See:
runtime/src/coreclr/.nuget/Microsoft.NET.Sdk.IL/targets/Microsoft.NET.Sdk.IL.targets
Lines 126 to 133 in 1f0582e
<_IlasmSwitches>-QUIET -NOLOGO</_IlasmSwitches> | |
<_IlasmSwitches Condition="'$(FoldIdenticalMethods)' == 'True'">$(_IlasmSwitches) -FOLD</_IlasmSwitches> | |
<_IlasmSwitches Condition="'$(SizeOfStackReserve)' != ''">$(_IlasmSwitches) -STACK=$(SizeOfStackReserve)</_IlasmSwitches> | |
<_IlasmSwitches Condition="'$(DebugType)' == 'Full'">$(_IlasmSwitches) -DEBUG</_IlasmSwitches> | |
<_IlasmSwitches Condition="'$(DebugType)' == 'Impl'">$(_IlasmSwitches) -DEBUG=IMPL</_IlasmSwitches> | |
<_IlasmSwitches Condition="'$(DebugType)' == 'PdbOnly'">$(_IlasmSwitches) -DEBUG=OPT</_IlasmSwitches> | |
<_IlasmSwitches Condition="'$(Optimize)' == 'True'">$(_IlasmSwitches) -OPTIMIZE</_IlasmSwitches> | |
<_IlasmSwitches Condition="'$(IlasmResourceFile)' != ''">$(_IlasmSwitches) -RESOURCES="$(IlasmResourceFile)"</_IlasmSwitches> |
@BruceForstall - I did see those targets, but I believe the build uses this if you are compiling an
In order to get the correct poisoned value, Here is the code in the runtime that checks to poison the variable: // Returns true if address-exposed user variables should be poisoned with a recognizable value
bool compShouldPoisonFrame()
{
#ifdef FEATURE_ON_STACK_REPLACEMENT
if (opts.IsOSR())
return false;
#endif
return !info.compInitMem && opts.compDbgCode;
}
Before, I did try to generalize this in the test targets if we notice the |
I believe that's right; I realized that last night, too. So the .csproj round-trip testing wouldn't see it.
That's the fix I was thinking. I tried a slight variant, main...BruceForstall:TryFixIlasmRoundTripDebugFlag, and it seemed to work. I assumed for .ilproj it would add the switches twice, but that doesn't seem to be true (and I don't know why). Anyway, I'll go ahead and approve. |
I'll update this with your variant. I bet mine didn't work because I didn't put it in a property group... |
CI failure is not related, merging. |
Description
Should resolve: #72127 - this was failing because
ilasm.exe
was not being invoked with the/DEBUG
flag when the corresponding project was.Acceptance Criteria
poison.sh