[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59 - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994
Open

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59#2
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

AndyAyersMS pushed a commit that referenced this pull request Nov 14, 2023
…tnet#90436)
* Enable IL trim for WASM by default
* Make ILStrip available for local build
* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it
* Add back accidentally removed line of code
* Update test to accommodate IL trim with WASM AOT
* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter
* Update var name
* Attempt to fix rebuild test failures
* Attempt to fix the file open issue with unicode on windows
* Attempt to fix unicode issue #2
* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms
* Add comment
* Update comment
* Fix file indentation format
* Check if string contains non-ascii char
* Remove unused callback
* Remove redundant comment
* Update method name
* Fixed some method not found issues and remove the optimization for g_fopen
* Fix tailcall
* Disable tailcall optimization when calling a trimmed method
* Free method header
* Fix windows build error
* Free method header at the correct locatioin
* Fix the condition of skipping tailcall
* Fix test failure
* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.
* Fix virtual tail call
* Address review feedback
* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list
* Put trimmed assemblies in IntermediateOutputPath
* Remove TrimmedAssemblies
* Create trimmed assembly folder before the parallel run
* Try to fix the issue with missing item
* Fix parallelism issue
* Only start the trim when the assembly is newer than the output
* Add assembly item to the list, when
* Add some logging
* Fixed runtimeconfig.json file path issue and disabed failed tests
* Update parameter name
* Fix wasi build
* Use the correct parameter
* Fix runtime test failure
* WasmAppBuilder: runtimeconfig.json path can be null
* cleanup
* ILStrip: fix typo in id name
* Cleanup
* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.
* more cleanup
* Re-enable disabled tests
* Change the default value for WasmStripILAfterAOT to false
* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds
* Move the location of file deleting
* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK
* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish
* Add _WasmSatelliteAssemblies to WasmAssembliesFinal
* Add a wasm template test
* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets
* Add a blazor template test
* Address review feedback
* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update parameter name
* Update usage of parameter
* Revert EmccCompile change
* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes
* Compress -> GZipCompress, and cleanup
* rework the tests
- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup
* ILStrip.cs: Emit a message about stripping to make it obvious to the user
* WasmApp.targets: update comment
* Change default value to false and update test
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
AndyAyersMS pushed a commit that referenced this pull request Dec 2, 2023
Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
AndyAyersMS pushed a commit that referenced this pull request Jan 17, 2024
…tnet#95292)
* Add IndentText json option
* Add IndentText for json source generator
* Add tests
* IndentText must be non-nullable
* Improve performance
* Add extra tests
* Cleanup
* Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fixes following code review
* Fixes following code review #2
* Add tests for invalid characters
* Handle RawIndent length
* Move all to RawIndentation
* Update documentation
* Additional fixes from code review
* Move to the new API
* Extra fixes and enhancements
* Fixes from code review
* Avoid introducing extra fields in JsonWriterOptions
* Fix OOM error
* Use bitwise logic for IndentedOrNotSkipValidation
* Cache indentation options in Utf8JsonWriter
* Add missing test around indentation options
* New fixes from code review
* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
* Add test to check default values of the JsonWriterOptions properties
* Fix comment
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Jul 16, 2024
* [wasm] Bump emscripten to 3.1.56
* Replace Module.asm with Module.wasmExports
Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816
* Updates for .native.worker.js -> mjs rename
Context: emscripten-core/emscripten#21041
* Update deps
* Add general testing feed
* Update mode deps
* Update path
* Use current python packages for now, we don't have newer ones
The current names 3.1.34 are new enough
* Keep using llvm 16 for runtime and aot compiler
* Add -Wno-pre-c11-compat only for browser
* Temporarily disable version checks to get further
* Temporarily disable version checks to get further #2
* Disable -Wunused-command-line-argument
* Update emsdk deps
* Update icu dependency
* Revert "Temporarily disable version checks to get further #2"
This reverts commit 3f8834f.
* Revert "Temporarily disable version checks to get further"
This reverts commit fe1e5c6.
* Fix emsdk check
We use system python on osx too
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Fix WBT test
* Feedback
* Update ICU dependency
* Update emscripten deps
* Revert "Workaround wasm-opt crash"
This reverts commit 200cf3b.
* Revert "Workaround wasm-opt crash"
This reverts commit 4530edf.
* Revert "Workaround wasm-opt crash"
This reverts commit 3593c41.
* Increase tests timeout
* Show test progress
* Increase MT library tests timeout
* Disable WBT tests with SkiaSharp
* Increase helix tests timeout on browser
* Increase WBT timeout
* Increase initial heap sizes
* Fix mono_wasm_load_runtime cwrap signature
Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`
* Enable XunitShowProgress for threading tasks tests
* Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
* Use new docker image for helix/windows tests
* Revert "Try to reduce number of parallel AOT compilations"
This reverts commit 5d9a6d2.
* Reduce the timeouts
* Reduce intitial heap size
* use active issues for MT
* Remove testing channel from nuget config, update deps
* Update emsdk and icu dependencies
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Sep 7, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range
* bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type
* bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)
* bug #4: document the fact that IOException can be thrown
* bug #5: throw SerializationException rather than OverflowException when parsing the decimal fails
* bug #6: 0 and 17 are illegal values for PrimitiveType enum
* bug #7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
AndyAyersMS pushed a commit that referenced this pull request Mar 24, 2026
…otnet#124642)
## Summary
Fixesdotnet#123621
When a constant-folded operand appears **after** a non-constant operand
in a short-circuit `&&` expression (e.g., `v == 2 && Environment.NewLine
!= "\r\n"`), callee inlining can leave dead local stores in the return
block. The `isReturnBool` lambda in `fgFoldCondToReturnBlock` required
`hasSingleStmt()`, which caused the optimization to bail out when these
dead stores were present, resulting in suboptimal branching codegen.
### Changes
- **`src/coreclr/jit/optimizebools.cpp`**: Relax the `hasSingleStmt()`
constraint in `isReturnBool` to allow preceding statements as long as
they have no globally visible side effects
(`GTF_GLOBALLY_VISIBLE_SIDE_EFFECTS`). This enables
`fgFoldCondToReturnBlock` to fold the conditional into a branchless
return even when dead local stores from inlining remain in the block.
### Before (ARM64, `Inline_After`)
```asm
cmp w0, #2
bne G_M4495_IG04
mov w0, #1
ret
G_M4495_IG04:
mov w0, #0
ret
```
### After (ARM64, `Inline_After`)
```asm
cmp w0, #2
cset x0, eq
ret
```
## Test plan
- [x] Added regression test `Runtime_123621` covering the original issue
pattern
- [x] Verified `Hoisted`, `Inline_Before`, and `Inline_After` all
produce identical branchless codegen (`cset` on ARM64)
- [x] Verified existing `DevDiv_168744` regression test still passes
- [x] Verified side-effect-ful blocks are correctly excluded from the
optimization
AndyAyersMS pushed a commit that referenced this pull request May 14, 2026
…128163)
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot.
Fixesdotnet#128044.
## Problem
createdump SIGSEGVs on Linux when generating a Heap-type minidump for a
process running interpreted code. The crash reproduces locally with the
`InterpreterStack` DumpTests debuggee and matches the CI failure that
prompted `<DumpTypes>Full</DumpTypes>` to be added as a temporary
workaround.
The faulting backtrace is:
```
#0 Thread::IsAddressInStack threads.cpp:6741
#1 Thread::EnumMemoryRegionsWorker threads.cpp:6909 (calls IsAddressInStack(currentSP))
#2 Thread::EnumMemoryRegions threads.cpp
#3 ThreadStore::EnumMemoryRegions
#4 ClrDataAccess::EnumMemDumpAllThreadsStack
#5 ClrDataAccess::EnumMemoryRegionsWorkerHeap (HEAP2-only path)
```
## Root cause
`Thread::m_pInterpThreadContext` was declared as a raw
`InterpThreadContext *`. In non-DAC code that's a normal host pointer,
but in
DAC mode the field's value is a target-process address. When
`IsAddressInStack` (a DAC-callable helper) dereferenced
`m_pInterpThreadContext->pStackStart` it read from a target-process
address
as if it were a host address, which faults inside createdump.
## Fix
Change the field type to `PTR_InterpThreadContext` (DPTR), matching the
treatment of other Thread fields like `m_pFrame`. In non-DAC builds
`DPTR(T)` is just `T*`, so there is no overhead or behavior change. In
DAC
builds the read goes through `__DPtr<T>` and marshals correctly from the
target.
Also remove the `<DumpTypes>Full</DumpTypes>` workaround on the
`InterpreterStack` DumpTests debuggee so the Heap path that originally
failed is exercised again.
## Validation
Locally reproduced the original SIGSEGV on Linux x64 with the auto-dump
mechanism (`DOTNET_DbgMiniDumpType=2` + `DOTNET_Interpreter=MethodA`)
running the `InterpreterStack` debuggee. With this fix applied,
createdump
produces a complete Heap dump (~74 MB) instead of crashing.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndyAyersMS added a commit that referenced this pull request Jun 9, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
AndyAyersMS added a commit that referenced this pull request Jun 10, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59 - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994
Open

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59#2
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

AndyAyersMS pushed a commit that referenced this pull request Nov 14, 2023
…tnet#90436)
* Enable IL trim for WASM by default
* Make ILStrip available for local build
* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it
* Add back accidentally removed line of code
* Update test to accommodate IL trim with WASM AOT
* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter
* Update var name
* Attempt to fix rebuild test failures
* Attempt to fix the file open issue with unicode on windows
* Attempt to fix unicode issue #2
* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms
* Add comment
* Update comment
* Fix file indentation format
* Check if string contains non-ascii char
* Remove unused callback
* Remove redundant comment
* Update method name
* Fixed some method not found issues and remove the optimization for g_fopen
* Fix tailcall
* Disable tailcall optimization when calling a trimmed method
* Free method header
* Fix windows build error
* Free method header at the correct locatioin
* Fix the condition of skipping tailcall
* Fix test failure
* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.
* Fix virtual tail call
* Address review feedback
* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list
* Put trimmed assemblies in IntermediateOutputPath
* Remove TrimmedAssemblies
* Create trimmed assembly folder before the parallel run
* Try to fix the issue with missing item
* Fix parallelism issue
* Only start the trim when the assembly is newer than the output
* Add assembly item to the list, when
* Add some logging
* Fixed runtimeconfig.json file path issue and disabed failed tests
* Update parameter name
* Fix wasi build
* Use the correct parameter
* Fix runtime test failure
* WasmAppBuilder: runtimeconfig.json path can be null
* cleanup
* ILStrip: fix typo in id name
* Cleanup
* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.
* more cleanup
* Re-enable disabled tests
* Change the default value for WasmStripILAfterAOT to false
* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds
* Move the location of file deleting
* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK
* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish
* Add _WasmSatelliteAssemblies to WasmAssembliesFinal
* Add a wasm template test
* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets
* Add a blazor template test
* Address review feedback
* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update parameter name
* Update usage of parameter
* Revert EmccCompile change
* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes
* Compress -> GZipCompress, and cleanup
* rework the tests
- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup
* ILStrip.cs: Emit a message about stripping to make it obvious to the user
* WasmApp.targets: update comment
* Change default value to false and update test
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
AndyAyersMS pushed a commit that referenced this pull request Dec 2, 2023
Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
AndyAyersMS pushed a commit that referenced this pull request Jan 17, 2024
…tnet#95292)
* Add IndentText json option
* Add IndentText for json source generator
* Add tests
* IndentText must be non-nullable
* Improve performance
* Add extra tests
* Cleanup
* Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fixes following code review
* Fixes following code review #2
* Add tests for invalid characters
* Handle RawIndent length
* Move all to RawIndentation
* Update documentation
* Additional fixes from code review
* Move to the new API
* Extra fixes and enhancements
* Fixes from code review
* Avoid introducing extra fields in JsonWriterOptions
* Fix OOM error
* Use bitwise logic for IndentedOrNotSkipValidation
* Cache indentation options in Utf8JsonWriter
* Add missing test around indentation options
* New fixes from code review
* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
* Add test to check default values of the JsonWriterOptions properties
* Fix comment
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Jul 16, 2024
* [wasm] Bump emscripten to 3.1.56
* Replace Module.asm with Module.wasmExports
Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816
* Updates for .native.worker.js -> mjs rename
Context: emscripten-core/emscripten#21041
* Update deps
* Add general testing feed
* Update mode deps
* Update path
* Use current python packages for now, we don't have newer ones
The current names 3.1.34 are new enough
* Keep using llvm 16 for runtime and aot compiler
* Add -Wno-pre-c11-compat only for browser
* Temporarily disable version checks to get further
* Temporarily disable version checks to get further #2
* Disable -Wunused-command-line-argument
* Update emsdk deps
* Update icu dependency
* Revert "Temporarily disable version checks to get further #2"
This reverts commit 3f8834f.
* Revert "Temporarily disable version checks to get further"
This reverts commit fe1e5c6.
* Fix emsdk check
We use system python on osx too
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Fix WBT test
* Feedback
* Update ICU dependency
* Update emscripten deps
* Revert "Workaround wasm-opt crash"
This reverts commit 200cf3b.
* Revert "Workaround wasm-opt crash"
This reverts commit 4530edf.
* Revert "Workaround wasm-opt crash"
This reverts commit 3593c41.
* Increase tests timeout
* Show test progress
* Increase MT library tests timeout
* Disable WBT tests with SkiaSharp
* Increase helix tests timeout on browser
* Increase WBT timeout
* Increase initial heap sizes
* Fix mono_wasm_load_runtime cwrap signature
Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`
* Enable XunitShowProgress for threading tasks tests
* Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
* Use new docker image for helix/windows tests
* Revert "Try to reduce number of parallel AOT compilations"
This reverts commit 5d9a6d2.
* Reduce the timeouts
* Reduce intitial heap size
* use active issues for MT
* Remove testing channel from nuget config, update deps
* Update emsdk and icu dependencies
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Sep 7, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range
* bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type
* bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)
* bug #4: document the fact that IOException can be thrown
* bug #5: throw SerializationException rather than OverflowException when parsing the decimal fails
* bug #6: 0 and 17 are illegal values for PrimitiveType enum
* bug #7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
AndyAyersMS pushed a commit that referenced this pull request Mar 24, 2026
…otnet#124642)
## Summary
Fixesdotnet#123621
When a constant-folded operand appears **after** a non-constant operand
in a short-circuit `&&` expression (e.g., `v == 2 && Environment.NewLine
!= "\r\n"`), callee inlining can leave dead local stores in the return
block. The `isReturnBool` lambda in `fgFoldCondToReturnBlock` required
`hasSingleStmt()`, which caused the optimization to bail out when these
dead stores were present, resulting in suboptimal branching codegen.
### Changes
- **`src/coreclr/jit/optimizebools.cpp`**: Relax the `hasSingleStmt()`
constraint in `isReturnBool` to allow preceding statements as long as
they have no globally visible side effects
(`GTF_GLOBALLY_VISIBLE_SIDE_EFFECTS`). This enables
`fgFoldCondToReturnBlock` to fold the conditional into a branchless
return even when dead local stores from inlining remain in the block.
### Before (ARM64, `Inline_After`)
```asm
cmp w0, #2
bne G_M4495_IG04
mov w0, #1
ret
G_M4495_IG04:
mov w0, #0
ret
```
### After (ARM64, `Inline_After`)
```asm
cmp w0, #2
cset x0, eq
ret
```
## Test plan
- [x] Added regression test `Runtime_123621` covering the original issue
pattern
- [x] Verified `Hoisted`, `Inline_Before`, and `Inline_After` all
produce identical branchless codegen (`cset` on ARM64)
- [x] Verified existing `DevDiv_168744` regression test still passes
- [x] Verified side-effect-ful blocks are correctly excluded from the
optimization
AndyAyersMS pushed a commit that referenced this pull request May 14, 2026
…128163)
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot.
Fixesdotnet#128044.
## Problem
createdump SIGSEGVs on Linux when generating a Heap-type minidump for a
process running interpreted code. The crash reproduces locally with the
`InterpreterStack` DumpTests debuggee and matches the CI failure that
prompted `<DumpTypes>Full</DumpTypes>` to be added as a temporary
workaround.
The faulting backtrace is:
```
#0 Thread::IsAddressInStack threads.cpp:6741
#1 Thread::EnumMemoryRegionsWorker threads.cpp:6909 (calls IsAddressInStack(currentSP))
#2 Thread::EnumMemoryRegions threads.cpp
#3 ThreadStore::EnumMemoryRegions
#4 ClrDataAccess::EnumMemDumpAllThreadsStack
#5 ClrDataAccess::EnumMemoryRegionsWorkerHeap (HEAP2-only path)
```
## Root cause
`Thread::m_pInterpThreadContext` was declared as a raw
`InterpThreadContext *`. In non-DAC code that's a normal host pointer,
but in
DAC mode the field's value is a target-process address. When
`IsAddressInStack` (a DAC-callable helper) dereferenced
`m_pInterpThreadContext->pStackStart` it read from a target-process
address
as if it were a host address, which faults inside createdump.
## Fix
Change the field type to `PTR_InterpThreadContext` (DPTR), matching the
treatment of other Thread fields like `m_pFrame`. In non-DAC builds
`DPTR(T)` is just `T*`, so there is no overhead or behavior change. In
DAC
builds the read goes through `__DPtr<T>` and marshals correctly from the
target.
Also remove the `<DumpTypes>Full</DumpTypes>` workaround on the
`InterpreterStack` DumpTests debuggee so the Heap path that originally
failed is exercised again.
## Validation
Locally reproduced the original SIGSEGV on Linux x64 with the auto-dump
mechanism (`DOTNET_DbgMiniDumpType=2` + `DOTNET_Interpreter=MethodA`)
running the `InterpreterStack` debuggee. With this fix applied,
createdump
produces a complete Heap dump (~74 MB) instead of crashing.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndyAyersMS added a commit that referenced this pull request Jun 9, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
AndyAyersMS added a commit that referenced this pull request Jun 10, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59 - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994
Open

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59#2
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

