Skip to content

Commit f564983

Browse files
Merge main
2 parents 2f49693 + e0bfb35 commit f564983

344 files changed

Lines changed: 17006 additions & 10827 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/project/list-of-diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ The diagnostic id values reserved for .NET Libraries analyzer warnings are `SYSL
274274
| __`SYSLIB1226`__ | 'JsonIgnoreCondition.Always' is not valid on type-level 'JsonIgnoreAttribute' annotations. |
275275
| __`SYSLIB1227`__ | Union case types cannot be unambiguously classified by JSON value type. |
276276
| __`SYSLIB1228`__ | Union type shape is not a valid C# union. |
277-
| __`SYSLIB1229`__ | _`SYSLIB1220`-`SYSLIB1229` reserved for System.Text.Json.SourceGeneration._ |
277+
| __`SYSLIB1229`__ | Open generic derived type could not be resolved for the polymorphic base type. |
278278
| __`SYSLIB1230`__ | Deriving from a `GeneratedComInterface`-attributed interface defined in another assembly is not supported. |
279279
| __`SYSLIB1231`__ | _`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator._ |
280280
| __`SYSLIB1232`__ | _`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator._ |

eng/AcquireWasiSdk.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<Project>
99
<PropertyGroup>
10-
<_WasiSdkVersion>25.0</_WasiSdkVersion>
10+
<_WasiSdkVersion>33.0</_WasiSdkVersion>
1111
<_RuntimeLocalWasiSdkPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'wasi-sdk'))</_RuntimeLocalWasiSdkPath>
1212
</PropertyGroup>
1313

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
<Antlr4BuildTasksVersion>12.14.0</Antlr4BuildTasksVersion>
143143
<Antlr4RuntimeStandardVersion>4.13.1</Antlr4RuntimeStandardVersion>
144144
<!-- Testing -->
145-
<MicrosoftNETCoreCoreDisToolsVersion>1.6.0</MicrosoftNETCoreCoreDisToolsVersion>
145+
<MicrosoftNETCoreCoreDisToolsVersion>1.7.0</MicrosoftNETCoreCoreDisToolsVersion>
146146
<MicrosoftNETTestSdkVersion>17.4.0-preview-20220707-01</MicrosoftNETTestSdkVersion>
147147
<MicrosoftOneCollectRecordTraceVersion>0.1.33421</MicrosoftOneCollectRecordTraceVersion>
148148
<NUnitVersion>3.12.0</NUnitVersion>

eng/native/gen-buildsys.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if /i "%__Arch%" == "wasm" (
7070
set "WASI_SDK_PATH=%__repoRoot%\artifacts\wasi-sdk"
7171
)
7272
set __CmakeGenerator=Ninja
73-
set __ExtraCmakeParams=%__ExtraCmakeParams% -DCLR_CMAKE_TARGET_OS=wasi "-DCMAKE_TOOLCHAIN_FILE=!WASI_SDK_PATH!/share/cmake/wasi-sdk-p2.cmake" "-DCMAKE_CROSSCOMPILING_EMULATOR=node --experimental-wasm-bigint --experimental-wasi-unstable-preview1"
73+
set __ExtraCmakeParams=%__ExtraCmakeParams% -DCLR_CMAKE_TARGET_OS=wasi "-DCMAKE_TOOLCHAIN_FILE=!WASI_SDK_PATH!/share/cmake/wasi-sdk-p2.cmake"
7474
)
7575
) else (
7676
set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_SYSTEM_VERSION=10.0"

eng/native/gen-buildsys.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ if [[ "$host_arch" == "wasm" ]]; then
115115
exit 1
116116
fi
117117
fi
118-
cmake_extra_defines_wasm=("-DCLR_CMAKE_TARGET_OS=wasi" "-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_PATH}/share/cmake/wasi-sdk-p2.cmake" "-DCMAKE_CROSSCOMPILING_EMULATOR=node --experimental-wasm-bigint --experimental-wasi-unstable-preview1")
118+
cmake_extra_defines_wasm=("-DCLR_CMAKE_TARGET_OS=wasi" "-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_PATH}/share/cmake/wasi-sdk-p2.cmake")
119119
else
120120
echo "target_os was not specified"
121121
exit 1

eng/testing/BrowserVersions.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project>
22
<PropertyGroup>
3-
<linux_ChromeVersion>148.0.7778.96</linux_ChromeVersion>
4-
<linux_ChromeRevision>1610480</linux_ChromeRevision>
5-
<linux_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1610483</linux_ChromeBaseSnapshotUrl>
6-
<linux_V8Version>14.8.178</linux_V8Version>
3+
<linux_ChromeVersion>149.0.7827.53</linux_ChromeVersion>
4+
<linux_ChromeRevision>1625079</linux_ChromeRevision>
5+
<linux_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1625084</linux_ChromeBaseSnapshotUrl>
6+
<linux_V8Version>14.9.207</linux_V8Version>
77
<macos_ChromeVersion>143.0.7499.40</macos_ChromeVersion>
88
<macos_ChromeRevision>1536371</macos_ChromeRevision>
99
<macos_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Mac_Arm/1536376</macos_ChromeBaseSnapshotUrl>

eng/testing/tests.wasi.targets

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--wasi --engine-arg=tcp</_XHarnessArgs>
5151
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--wasi --engine-arg=udp</_XHarnessArgs>
5252
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--wasi --engine-arg=allow-ip-name-lookup</_XHarnessArgs>
53+
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--wasi --engine-arg=hostcall-fuel=4294967295</_XHarnessArgs>
5354
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--env --engine-arg=DOTNET_WASI_PRINT_EXIT_CODE=1</_XHarnessArgs>
5455
<_XHarnessArgs Condition="'$(WasmXHarnessArgsCli)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgsCli)</_XHarnessArgs>
5556

@@ -87,6 +88,13 @@
8788
<PropertyGroup Condition="'$(BuildAOTTestsOnHelix)' != 'true'">
8889
<WasmBuildOnlyAfterPublish>true</WasmBuildOnlyAfterPublish>
8990

91+
<!-- Test projects are libraries (OutputType=Library), for which WasmGenerateAppBundle defaults to false.
92+
Unlike browser (where the WebAssembly SDK bundles via static web assets), wasi has no such SDK, so the
93+
in-tree WasiAppBuilder must run to populate the AppBundle. Force it on for local wasi test builds.
94+
Set unconditionally: WasmApp.Common.targets is imported earlier and already defaulted this to 'false',
95+
so a '== ''' guard would not take effect. A '/p:' override remains a global property and still wins. -->
96+
<WasmGenerateAppBundle>true</WasmGenerateAppBundle>
97+
9098
<!-- wasm's publish targets will trigger publish, so we shouldn't do that -->
9199
<PublishTestAsSelfContainedDependsOn />
92100
<WasmNestedPublishAppDependsOn>PrepareForWasiBuildApp;$(WasmNestedPublishAppDependsOn)</WasmNestedPublishAppDependsOn>

src/coreclr/debug/daccess/dacdbiimpl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6052,7 +6052,8 @@ HRESULT STDMETHODCALLTYPE DacDbiInterfaceImpl::GetThreadOwningMonitorLock(VMPTR_
60526052

60536053
DWORD threadId = 0;
60546054
DWORD recursionCount = 0;
6055-
BOOL isLockHeld = pObj->GetHeader()->PassiveGetSyncBlock()->TryGetLockInfo(&threadId, &recursionCount);
6055+
SyncBlock* psb = pObj->GetHeader()->PassiveGetSyncBlock();
6056+
BOOL isLockHeld = psb != NULL && psb->TryGetLockInfo(&threadId, &recursionCount);
60566057

60576058
if (!isLockHeld)
60586059
{

src/coreclr/dlls/mscoree/exports.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ int coreclr_initialize(
262262
&hostContract);
263263

264264
#ifdef TARGET_UNIX
265-
DWORD error = PAL_InitializeCoreCLR(exePath, g_coreclr_embedded);
265+
DWORD error = PAL_InitializeCoreCLR(g_coreclr_embedded);
266266
hr = HRESULT_FROM_WIN32(error);
267267

268268
// If PAL initialization failed, then we should return right away and avoid

src/coreclr/inc/coredistools.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ enum TargetArch {
4343
Target_Arm64,
4444
Target_LoongArch64,
4545
Target_RiscV64,
46+
Target_Wasm32,
4647
};
4748

4849
struct CorDisasm;
@@ -191,6 +192,44 @@ typedef void __cdecl DumpDiffBlocks_t(const CorAsmDiff *AsmDiff,
191192
const uint8_t *Bytes2, size_t Size2);
192193
DllIface DumpDiffBlocks_t DumpDiffBlocks;
193194

195+
// "Framed" variants -- intended for Target_Wasm32 today, where the JIT writes
196+
// the code buffer as a sequence of length-prefixed Wasm function/funclet
197+
// bodies rather than a flat instruction stream.
198+
//
199+
// Layout of each record:
200+
// [ULEB128 body_size_in_bytes][body bytes]
201+
//
202+
// Each body begins with the standard Wasm locals declaration
203+
// [ULEB128 num_local_decls][(ULEB128 count, u8 valtype)*]
204+
// followed by the opcode stream (which is expected to end with the outer
205+
// function's `end` opcode 0x0B).
206+
//
207+
// The OffsetComparator callback is invoked with BlockOffset set to the byte
208+
// offset of the current instruction's *opcode byte*, measured from the start
209+
// of the whole framed buffer (Bytes). This matches the offsets used by the
210+
// JIT-recorded relocation tables, so callers can look up reloc kind / target
211+
// directly without further bookkeeping.
212+
//
213+
// The non-framed entry points (NearDiffCodeBlocks, DumpCodeBlock,
214+
// DumpDiffBlocks) automatically delegate to these framed implementations
215+
// when the configured target architecture is Target_Wasm32.
216+
typedef bool __cdecl NearDiffCodeBlocksFramed_t(const CorAsmDiff *AsmDiff,
217+
const void *UserData,
218+
const uint8_t *Address1,
219+
const uint8_t *Bytes1, size_t Size1,
220+
const uint8_t *Address2,
221+
const uint8_t *Bytes2, size_t Size2);
222+
DllIface NearDiffCodeBlocksFramed_t NearDiffCodeBlocksFramed;
223+
224+
typedef void __cdecl DumpCodeBlockFramed_t(const CorDisasm *Disasm,
225+
const uint8_t *Address, const uint8_t *Bytes, size_t Size);
226+
DllIface DumpCodeBlockFramed_t DumpCodeBlockFramed;
227+
228+
typedef void __cdecl DumpDiffBlocksFramed_t(const CorAsmDiff *AsmDiff,
229+
const uint8_t *Address1, const uint8_t *Bytes1, size_t Size1,
230+
const uint8_t *Address2, const uint8_t *Bytes2, size_t Size2);
231+
DllIface DumpDiffBlocksFramed_t DumpDiffBlocksFramed;
232+
194233
// Get a pointer to the buffered output buffer.
195234
typedef const char* __cdecl GetOutputBuffer_t();
196235
DllIface GetOutputBuffer_t GetOutputBuffer;

0 commit comments

Comments
 (0)