Skip to content
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: Fix stack allocated arrays for NativeAOT #111827

Merged
merged 4 commits into from
Jan 25, 2025
Merged

Conversation

hez2010
Copy link
Contributor

@hez2010 hez2010 commented Jan 25, 2025

In R2R we use a separate helper so we don't need the opts.IsReadyToRun() check. Otherwise the optimization will be blocked under NativeAOT.

Fixes #111822

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 25, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 25, 2025
@EgorBo
Copy link
Member

EgorBo commented Jan 25, 2025

In R2R we use a separate helper so we don't need the opts.IsReadyToRun() check. Otherwise the optimization will be blocked under NativeAOT.

Fixes #111822

if that code path is still not expected in R2R you should leave that assert there, just add !nativeaot

@hez2010
Copy link
Contributor Author

hez2010 commented Jan 25, 2025

if that code path is still not expected in R2R you should leave that assert there, just add !nativeaot

Done.

@EgorBo
Copy link
Member

EgorBo commented Jan 25, 2025

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@hez2010
Copy link
Contributor Author

hez2010 commented Jan 25, 2025

Generating native image of System.Private.CoreLib for linux.arm.Checked. Logging to 
  /__w/1/s/artifacts/bin/coreclr/linux.arm.Checked/x64/crossgen2/crossgen2 -o:/__w/1/s/artifacts/bin/coreclr/linux.arm.Checked/System.Private.CoreLib.dll -r:/__w/1/s/artifacts/bin/coreclr/linux.arm.Checked/IL/*.dll --targetarch:arm --targetos:linux -m:/__w/1/s/artifacts/bin/coreclr/linux.arm.Checked/StandardOptimizationData.mibc --embed-pgo-data -O --verify-type-and-field-layout /__w/1/s/artifacts/bin/coreclr/linux.arm.Checked/IL/System.Private.CoreLib.dll --perfmap-format-version:1 --perfmap --perfmap-path:/__w/1/s/artifacts/bin/coreclr/linux.arm.Checked/
  /__w/1/s/src/coreclr/jit/objectalloc.cpp:475
  Assertion failed 'isNativeAot || !comp->opts.IsReadyToRun()'

Is there a case where we don't use CORINFO_HELP_READYTORUN_NEWARR_1 under R2R?

@hez2010
Copy link
Contributor Author

hez2010 commented Jan 25, 2025

It seems that comp->IsTargetAbi(CORINFO_NATIVEAOT_ABI) returns false under NativeAOT. Is this expected?
NVM, I didn't copy the altjit to coreroot.

@hez2010
Copy link
Contributor Author

hez2010 commented Jan 25, 2025

/azp run runtime-nativeaot-outerloop
@EgorBo The assertion should be fixed now. Can you trigger the outerloop nativeaot run again?

Copy link

Commenter does not have sufficient privileges for PR 111827 in repo dotnet/runtime

1 similar comment
Copy link

Commenter does not have sufficient privileges for PR 111827 in repo dotnet/runtime

@EgorBo
Copy link
Member

EgorBo commented Jan 25, 2025

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@hez2010
Copy link
Contributor Author

hez2010 commented Jan 25, 2025

seems that outerloop is passing now (the failure is unrelated)

@AndyAyersMS
Copy link
Member

NAOT outerloop failure is

[FAIL] System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandler_MaxResponseHeadersLength_Http3.LargeSingleHeader_ThrowsException(maxResponseHeadersLength: 1)
System.Net.Quic.QuicException : Connection aborted by peer (256).

seems unrelated.

X86 SPMI failures are timeouts; ditto.

@AndyAyersMS AndyAyersMS merged commit 1084c54 into dotnet:main Jan 25, 2025
129 of 134 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AllocateArrayWithNonGCElements test fails on NativeAOT
3 participants