AndyAyersMS pushed a commit that referenced this pull request Nov 14, 2023
…tnet#90436)
* Enable IL trim for WASM by default
* Make ILStrip available for local build
* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it
* Add back accidentally removed line of code
* Update test to accommodate IL trim with WASM AOT
* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter
* Update var name
* Attempt to fix rebuild test failures
* Attempt to fix the file open issue with unicode on windows
* Attempt to fix unicode issue #2
* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms
* Add comment
* Update comment
* Fix file indentation format
* Check if string contains non-ascii char
* Remove unused callback
* Remove redundant comment
* Update method name
* Fixed some method not found issues and remove the optimization for g_fopen
* Fix tailcall
* Disable tailcall optimization when calling a trimmed method
* Free method header
* Fix windows build error
* Free method header at the correct locatioin
* Fix the condition of skipping tailcall
* Fix test failure
* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.
* Fix virtual tail call
* Address review feedback
* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list
* Put trimmed assemblies in IntermediateOutputPath
* Remove TrimmedAssemblies
* Create trimmed assembly folder before the parallel run
* Try to fix the issue with missing item
* Fix parallelism issue
* Only start the trim when the assembly is newer than the output
* Add assembly item to the list, when
* Add some logging
* Fixed runtimeconfig.json file path issue and disabed failed tests
* Update parameter name
* Fix wasi build
* Use the correct parameter
* Fix runtime test failure
* WasmAppBuilder: runtimeconfig.json path can be null
* cleanup
* ILStrip: fix typo in id name
* Cleanup
* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.
* more cleanup
* Re-enable disabled tests
* Change the default value for WasmStripILAfterAOT to false
* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds
* Move the location of file deleting
* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK
* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish
* Add _WasmSatelliteAssemblies to WasmAssembliesFinal
* Add a wasm template test
* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets
* Add a blazor template test
* Address review feedback
* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update parameter name
* Update usage of parameter
* Revert EmccCompile change
* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes
* Compress -> GZipCompress, and cleanup
* rework the tests
- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup
* ILStrip.cs: Emit a message about stripping to make it obvious to the user
* WasmApp.targets: update comment
* Change default value to false and update test
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
AndyAyersMS pushed a commit that referenced this pull request Dec 2, 2023
Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
AndyAyersMS pushed a commit that referenced this pull request Jan 17, 2024
…tnet#95292)
* Add IndentText json option
* Add IndentText for json source generator
* Add tests
* IndentText must be non-nullable
* Improve performance
* Add extra tests
* Cleanup
* Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fixes following code review
* Fixes following code review #2
* Add tests for invalid characters
* Handle RawIndent length
* Move all to RawIndentation
* Update documentation
* Additional fixes from code review
* Move to the new API
* Extra fixes and enhancements
* Fixes from code review
* Avoid introducing extra fields in JsonWriterOptions
* Fix OOM error
* Use bitwise logic for IndentedOrNotSkipValidation
* Cache indentation options in Utf8JsonWriter
* Add missing test around indentation options
* New fixes from code review
* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
* Add test to check default values of the JsonWriterOptions properties
* Fix comment
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Jul 16, 2024
* [wasm] Bump emscripten to 3.1.56
* Replace Module.asm with Module.wasmExports
Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816
* Updates for .native.worker.js -> mjs rename
Context: emscripten-core/emscripten#21041
* Update deps
* Add general testing feed
* Update mode deps
* Update path
* Use current python packages for now, we don't have newer ones
The current names 3.1.34 are new enough
* Keep using llvm 16 for runtime and aot compiler
* Add -Wno-pre-c11-compat only for browser
* Temporarily disable version checks to get further
* Temporarily disable version checks to get further #2
* Disable -Wunused-command-line-argument
* Update emsdk deps
* Update icu dependency
* Revert "Temporarily disable version checks to get further #2"
This reverts commit 3f8834f.
* Revert "Temporarily disable version checks to get further"
This reverts commit fe1e5c6.
* Fix emsdk check
We use system python on osx too
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Fix WBT test
* Feedback
* Update ICU dependency
* Update emscripten deps
* Revert "Workaround wasm-opt crash"
This reverts commit 200cf3b.
* Revert "Workaround wasm-opt crash"
This reverts commit 4530edf.
* Revert "Workaround wasm-opt crash"
This reverts commit 3593c41.
* Increase tests timeout
* Show test progress
* Increase MT library tests timeout
* Disable WBT tests with SkiaSharp
* Increase helix tests timeout on browser
* Increase WBT timeout
* Increase initial heap sizes
* Fix mono_wasm_load_runtime cwrap signature
Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`
* Enable XunitShowProgress for threading tasks tests
* Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
* Use new docker image for helix/windows tests
* Revert "Try to reduce number of parallel AOT compilations"
This reverts commit 5d9a6d2.
* Reduce the timeouts
* Reduce intitial heap size
* use active issues for MT
* Remove testing channel from nuget config, update deps
* Update emsdk and icu dependencies
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Sep 7, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range
* bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type
* bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)
* bug #4: document the fact that IOException can be thrown
* bug #5: throw SerializationException rather than OverflowException when parsing the decimal fails
* bug #6: 0 and 17 are illegal values for PrimitiveType enum
* bug #7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
AndyAyersMS pushed a commit that referenced this pull request Mar 24, 2026
…otnet#124642)
## Summary
Fixesdotnet#123621
When a constant-folded operand appears **after** a non-constant operand
in a short-circuit `&&` expression (e.g., `v == 2 && Environment.NewLine
!= "\r\n"`), callee inlining can leave dead local stores in the return
block. The `isReturnBool` lambda in `fgFoldCondToReturnBlock` required
`hasSingleStmt()`, which caused the optimization to bail out when these
dead stores were present, resulting in suboptimal branching codegen.
### Changes
- **`src/coreclr/jit/optimizebools.cpp`**: Relax the `hasSingleStmt()`
constraint in `isReturnBool` to allow preceding statements as long as
they have no globally visible side effects
(`GTF_GLOBALLY_VISIBLE_SIDE_EFFECTS`). This enables
`fgFoldCondToReturnBlock` to fold the conditional into a branchless
return even when dead local stores from inlining remain in the block.
### Before (ARM64, `Inline_After`)
```asm
cmp w0, #2
bne G_M4495_IG04
mov w0, #1
ret
G_M4495_IG04:
mov w0, #0
ret
```
### After (ARM64, `Inline_After`)
```asm
cmp w0, #2
cset x0, eq
ret
```
## Test plan
- [x] Added regression test `Runtime_123621` covering the original issue
pattern
- [x] Verified `Hoisted`, `Inline_Before`, and `Inline_After` all
produce identical branchless codegen (`cset` on ARM64)
- [x] Verified existing `DevDiv_168744` regression test still passes
- [x] Verified side-effect-ful blocks are correctly excluded from the
optimization
AndyAyersMS pushed a commit that referenced this pull request May 14, 2026
…128163)
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot.
Fixesdotnet#128044.
## Problem
createdump SIGSEGVs on Linux when generating a Heap-type minidump for a
process running interpreted code. The crash reproduces locally with the
`InterpreterStack` DumpTests debuggee and matches the CI failure that
prompted `<DumpTypes>Full</DumpTypes>` to be added as a temporary
workaround.
The faulting backtrace is:
```
#0 Thread::IsAddressInStack threads.cpp:6741
#1 Thread::EnumMemoryRegionsWorker threads.cpp:6909 (calls IsAddressInStack(currentSP))
#2 Thread::EnumMemoryRegions threads.cpp
#3 ThreadStore::EnumMemoryRegions
#4 ClrDataAccess::EnumMemDumpAllThreadsStack
#5 ClrDataAccess::EnumMemoryRegionsWorkerHeap (HEAP2-only path)
```
## Root cause
`Thread::m_pInterpThreadContext` was declared as a raw
`InterpThreadContext *`. In non-DAC code that's a normal host pointer,
but in
DAC mode the field's value is a target-process address. When
`IsAddressInStack` (a DAC-callable helper) dereferenced
`m_pInterpThreadContext->pStackStart` it read from a target-process
address
as if it were a host address, which faults inside createdump.
## Fix
Change the field type to `PTR_InterpThreadContext` (DPTR), matching the
treatment of other Thread fields like `m_pFrame`. In non-DAC builds
`DPTR(T)` is just `T*`, so there is no overhead or behavior change. In
DAC
builds the read goes through `__DPtr<T>` and marshals correctly from the
target.
Also remove the `<DumpTypes>Full</DumpTypes>` workaround on the
`InterpreterStack` DumpTests debuggee so the Heap path that originally
failed is exercised again.
## Validation
Locally reproduced the original SIGSEGV on Linux x64 with the auto-dump
mechanism (`DOTNET_DbgMiniDumpType=2` + `DOTNET_Interpreter=MethodA`)
running the `InterpreterStack` debuggee. With this fix applied,
createdump
produces a complete Heap dump (~74 MB) instead of crashing.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndyAyersMS added a commit that referenced this pull request Jun 9, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
AndyAyersMS added a commit that referenced this pull request Jun 10, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59 - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994
Open

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59#2
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

AndyAyersMS pushed a commit that referenced this pull request Nov 14, 2023
…tnet#90436)
* Enable IL trim for WASM by default
* Make ILStrip available for local build
* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it
* Add back accidentally removed line of code
* Update test to accommodate IL trim with WASM AOT
* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter
* Update var name
* Attempt to fix rebuild test failures
* Attempt to fix the file open issue with unicode on windows
* Attempt to fix unicode issue #2
* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms
* Add comment
* Update comment
* Fix file indentation format
* Check if string contains non-ascii char
* Remove unused callback
* Remove redundant comment
* Update method name
* Fixed some method not found issues and remove the optimization for g_fopen
* Fix tailcall
* Disable tailcall optimization when calling a trimmed method
* Free method header
* Fix windows build error
* Free method header at the correct locatioin
* Fix the condition of skipping tailcall
* Fix test failure
* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.
* Fix virtual tail call
* Address review feedback
* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list
* Put trimmed assemblies in IntermediateOutputPath
* Remove TrimmedAssemblies
* Create trimmed assembly folder before the parallel run
* Try to fix the issue with missing item
* Fix parallelism issue
* Only start the trim when the assembly is newer than the output
* Add assembly item to the list, when
* Add some logging
* Fixed runtimeconfig.json file path issue and disabed failed tests
* Update parameter name
* Fix wasi build
* Use the correct parameter
* Fix runtime test failure
* WasmAppBuilder: runtimeconfig.json path can be null
* cleanup
* ILStrip: fix typo in id name
* Cleanup
* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.
* more cleanup
* Re-enable disabled tests
* Change the default value for WasmStripILAfterAOT to false
* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds
* Move the location of file deleting
* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK
* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish
* Add _WasmSatelliteAssemblies to WasmAssembliesFinal
* Add a wasm template test
* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets
* Add a blazor template test
* Address review feedback
* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update parameter name
* Update usage of parameter
* Revert EmccCompile change
* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes
* Compress -> GZipCompress, and cleanup
* rework the tests
- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup
* ILStrip.cs: Emit a message about stripping to make it obvious to the user
* WasmApp.targets: update comment
* Change default value to false and update test
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
AndyAyersMS pushed a commit that referenced this pull request Dec 2, 2023
Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
AndyAyersMS pushed a commit that referenced this pull request Jan 17, 2024
…tnet#95292)
* Add IndentText json option
* Add IndentText for json source generator
* Add tests
* IndentText must be non-nullable
* Improve performance
* Add extra tests
* Cleanup
* Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fixes following code review
* Fixes following code review #2
* Add tests for invalid characters
* Handle RawIndent length
* Move all to RawIndentation
* Update documentation
* Additional fixes from code review
* Move to the new API
* Extra fixes and enhancements
* Fixes from code review
* Avoid introducing extra fields in JsonWriterOptions
* Fix OOM error
* Use bitwise logic for IndentedOrNotSkipValidation
* Cache indentation options in Utf8JsonWriter
* Add missing test around indentation options
* New fixes from code review
* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
* Add test to check default values of the JsonWriterOptions properties
* Fix comment
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Jul 16, 2024
* [wasm] Bump emscripten to 3.1.56
* Replace Module.asm with Module.wasmExports
Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816
* Updates for .native.worker.js -> mjs rename
Context: emscripten-core/emscripten#21041
* Update deps
* Add general testing feed
* Update mode deps
* Update path
* Use current python packages for now, we don't have newer ones
The current names 3.1.34 are new enough
* Keep using llvm 16 for runtime and aot compiler
* Add -Wno-pre-c11-compat only for browser
* Temporarily disable version checks to get further
* Temporarily disable version checks to get further #2
* Disable -Wunused-command-line-argument
* Update emsdk deps
* Update icu dependency
* Revert "Temporarily disable version checks to get further #2"
This reverts commit 3f8834f.
* Revert "Temporarily disable version checks to get further"
This reverts commit fe1e5c6.
* Fix emsdk check
We use system python on osx too
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Fix WBT test
* Feedback
* Update ICU dependency
* Update emscripten deps
* Revert "Workaround wasm-opt crash"
This reverts commit 200cf3b.
* Revert "Workaround wasm-opt crash"
This reverts commit 4530edf.
* Revert "Workaround wasm-opt crash"
This reverts commit 3593c41.
* Increase tests timeout
* Show test progress
* Increase MT library tests timeout
* Disable WBT tests with SkiaSharp
* Increase helix tests timeout on browser
* Increase WBT timeout
* Increase initial heap sizes
* Fix mono_wasm_load_runtime cwrap signature
Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`
* Enable XunitShowProgress for threading tasks tests
* Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
* Use new docker image for helix/windows tests
* Revert "Try to reduce number of parallel AOT compilations"
This reverts commit 5d9a6d2.
* Reduce the timeouts
* Reduce intitial heap size
* use active issues for MT
* Remove testing channel from nuget config, update deps
* Update emsdk and icu dependencies
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Sep 7, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range
* bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type
* bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)
* bug #4: document the fact that IOException can be thrown
* bug #5: throw SerializationException rather than OverflowException when parsing the decimal fails
* bug #6: 0 and 17 are illegal values for PrimitiveType enum
* bug #7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
AndyAyersMS pushed a commit that referenced this pull request Mar 24, 2026
…otnet#124642)
## Summary
Fixesdotnet#123621
When a constant-folded operand appears **after** a non-constant operand
in a short-circuit `&&` expression (e.g., `v == 2 && Environment.NewLine
!= "\r\n"`), callee inlining can leave dead local stores in the return
block. The `isReturnBool` lambda in `fgFoldCondToReturnBlock` required
`hasSingleStmt()`, which caused the optimization to bail out when these
dead stores were present, resulting in suboptimal branching codegen.
### Changes
- **`src/coreclr/jit/optimizebools.cpp`**: Relax the `hasSingleStmt()`
constraint in `isReturnBool` to allow preceding statements as long as
they have no globally visible side effects
(`GTF_GLOBALLY_VISIBLE_SIDE_EFFECTS`). This enables
`fgFoldCondToReturnBlock` to fold the conditional into a branchless
return even when dead local stores from inlining remain in the block.
### Before (ARM64, `Inline_After`)
```asm
cmp w0, #2
bne G_M4495_IG04
mov w0, #1
ret
G_M4495_IG04:
mov w0, #0
ret
```
### After (ARM64, `Inline_After`)
```asm
cmp w0, #2
cset x0, eq
ret
```
## Test plan
- [x] Added regression test `Runtime_123621` covering the original issue
pattern
- [x] Verified `Hoisted`, `Inline_Before`, and `Inline_After` all
produce identical branchless codegen (`cset` on ARM64)
- [x] Verified existing `DevDiv_168744` regression test still passes
- [x] Verified side-effect-ful blocks are correctly excluded from the
optimization
AndyAyersMS pushed a commit that referenced this pull request May 14, 2026
…128163)
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot.
Fixesdotnet#128044.
## Problem
createdump SIGSEGVs on Linux when generating a Heap-type minidump for a
process running interpreted code. The crash reproduces locally with the
`InterpreterStack` DumpTests debuggee and matches the CI failure that
prompted `<DumpTypes>Full</DumpTypes>` to be added as a temporary
workaround.
The faulting backtrace is:
```
#0 Thread::IsAddressInStack threads.cpp:6741
#1 Thread::EnumMemoryRegionsWorker threads.cpp:6909 (calls IsAddressInStack(currentSP))
#2 Thread::EnumMemoryRegions threads.cpp
#3 ThreadStore::EnumMemoryRegions
#4 ClrDataAccess::EnumMemDumpAllThreadsStack
#5 ClrDataAccess::EnumMemoryRegionsWorkerHeap (HEAP2-only path)
```
## Root cause
`Thread::m_pInterpThreadContext` was declared as a raw
`InterpThreadContext *`. In non-DAC code that's a normal host pointer,
but in
DAC mode the field's value is a target-process address. When
`IsAddressInStack` (a DAC-callable helper) dereferenced
`m_pInterpThreadContext->pStackStart` it read from a target-process
address
as if it were a host address, which faults inside createdump.
## Fix
Change the field type to `PTR_InterpThreadContext` (DPTR), matching the
treatment of other Thread fields like `m_pFrame`. In non-DAC builds
`DPTR(T)` is just `T*`, so there is no overhead or behavior change. In
DAC
builds the read goes through `__DPtr<T>` and marshals correctly from the
target.
Also remove the `<DumpTypes>Full</DumpTypes>` workaround on the
`InterpreterStack` DumpTests debuggee so the Heap path that originally
failed is exercised again.
## Validation
Locally reproduced the original SIGSEGV on Linux x64 with the auto-dump
mechanism (`DOTNET_DbgMiniDumpType=2` + `DOTNET_Interpreter=MethodA`)
running the `InterpreterStack` debuggee. With this fix applied,
createdump
produces a complete Heap dump (~74 MB) instead of crashing.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndyAyersMS added a commit that referenced this pull request Jun 9, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
AndyAyersMS added a commit that referenced this pull request Jun 10, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59 - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994
Open

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59#2
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

