You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two System.Dynamic.Runtime.Tests array-indexer tests throw NullReferenceException inside Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter when the browser-Wasm CoreCLR test app is aggressively trimmed.
Found while bringing up the broad trimmed ReadyToRun library lane from #133193. The same failures reproduce with CoreCLR trimming and ReadyToRun disabled, so they are trimming/RuntimeBinder failures rather than R2R codegen failures.
Reproduction Steps
Build and run System.Dynamic.Runtime.Tests for browser-Wasm CoreCLR with:
Both dynamic array-indexer tests pass as they do in the non-trimmed browser configuration.
Actual behavior
System.NullReferenceException
at Microsoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriter.Rewrite(ExprBinOp, Expression[])
at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore(...)
Regression?
Unknown. Broad CoreCLR browser trimming coverage is newly enabled.
Known Workarounds
Temporarily exclude only these two methods when IsBuiltWithAggressiveTrimming && IsBrowser. Non-trimmed browser and other configurations remain enabled.
Configuration
Browser-Wasm CoreCLR Release with aggressive trimming, Chrome.
Other information
Re-enable when the RuntimeBinder expression-tree rewrite path works after trimming or the required metadata is explicitly preserved.
Note
This issue was generated with GitHub Copilot assistance and reviewed as part of the #133193 bring-up.
Description
Two
System.Dynamic.Runtime.Testsarray-indexer tests throwNullReferenceExceptioninsideMicrosoft.CSharp.RuntimeBinder.ExpressionTreeCallRewriterwhen the browser-Wasm CoreCLR test app is aggressively trimmed.Affected methods:
Found while bringing up the broad trimmed ReadyToRun library lane from #133193. The same failures reproduce with CoreCLR trimming and ReadyToRun disabled, so they are trimming/RuntimeBinder failures rather than R2R codegen failures.
Reproduction Steps
Build and run
System.Dynamic.Runtime.Testsfor browser-Wasm CoreCLR with:Expected behavior
Both dynamic array-indexer tests pass as they do in the non-trimmed browser configuration.
Actual behavior
Regression?
Unknown. Broad CoreCLR browser trimming coverage is newly enabled.
Known Workarounds
Temporarily exclude only these two methods when
IsBuiltWithAggressiveTrimming && IsBrowser. Non-trimmed browser and other configurations remain enabled.Configuration
Browser-Wasm CoreCLR Release with aggressive trimming, Chrome.
Other information
Re-enable when the RuntimeBinder expression-tree rewrite path works after trimming or the required metadata is explicitly preserved.
Note
This issue was generated with GitHub Copilot assistance and reviewed as part of the #133193 bring-up.