AndyAyersMS pushed a commit that referenced this pull request Nov 14, 2023
…tnet#90436)
* Enable IL trim for WASM by default
* Make ILStrip available for local build
* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it
* Add back accidentally removed line of code
* Update test to accommodate IL trim with WASM AOT
* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter
* Update var name
* Attempt to fix rebuild test failures
* Attempt to fix the file open issue with unicode on windows
* Attempt to fix unicode issue #2
* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms
* Add comment
* Update comment
* Fix file indentation format
* Check if string contains non-ascii char
* Remove unused callback
* Remove redundant comment
* Update method name
* Fixed some method not found issues and remove the optimization for g_fopen
* Fix tailcall
* Disable tailcall optimization when calling a trimmed method
* Free method header
* Fix windows build error
* Free method header at the correct locatioin
* Fix the condition of skipping tailcall
* Fix test failure
* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.
* Fix virtual tail call
* Address review feedback
* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list
* Put trimmed assemblies in IntermediateOutputPath
* Remove TrimmedAssemblies
* Create trimmed assembly folder before the parallel run
* Try to fix the issue with missing item
* Fix parallelism issue
* Only start the trim when the assembly is newer than the output
* Add assembly item to the list, when
* Add some logging
* Fixed runtimeconfig.json file path issue and disabed failed tests
* Update parameter name
* Fix wasi build
* Use the correct parameter
* Fix runtime test failure
* WasmAppBuilder: runtimeconfig.json path can be null
* cleanup
* ILStrip: fix typo in id name
* Cleanup
* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.
* more cleanup
* Re-enable disabled tests
* Change the default value for WasmStripILAfterAOT to false
* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds
* Move the location of file deleting
* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK
* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish
* Add _WasmSatelliteAssemblies to WasmAssembliesFinal
* Add a wasm template test
* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets
* Add a blazor template test
* Address review feedback
* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update parameter name
* Update usage of parameter
* Revert EmccCompile change
* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes
* Compress -> GZipCompress, and cleanup
* rework the tests
- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup
* ILStrip.cs: Emit a message about stripping to make it obvious to the user
* WasmApp.targets: update comment
* Change default value to false and update test
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
AndyAyersMS pushed a commit that referenced this pull request Dec 2, 2023
Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
AndyAyersMS pushed a commit that referenced this pull request Jan 17, 2024
…tnet#95292)
* Add IndentText json option
* Add IndentText for json source generator
* Add tests
* IndentText must be non-nullable
* Improve performance
* Add extra tests
* Cleanup
* Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fixes following code review
* Fixes following code review #2
* Add tests for invalid characters
* Handle RawIndent length
* Move all to RawIndentation
* Update documentation
* Additional fixes from code review
* Move to the new API
* Extra fixes and enhancements
* Fixes from code review
* Avoid introducing extra fields in JsonWriterOptions
* Fix OOM error
* Use bitwise logic for IndentedOrNotSkipValidation
* Cache indentation options in Utf8JsonWriter
* Add missing test around indentation options
* New fixes from code review
* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
* Add test to check default values of the JsonWriterOptions properties
* Fix comment
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Jul 16, 2024
* [wasm] Bump emscripten to 3.1.56
* Replace Module.asm with Module.wasmExports
Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816
* Updates for .native.worker.js -> mjs rename
Context: emscripten-core/emscripten#21041
* Update deps
* Add general testing feed
* Update mode deps
* Update path
* Use current python packages for now, we don't have newer ones
The current names 3.1.34 are new enough
* Keep using llvm 16 for runtime and aot compiler
* Add -Wno-pre-c11-compat only for browser
* Temporarily disable version checks to get further
* Temporarily disable version checks to get further #2
* Disable -Wunused-command-line-argument
* Update emsdk deps
* Update icu dependency
* Revert "Temporarily disable version checks to get further #2"
This reverts commit 3f8834f.
* Revert "Temporarily disable version checks to get further"
This reverts commit fe1e5c6.
* Fix emsdk check
We use system python on osx too
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Fix WBT test
* Feedback
* Update ICU dependency
* Update emscripten deps
* Revert "Workaround wasm-opt crash"
This reverts commit 200cf3b.
* Revert "Workaround wasm-opt crash"
This reverts commit 4530edf.
* Revert "Workaround wasm-opt crash"
This reverts commit 3593c41.
* Increase tests timeout
* Show test progress
* Increase MT library tests timeout
* Disable WBT tests with SkiaSharp
* Increase helix tests timeout on browser
* Increase WBT timeout
* Increase initial heap sizes
* Fix mono_wasm_load_runtime cwrap signature
Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`
* Enable XunitShowProgress for threading tasks tests
* Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
* Use new docker image for helix/windows tests
* Revert "Try to reduce number of parallel AOT compilations"
This reverts commit 5d9a6d2.
* Reduce the timeouts
* Reduce intitial heap size
* use active issues for MT
* Remove testing channel from nuget config, update deps
* Update emsdk and icu dependencies
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Sep 7, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range
* bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type
* bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)
* bug #4: document the fact that IOException can be thrown
* bug #5: throw SerializationException rather than OverflowException when parsing the decimal fails
* bug #6: 0 and 17 are illegal values for PrimitiveType enum
* bug #7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
AndyAyersMS pushed a commit that referenced this pull request Mar 24, 2026
…otnet#124642)
## Summary
Fixesdotnet#123621
When a constant-folded operand appears **after** a non-constant operand
in a short-circuit `&&` expression (e.g., `v == 2 && Environment.NewLine
!= "\r\n"`), callee inlining can leave dead local stores in the return
block. The `isReturnBool` lambda in `fgFoldCondToReturnBlock` required
`hasSingleStmt()`, which caused the optimization to bail out when these
dead stores were present, resulting in suboptimal branching codegen.
### Changes
- **`src/coreclr/jit/optimizebools.cpp`**: Relax the `hasSingleStmt()`
constraint in `isReturnBool` to allow preceding statements as long as
they have no globally visible side effects
(`GTF_GLOBALLY_VISIBLE_SIDE_EFFECTS`). This enables
`fgFoldCondToReturnBlock` to fold the conditional into a branchless
return even when dead local stores from inlining remain in the block.
### Before (ARM64, `Inline_After`)
```asm
cmp w0, #2
bne G_M4495_IG04
mov w0, #1
ret
G_M4495_IG04:
mov w0, #0
ret
```
### After (ARM64, `Inline_After`)
```asm
cmp w0, #2
cset x0, eq
ret
```
## Test plan
- [x] Added regression test `Runtime_123621` covering the original issue
pattern
- [x] Verified `Hoisted`, `Inline_Before`, and `Inline_After` all
produce identical branchless codegen (`cset` on ARM64)
- [x] Verified existing `DevDiv_168744` regression test still passes
- [x] Verified side-effect-ful blocks are correctly excluded from the
optimization
AndyAyersMS pushed a commit that referenced this pull request May 14, 2026
…128163)
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot.
Fixesdotnet#128044.
## Problem
createdump SIGSEGVs on Linux when generating a Heap-type minidump for a
process running interpreted code. The crash reproduces locally with the
`InterpreterStack` DumpTests debuggee and matches the CI failure that
prompted `<DumpTypes>Full</DumpTypes>` to be added as a temporary
workaround.
The faulting backtrace is:
```
#0 Thread::IsAddressInStack threads.cpp:6741
#1 Thread::EnumMemoryRegionsWorker threads.cpp:6909 (calls IsAddressInStack(currentSP))
#2 Thread::EnumMemoryRegions threads.cpp
#3 ThreadStore::EnumMemoryRegions
#4 ClrDataAccess::EnumMemDumpAllThreadsStack
#5 ClrDataAccess::EnumMemoryRegionsWorkerHeap (HEAP2-only path)
```
## Root cause
`Thread::m_pInterpThreadContext` was declared as a raw
`InterpThreadContext *`. In non-DAC code that's a normal host pointer,
but in
DAC mode the field's value is a target-process address. When
`IsAddressInStack` (a DAC-callable helper) dereferenced
`m_pInterpThreadContext->pStackStart` it read from a target-process
address
as if it were a host address, which faults inside createdump.
## Fix
Change the field type to `PTR_InterpThreadContext` (DPTR), matching the
treatment of other Thread fields like `m_pFrame`. In non-DAC builds
`DPTR(T)` is just `T*`, so there is no overhead or behavior change. In
DAC
builds the read goes through `__DPtr<T>` and marshals correctly from the
target.
Also remove the `<DumpTypes>Full</DumpTypes>` workaround on the
`InterpreterStack` DumpTests debuggee so the Heap path that originally
failed is exercised again.
## Validation
Locally reproduced the original SIGSEGV on Linux x64 with the auto-dump
mechanism (`DOTNET_DbgMiniDumpType=2` + `DOTNET_Interpreter=MethodA`)
running the `InterpreterStack` debuggee. With this fix applied,
createdump
produces a complete Heap dump (~74 MB) instead of crashing.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndyAyersMS added a commit that referenced this pull request Jun 9, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
AndyAyersMS added a commit that referenced this pull request Jun 10, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59 - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994
Open

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59#2
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

AndyAyersMS pushed a commit that referenced this pull request Nov 14, 2023
…tnet#90436)
* Enable IL trim for WASM by default
* Make ILStrip available for local build
* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it
* Add back accidentally removed line of code
* Update test to accommodate IL trim with WASM AOT
* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter
* Update var name
* Attempt to fix rebuild test failures
* Attempt to fix the file open issue with unicode on windows
* Attempt to fix unicode issue #2
* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms
* Add comment
* Update comment
* Fix file indentation format
* Check if string contains non-ascii char
* Remove unused callback
* Remove redundant comment
* Update method name
* Fixed some method not found issues and remove the optimization for g_fopen
* Fix tailcall
* Disable tailcall optimization when calling a trimmed method
* Free method header
* Fix windows build error
* Free method header at the correct locatioin
* Fix the condition of skipping tailcall
* Fix test failure
* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.
* Fix virtual tail call
* Address review feedback
* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list
* Put trimmed assemblies in IntermediateOutputPath
* Remove TrimmedAssemblies
* Create trimmed assembly folder before the parallel run
* Try to fix the issue with missing item
* Fix parallelism issue
* Only start the trim when the assembly is newer than the output
* Add assembly item to the list, when
* Add some logging
* Fixed runtimeconfig.json file path issue and disabed failed tests
* Update parameter name
* Fix wasi build
* Use the correct parameter
* Fix runtime test failure
* WasmAppBuilder: runtimeconfig.json path can be null
* cleanup
* ILStrip: fix typo in id name
* Cleanup
* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.
* more cleanup
* Re-enable disabled tests
* Change the default value for WasmStripILAfterAOT to false
* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds
* Move the location of file deleting
* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK
* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish
* Add _WasmSatelliteAssemblies to WasmAssembliesFinal
* Add a wasm template test
* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets
* Add a blazor template test
* Address review feedback
* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update parameter name
* Update usage of parameter
* Revert EmccCompile change
* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes
* Compress -> GZipCompress, and cleanup
* rework the tests
- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup
* ILStrip.cs: Emit a message about stripping to make it obvious to the user
* WasmApp.targets: update comment
* Change default value to false and update test
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
AndyAyersMS pushed a commit that referenced this pull request Dec 2, 2023
Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
AndyAyersMS pushed a commit that referenced this pull request Jan 17, 2024
…tnet#95292)
* Add IndentText json option
* Add IndentText for json source generator
* Add tests
* IndentText must be non-nullable
* Improve performance
* Add extra tests
* Cleanup
* Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fixes following code review
* Fixes following code review #2
* Add tests for invalid characters
* Handle RawIndent length
* Move all to RawIndentation
* Update documentation
* Additional fixes from code review
* Move to the new API
* Extra fixes and enhancements
* Fixes from code review
* Avoid introducing extra fields in JsonWriterOptions
* Fix OOM error
* Use bitwise logic for IndentedOrNotSkipValidation
* Cache indentation options in Utf8JsonWriter
* Add missing test around indentation options
* New fixes from code review
* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
* Add test to check default values of the JsonWriterOptions properties
* Fix comment
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Jul 16, 2024
* [wasm] Bump emscripten to 3.1.56
* Replace Module.asm with Module.wasmExports
Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816
* Updates for .native.worker.js -> mjs rename
Context: emscripten-core/emscripten#21041
* Update deps
* Add general testing feed
* Update mode deps
* Update path
* Use current python packages for now, we don't have newer ones
The current names 3.1.34 are new enough
* Keep using llvm 16 for runtime and aot compiler
* Add -Wno-pre-c11-compat only for browser
* Temporarily disable version checks to get further
* Temporarily disable version checks to get further #2
* Disable -Wunused-command-line-argument
* Update emsdk deps
* Update icu dependency
* Revert "Temporarily disable version checks to get further #2"
This reverts commit 3f8834f.
* Revert "Temporarily disable version checks to get further"
This reverts commit fe1e5c6.
* Fix emsdk check
We use system python on osx too
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Fix WBT test
* Feedback
* Update ICU dependency
* Update emscripten deps
* Revert "Workaround wasm-opt crash"
This reverts commit 200cf3b.
* Revert "Workaround wasm-opt crash"
This reverts commit 4530edf.
* Revert "Workaround wasm-opt crash"
This reverts commit 3593c41.
* Increase tests timeout
* Show test progress
* Increase MT library tests timeout
* Disable WBT tests with SkiaSharp
* Increase helix tests timeout on browser
* Increase WBT timeout
* Increase initial heap sizes
* Fix mono_wasm_load_runtime cwrap signature
Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`
* Enable XunitShowProgress for threading tasks tests
* Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
* Use new docker image for helix/windows tests
* Revert "Try to reduce number of parallel AOT compilations"
This reverts commit 5d9a6d2.
* Reduce the timeouts
* Reduce intitial heap size
* use active issues for MT
* Remove testing channel from nuget config, update deps
* Update emsdk and icu dependencies
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Sep 7, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range
* bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type
* bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)
* bug #4: document the fact that IOException can be thrown
* bug #5: throw SerializationException rather than OverflowException when parsing the decimal fails
* bug #6: 0 and 17 are illegal values for PrimitiveType enum
* bug #7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
AndyAyersMS pushed a commit that referenced this pull request Mar 24, 2026
…otnet#124642)
## Summary
Fixesdotnet#123621
When a constant-folded operand appears **after** a non-constant operand
in a short-circuit `&&` expression (e.g., `v == 2 && Environment.NewLine
!= "\r\n"`), callee inlining can leave dead local stores in the return
block. The `isReturnBool` lambda in `fgFoldCondToReturnBlock` required
`hasSingleStmt()`, which caused the optimization to bail out when these
dead stores were present, resulting in suboptimal branching codegen.
### Changes
- **`src/coreclr/jit/optimizebools.cpp`**: Relax the `hasSingleStmt()`
constraint in `isReturnBool` to allow preceding statements as long as
they have no globally visible side effects
(`GTF_GLOBALLY_VISIBLE_SIDE_EFFECTS`). This enables
`fgFoldCondToReturnBlock` to fold the conditional into a branchless
return even when dead local stores from inlining remain in the block.
### Before (ARM64, `Inline_After`)
```asm
cmp w0, #2
bne G_M4495_IG04
mov w0, #1
ret
G_M4495_IG04:
mov w0, #0
ret
```
### After (ARM64, `Inline_After`)
```asm
cmp w0, #2
cset x0, eq
ret
```
## Test plan
- [x] Added regression test `Runtime_123621` covering the original issue
pattern
- [x] Verified `Hoisted`, `Inline_Before`, and `Inline_After` all
produce identical branchless codegen (`cset` on ARM64)
- [x] Verified existing `DevDiv_168744` regression test still passes
- [x] Verified side-effect-ful blocks are correctly excluded from the
optimization
AndyAyersMS pushed a commit that referenced this pull request May 14, 2026
…128163)
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot.
Fixesdotnet#128044.
## Problem
createdump SIGSEGVs on Linux when generating a Heap-type minidump for a
process running interpreted code. The crash reproduces locally with the
`InterpreterStack` DumpTests debuggee and matches the CI failure that
prompted `<DumpTypes>Full</DumpTypes>` to be added as a temporary
workaround.
The faulting backtrace is:
```
#0 Thread::IsAddressInStack threads.cpp:6741
#1 Thread::EnumMemoryRegionsWorker threads.cpp:6909 (calls IsAddressInStack(currentSP))
#2 Thread::EnumMemoryRegions threads.cpp
#3 ThreadStore::EnumMemoryRegions
#4 ClrDataAccess::EnumMemDumpAllThreadsStack
#5 ClrDataAccess::EnumMemoryRegionsWorkerHeap (HEAP2-only path)
```
## Root cause
`Thread::m_pInterpThreadContext` was declared as a raw
`InterpThreadContext *`. In non-DAC code that's a normal host pointer,
but in
DAC mode the field's value is a target-process address. When
`IsAddressInStack` (a DAC-callable helper) dereferenced
`m_pInterpThreadContext->pStackStart` it read from a target-process
address
as if it were a host address, which faults inside createdump.
## Fix
Change the field type to `PTR_InterpThreadContext` (DPTR), matching the
treatment of other Thread fields like `m_pFrame`. In non-DAC builds
`DPTR(T)` is just `T*`, so there is no overhead or behavior change. In
DAC
builds the read goes through `__DPtr<T>` and marshals correctly from the
target.
Also remove the `<DumpTypes>Full</DumpTypes>` workaround on the
`InterpreterStack` DumpTests debuggee so the Heap path that originally
failed is exercised again.
## Validation
Locally reproduced the original SIGSEGV on Linux x64 with the auto-dump
mechanism (`DOTNET_DbgMiniDumpType=2` + `DOTNET_Interpreter=MethodA`)
running the `InterpreterStack` debuggee. With this fix applied,
createdump
produces a complete Heap dump (~74 MB) instead of crashing.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndyAyersMS added a commit that referenced this pull request Jun 9, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
AndyAyersMS added a commit that referenced this pull request Jun 10, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59 - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994
Open

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59#2
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

AndyAyersMS pushed a commit that referenced this pull request Nov 14, 2023
…tnet#90436)
* Enable IL trim for WASM by default
* Make ILStrip available for local build
* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it
* Add back accidentally removed line of code
* Update test to accommodate IL trim with WASM AOT
* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter
* Update var name
* Attempt to fix rebuild test failures
* Attempt to fix the file open issue with unicode on windows
* Attempt to fix unicode issue #2
* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms
* Add comment
* Update comment
* Fix file indentation format
* Check if string contains non-ascii char
* Remove unused callback
* Remove redundant comment
* Update method name
* Fixed some method not found issues and remove the optimization for g_fopen
* Fix tailcall
* Disable tailcall optimization when calling a trimmed method
* Free method header
* Fix windows build error
* Free method header at the correct locatioin
* Fix the condition of skipping tailcall
* Fix test failure
* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.
* Fix virtual tail call
* Address review feedback
* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list
* Put trimmed assemblies in IntermediateOutputPath
* Remove TrimmedAssemblies
* Create trimmed assembly folder before the parallel run
* Try to fix the issue with missing item
* Fix parallelism issue
* Only start the trim when the assembly is newer than the output
* Add assembly item to the list, when
* Add some logging
* Fixed runtimeconfig.json file path issue and disabed failed tests
* Update parameter name
* Fix wasi build
* Use the correct parameter
* Fix runtime test failure
* WasmAppBuilder: runtimeconfig.json path can be null
* cleanup
* ILStrip: fix typo in id name
* Cleanup
* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.
* more cleanup
* Re-enable disabled tests
* Change the default value for WasmStripILAfterAOT to false
* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds
* Move the location of file deleting
* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK
* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish
* Add _WasmSatelliteAssemblies to WasmAssembliesFinal
* Add a wasm template test
* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets
* Add a blazor template test
* Address review feedback
* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update parameter name
* Update usage of parameter
* Revert EmccCompile change
* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes
* Compress -> GZipCompress, and cleanup
* rework the tests
- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup
* ILStrip.cs: Emit a message about stripping to make it obvious to the user
* WasmApp.targets: update comment
* Change default value to false and update test
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
AndyAyersMS pushed a commit that referenced this pull request Dec 2, 2023
Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
AndyAyersMS pushed a commit that referenced this pull request Jan 17, 2024
…tnet#95292)
* Add IndentText json option
* Add IndentText for json source generator
* Add tests
* IndentText must be non-nullable
* Improve performance
* Add extra tests
* Cleanup
* Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fixes following code review
* Fixes following code review #2
* Add tests for invalid characters
* Handle RawIndent length
* Move all to RawIndentation
* Update documentation
* Additional fixes from code review
* Move to the new API
* Extra fixes and enhancements
* Fixes from code review
* Avoid introducing extra fields in JsonWriterOptions
* Fix OOM error
* Use bitwise logic for IndentedOrNotSkipValidation
* Cache indentation options in Utf8JsonWriter
* Add missing test around indentation options
* New fixes from code review
* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
* Add test to check default values of the JsonWriterOptions properties
* Fix comment
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Jul 16, 2024
* [wasm] Bump emscripten to 3.1.56
* Replace Module.asm with Module.wasmExports
Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816
* Updates for .native.worker.js -> mjs rename
Context: emscripten-core/emscripten#21041
* Update deps
* Add general testing feed
* Update mode deps
* Update path
* Use current python packages for now, we don't have newer ones
The current names 3.1.34 are new enough
* Keep using llvm 16 for runtime and aot compiler
* Add -Wno-pre-c11-compat only for browser
* Temporarily disable version checks to get further
* Temporarily disable version checks to get further #2
* Disable -Wunused-command-line-argument
* Update emsdk deps
* Update icu dependency
* Revert "Temporarily disable version checks to get further #2"
This reverts commit 3f8834f.
* Revert "Temporarily disable version checks to get further"
This reverts commit fe1e5c6.
* Fix emsdk check
We use system python on osx too
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Fix WBT test
* Feedback
* Update ICU dependency
* Update emscripten deps
* Revert "Workaround wasm-opt crash"
This reverts commit 200cf3b.
* Revert "Workaround wasm-opt crash"
This reverts commit 4530edf.
* Revert "Workaround wasm-opt crash"
This reverts commit 3593c41.
* Increase tests timeout
* Show test progress
* Increase MT library tests timeout
* Disable WBT tests with SkiaSharp
* Increase helix tests timeout on browser
* Increase WBT timeout
* Increase initial heap sizes
* Fix mono_wasm_load_runtime cwrap signature
Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`
* Enable XunitShowProgress for threading tasks tests
* Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
* Use new docker image for helix/windows tests
* Revert "Try to reduce number of parallel AOT compilations"
This reverts commit 5d9a6d2.
* Reduce the timeouts
* Reduce intitial heap size
* use active issues for MT
* Remove testing channel from nuget config, update deps
* Update emsdk and icu dependencies
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Sep 7, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range
* bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type
* bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)
* bug #4: document the fact that IOException can be thrown
* bug #5: throw SerializationException rather than OverflowException when parsing the decimal fails
* bug #6: 0 and 17 are illegal values for PrimitiveType enum
* bug #7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
AndyAyersMS pushed a commit that referenced this pull request Mar 24, 2026
…otnet#124642)
## Summary
Fixesdotnet#123621
When a constant-folded operand appears **after** a non-constant operand
in a short-circuit `&&` expression (e.g., `v == 2 && Environment.NewLine
!= "\r\n"`), callee inlining can leave dead local stores in the return
block. The `isReturnBool` lambda in `fgFoldCondToReturnBlock` required
`hasSingleStmt()`, which caused the optimization to bail out when these
dead stores were present, resulting in suboptimal branching codegen.
### Changes
- **`src/coreclr/jit/optimizebools.cpp`**: Relax the `hasSingleStmt()`
constraint in `isReturnBool` to allow preceding statements as long as
they have no globally visible side effects
(`GTF_GLOBALLY_VISIBLE_SIDE_EFFECTS`). This enables
`fgFoldCondToReturnBlock` to fold the conditional into a branchless
return even when dead local stores from inlining remain in the block.
### Before (ARM64, `Inline_After`)
```asm
cmp w0, #2
bne G_M4495_IG04
mov w0, #1
ret
G_M4495_IG04:
mov w0, #0
ret
```
### After (ARM64, `Inline_After`)
```asm
cmp w0, #2
cset x0, eq
ret
```
## Test plan
- [x] Added regression test `Runtime_123621` covering the original issue
pattern
- [x] Verified `Hoisted`, `Inline_Before`, and `Inline_After` all
produce identical branchless codegen (`cset` on ARM64)
- [x] Verified existing `DevDiv_168744` regression test still passes
- [x] Verified side-effect-ful blocks are correctly excluded from the
optimization
AndyAyersMS pushed a commit that referenced this pull request May 14, 2026
…128163)
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot.
Fixesdotnet#128044.
## Problem
createdump SIGSEGVs on Linux when generating a Heap-type minidump for a
process running interpreted code. The crash reproduces locally with the
`InterpreterStack` DumpTests debuggee and matches the CI failure that
prompted `<DumpTypes>Full</DumpTypes>` to be added as a temporary
workaround.
The faulting backtrace is:
```
#0 Thread::IsAddressInStack threads.cpp:6741
#1 Thread::EnumMemoryRegionsWorker threads.cpp:6909 (calls IsAddressInStack(currentSP))
#2 Thread::EnumMemoryRegions threads.cpp
#3 ThreadStore::EnumMemoryRegions
#4 ClrDataAccess::EnumMemDumpAllThreadsStack
#5 ClrDataAccess::EnumMemoryRegionsWorkerHeap (HEAP2-only path)
```
## Root cause
`Thread::m_pInterpThreadContext` was declared as a raw
`InterpThreadContext *`. In non-DAC code that's a normal host pointer,
but in
DAC mode the field's value is a target-process address. When
`IsAddressInStack` (a DAC-callable helper) dereferenced
`m_pInterpThreadContext->pStackStart` it read from a target-process
address
as if it were a host address, which faults inside createdump.
## Fix
Change the field type to `PTR_InterpThreadContext` (DPTR), matching the
treatment of other Thread fields like `m_pFrame`. In non-DAC builds
`DPTR(T)` is just `T*`, so there is no overhead or behavior change. In
DAC
builds the read goes through `__DPtr<T>` and marshals correctly from the
target.
Also remove the `<DumpTypes>Full</DumpTypes>` workaround on the
`InterpreterStack` DumpTests debuggee so the Heap path that originally
failed is exercised again.
## Validation
Locally reproduced the original SIGSEGV on Linux x64 with the auto-dump
mechanism (`DOTNET_DbgMiniDumpType=2` + `DOTNET_Interpreter=MethodA`)
running the `InterpreterStack` debuggee. With this fix applied,
createdump
produces a complete Heap dump (~74 MB) instead of crashing.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndyAyersMS added a commit that referenced this pull request Jun 9, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
AndyAyersMS added a commit that referenced this pull request Jun 10, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59 - #2

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994
Open

[wasm] Bump chrome for testing - linux: 118.0.5993.117, windows: 119.0.6045.59#2
github-actions[bot] wants to merge 1 commit into
mainfrom
update-chrome-version-6679964994

Conversation

@github-actions

Copy link
Copy Markdown

No description provided.

AndyAyersMS pushed a commit that referenced this pull request Nov 14, 2023
…tnet#90436)
* Enable IL trim for WASM by default
* Make ILStrip available for local build
* Make all calling another method go through the logic to see if it could call an AOT'ed version of it before trying to interp compile it
* Add back accidentally removed line of code
* Update test to accommodate IL trim with WASM AOT
* Move jit_call_can_be_supported to mini-runtime, so it doesn't depends on the value of mono_use_interpreter
* Update var name
* Attempt to fix rebuild test failures
* Attempt to fix the file open issue with unicode on windows
* Attempt to fix unicode issue #2
* Enable g_fopen to have the capability of handling opening files with unicode name on all platforms
* Add comment
* Update comment
* Fix file indentation format
* Check if string contains non-ascii char
* Remove unused callback
* Remove redundant comment
* Update method name
* Fixed some method not found issues and remove the optimization for g_fopen
* Fix tailcall
* Disable tailcall optimization when calling a trimmed method
* Free method header
* Fix windows build error
* Free method header at the correct locatioin
* Fix the condition of skipping tailcall
* Fix test failure
* Move JIT/AOT call invoke away from MINT_CALL, as it is not needed there.
* Fix virtual tail call
* Address review feedback
* Put the trimmed assemblies in a new folder, output an updated list of assemblies and update _WasmAssembliesInternal with the new list
* Put trimmed assemblies in IntermediateOutputPath
* Remove TrimmedAssemblies
* Create trimmed assembly folder before the parallel run
* Try to fix the issue with missing item
* Fix parallelism issue
* Only start the trim when the assembly is newer than the output
* Add assembly item to the list, when
* Add some logging
* Fixed runtimeconfig.json file path issue and disabed failed tests
* Update parameter name
* Fix wasi build
* Use the correct parameter
* Fix runtime test failure
* WasmAppBuilder: runtimeconfig.json path can be null
* cleanup
* ILStrip: fix typo in id name
* Cleanup
* ILStrip: ensure output assemblies are in the same order as the input. This is required for incremental builds.
* more cleanup
* Re-enable disabled tests
* Change the default value for WasmStripILAfterAOT to false
* Fix the issue with changing the value of WasmStripILAfterAOT between incremental builds
* Move the location of file deleting
* Use WasmAssembliesFinal or ResolvedFileToPublish during publish in WasmSDK
* Copy metadata in AOT compiler and when creating WasmAssembliesToBundle from ResolvedFileToPublish
* Add _WasmSatelliteAssemblies to WasmAssembliesFinal
* Add a wasm template test
* Include all non-dll ResolvedFileToPublish for ComputeWasmPublishAssets
* Add a blazor template test
* Address review feedback
* Update src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update parameter name
* Update usage of parameter
* Revert EmccCompile change
* MonoAOTCompiler: revert rebuilding when WasmStripILAfterAOT value changes
* Compress -> GZipCompress, and cleanup
* rework the tests
- to support webcil case
- run blazor app
- add cases for the default setting, and the opposite
- cleanup
* ILStrip.cs: Emit a message about stripping to make it obvious to the user
* WasmApp.targets: update comment
* Change default value to false and update test
---------
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
AndyAyersMS pushed a commit that referenced this pull request Dec 2, 2023
Fixesdotnet#95367.
Relevant part of the JitDump:
```
Using `if true` assertions from pred BB02
Assertions in: #1
fgMorphTree BB04, STMT00021 (before)
[000070] DA--------- * STORE_LCL_VAR ubyte V10 tmp9
[000057] ----------- \--* CAST int <- ubyte <- int
[000006] ----------- \--* EQ int
[000004] ----------- +--* LCL_VAR ref V02 tmp1 (last use)
[000055] H---------- \--* CNS_INT(h) ref 'Frozen EmptyPartition`1<Int32> object'
Assertion prop for index #1 in BB04:
[000006] ----------- * EQ int
GenTreeNode creates assertion:
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
In BB04 New Local Constant Assertion: V10 == [0000000000000001], index = #2
fgMorphTree BB04, STMT00021 (after)
[000070] DA---+----- * STORE_LCL_VAR ubyte V10 tmp9
[000055] H----+----- \--* CNS_INT(h) int
```
The JitDump is unfinished because the compiler crashes when trying to dump the last line. Clearly, the `CNS_INT` is no longer a handle at that point because we just bashed it to a constant 1.
AndyAyersMS pushed a commit that referenced this pull request Jan 17, 2024
…tnet#95292)
* Add IndentText json option
* Add IndentText for json source generator
* Add tests
* IndentText must be non-nullable
* Improve performance
* Add extra tests
* Cleanup
* Apply suggestions from code review
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fixes following code review
* Fixes following code review #2
* Add tests for invalid characters
* Handle RawIndent length
* Move all to RawIndentation
* Update documentation
* Additional fixes from code review
* Move to the new API
* Extra fixes and enhancements
* Fixes from code review
* Avoid introducing extra fields in JsonWriterOptions
* Fix OOM error
* Use bitwise logic for IndentedOrNotSkipValidation
* Cache indentation options in Utf8JsonWriter
* Add missing test around indentation options
* New fixes from code review
* Update src/libraries/System.Text.Json/src/System/Text/Json/Writer/Utf8JsonWriter.cs
* Add test to check default values of the JsonWriterOptions properties
* Fix comment
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Jul 16, 2024
* [wasm] Bump emscripten to 3.1.56
* Replace Module.asm with Module.wasmExports
Module.asm was removed, use wasmExports instead.
Context: emscripten-core/emscripten#19816
* Updates for .native.worker.js -> mjs rename
Context: emscripten-core/emscripten#21041
* Update deps
* Add general testing feed
* Update mode deps
* Update path
* Use current python packages for now, we don't have newer ones
The current names 3.1.34 are new enough
* Keep using llvm 16 for runtime and aot compiler
* Add -Wno-pre-c11-compat only for browser
* Temporarily disable version checks to get further
* Temporarily disable version checks to get further #2
* Disable -Wunused-command-line-argument
* Update emsdk deps
* Update icu dependency
* Revert "Temporarily disable version checks to get further #2"
This reverts commit 3f8834f.
* Revert "Temporarily disable version checks to get further"
This reverts commit fe1e5c6.
* Fix emsdk check
We use system python on osx too
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Workaround wasm-opt crash
* Fix WBT test
* Feedback
* Update ICU dependency
* Update emscripten deps
* Revert "Workaround wasm-opt crash"
This reverts commit 200cf3b.
* Revert "Workaround wasm-opt crash"
This reverts commit 4530edf.
* Revert "Workaround wasm-opt crash"
This reverts commit 3593c41.
* Increase tests timeout
* Show test progress
* Increase MT library tests timeout
* Disable WBT tests with SkiaSharp
* Increase helix tests timeout on browser
* Increase WBT timeout
* Increase initial heap sizes
* Fix mono_wasm_load_runtime cwrap signature
Fixes: `Uncaught ExitStatus: Assertion failed: stringToUTF8Array expects a string (got number)`
* Enable XunitShowProgress for threading tasks tests
* Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
* Use new docker image for helix/windows tests
* Revert "Try to reduce number of parallel AOT compilations"
This reverts commit 5d9a6d2.
* Reduce the timeouts
* Reduce intitial heap size
* use active issues for MT
* Remove testing channel from nuget config, update deps
* Update emsdk and icu dependencies
---------
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
AndyAyersMS pushed a commit that referenced this pull request Sep 7, 2024
* bug #1: don't allow for values out of the SerializationRecordType enum range
* bug #2: throw SerializationException rather than KeyNotFoundException when the referenced record is missing or it points to a record of different type
* bug #3: throw SerializationException rather than FormatException when it's being thrown by BinaryReader (or sth else that we use)
* bug #4: document the fact that IOException can be thrown
* bug #5: throw SerializationException rather than OverflowException when parsing the decimal fails
* bug #6: 0 and 17 are illegal values for PrimitiveType enum
* bug #7: throw SerializationException when a surrogate character is read (so far an ArgumentException was thrown)
AndyAyersMS pushed a commit that referenced this pull request Mar 24, 2026
…otnet#124642)
## Summary
Fixesdotnet#123621
When a constant-folded operand appears **after** a non-constant operand
in a short-circuit `&&` expression (e.g., `v == 2 && Environment.NewLine
!= "\r\n"`), callee inlining can leave dead local stores in the return
block. The `isReturnBool` lambda in `fgFoldCondToReturnBlock` required
`hasSingleStmt()`, which caused the optimization to bail out when these
dead stores were present, resulting in suboptimal branching codegen.
### Changes
- **`src/coreclr/jit/optimizebools.cpp`**: Relax the `hasSingleStmt()`
constraint in `isReturnBool` to allow preceding statements as long as
they have no globally visible side effects
(`GTF_GLOBALLY_VISIBLE_SIDE_EFFECTS`). This enables
`fgFoldCondToReturnBlock` to fold the conditional into a branchless
return even when dead local stores from inlining remain in the block.
### Before (ARM64, `Inline_After`)
```asm
cmp w0, #2
bne G_M4495_IG04
mov w0, #1
ret
G_M4495_IG04:
mov w0, #0
ret
```
### After (ARM64, `Inline_After`)
```asm
cmp w0, #2
cset x0, eq
ret
```
## Test plan
- [x] Added regression test `Runtime_123621` covering the original issue
pattern
- [x] Verified `Hoisted`, `Inline_Before`, and `Inline_After` all
produce identical branchless codegen (`cset` on ARM64)
- [x] Verified existing `DevDiv_168744` regression test still passes
- [x] Verified side-effect-ful blocks are correctly excluded from the
optimization
AndyAyersMS pushed a commit that referenced this pull request May 14, 2026
…128163)
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot.
Fixesdotnet#128044.
## Problem
createdump SIGSEGVs on Linux when generating a Heap-type minidump for a
process running interpreted code. The crash reproduces locally with the
`InterpreterStack` DumpTests debuggee and matches the CI failure that
prompted `<DumpTypes>Full</DumpTypes>` to be added as a temporary
workaround.
The faulting backtrace is:
```
#0 Thread::IsAddressInStack threads.cpp:6741
#1 Thread::EnumMemoryRegionsWorker threads.cpp:6909 (calls IsAddressInStack(currentSP))
#2 Thread::EnumMemoryRegions threads.cpp
#3 ThreadStore::EnumMemoryRegions
#4 ClrDataAccess::EnumMemDumpAllThreadsStack
#5 ClrDataAccess::EnumMemoryRegionsWorkerHeap (HEAP2-only path)
```
## Root cause
`Thread::m_pInterpThreadContext` was declared as a raw
`InterpThreadContext *`. In non-DAC code that's a normal host pointer,
but in
DAC mode the field's value is a target-process address. When
`IsAddressInStack` (a DAC-callable helper) dereferenced
`m_pInterpThreadContext->pStackStart` it read from a target-process
address
as if it were a host address, which faults inside createdump.
## Fix
Change the field type to `PTR_InterpThreadContext` (DPTR), matching the
treatment of other Thread fields like `m_pFrame`. In non-DAC builds
`DPTR(T)` is just `T*`, so there is no overhead or behavior change. In
DAC
builds the read goes through `__DPtr<T>` and marshals correctly from the
target.
Also remove the `<DumpTypes>Full</DumpTypes>` workaround on the
`InterpreterStack` DumpTests debuggee so the Heap path that originally
failed is exercised again.
## Validation
Locally reproduced the original SIGSEGV on Linux x64 with the auto-dump
mechanism (`DOTNET_DbgMiniDumpType=2` + `DOTNET_Interpreter=MethodA`)
running the `InterpreterStack` debuggee. With this fix applied,
createdump
produces a complete Heap dump (~74 MB) instead of crashing.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AndyAyersMS added a commit that referenced this pull request Jun 9, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
AndyAyersMS added a commit that referenced this pull request Jun 10, 2026
In Compiler::optNarrowTree, the GT_CAST case bails when
`tree->CastToType() != srct`. For unsigned widening casts produced by
the C# compiler (e.g. an implicit uint->long widening synthesized when
unary minus promotes uint to long), CastToType is TYP_ULONG even though
tree->TypeGet() is TYP_LONG. The strict comparison rejects narrowing,
even though both representations are bit-identical and the subsequent
transformation (rewriting an int<->long cast as an int<->int identity)
is correct for either signedness.
The user-visible effect was that patterns like
(uint)-(a >> 20)
(uint)-(a << 2)
(uint)~(ulong)(a >> 3)
failed to fold the redundant widening cast left over after morph pushes
the outer narrowing cast through GT_NEG/GT_NOT. The leftover cast
serialized as a no-op `mov w0, w0` between the shift and the negate,
preventing arm64 lowering from containing the shift into the negate:
lsr w0, w0, dotnet#20 ; was 3 instructions
mov w0, w0
neg w0, w0
Compare with the equivalent NegLSL pattern (no intermediate cast),
which already produces `neg w0, w0, LSL #2`.
Switching the comparison to `genActualType(CastToType()) != genActualType(srct)`
lets ULONG-as-cast-target match LONG-as-srct, so the inner cast is
narrowed away, lowering sees a direct NEG/MVN over the shift, and
codegen emits the single-instruction shifted form:
neg w0, w0, LSR dotnet#20
neg w0, w0, LSL #2
mvn w0, w0, LSR #3
The companion `tree->TypeIs(TYP_LONG)` check is also replaced with
`genActualType(tree) == TYP_LONG` for consistency; the two are
functionally equivalent for well-formed IR (cast nodes' TypeGet always
returns the actual type, never the unsigned variant).
Fixesdotnet#111888
Test updates in src/tests/JIT/opt/InstructionCombining/:
- Cmn.cs CmnLSR, Neg.cs NegLSR: documented the old `lsr+cmn`/`lsr+neg`
buggy codegen as expected, updated to expect the single-instruction
shifted form.
- Casts.cs CastUIntULongUInt: documented `mov w0, w0` (a no-op cast
round trip) as expected; the fix eliminates the cast entirely so the
method body has no instructions. Changed to ARM64-NOT: mov to assert
absence of the redundant move.
- Mvn.cs: added MvnCastChainLSR covering the cast-chain bug for MVN.
Co-authored-by: Andy Ayers <andya@microsoft.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants