Repository navigation
Conversation
On x86 Unix, caller-pop conventions leave argument cleanup to the caller. Recording lvaParameterStackSize in the JIT32 GC info header made the runtime compute the caller SP too high by that amount. Funclet parent-frame matching (m_csfEHClause) then failed, which showed up as double GC reporting and stale object references. On a FreeBSD i386 box, a minimal repro (async + finally + exception under DOTNET_GCStress=0x1) passes 5/5 with this change and fails with the stock JIT. Co-authored-by: kdenv2604 <[email protected]>
TransitionFrame unwinding added the stack arg size to the caller SP, which put the funclet's caller SP 4 bytes off from ExInfo.m_csfEHClause after a prestub call inside a finally funclet. Funclet parent lookup then failed, the parent frame got GC-reported twice (CheckDoubleReporting assert), and a stale slot crashed after compaction. Same root cause as the previous JIT commit. Verified on FreeBSD i386: the Host test under DOTNET_GCStress=0x1 crashes 3/3 stock and 0 fixed, and the ehrepro double-report assert reproduces 0/3 stock and 3/3 fixed. Co-authored-by: kdenv2604 <[email protected]>
Calls created after import (rationalizer HW-intrinsic user-call fallback, async helpers, special copy helper, tail-call dispatcher) did not get GTF_CALL_POP_ARGS, so the caller never popped stack args. On CPUs without SSE4.2 (Celeron M 420), Vector128.ExtractMostSignificantBits<short> falls back to a call in SpanHelpers.LastIndexOfValueType SimdImpl, leaving 16 bytes on the stack; the epilog then pops the compare mask into ebp and returns to 0. Verified on a physical Celeron M 420 with FreeBSD 14.5 i386: the packer, the Host and the full GUI end-to-end run through the Capsicum worker pass without DOTNET_EnableHWIntrinsic=0, and the regression on the VM is unchanged. Co-authored-by: kdenv2604 <[email protected]>
Use the native FreeBSD widths for C long, virtual sizes, and pointers in kinfo_proc and rusage. Keep fixed-width kernel fields and the 64-bit process ABI. (cherry picked from commit 1000e28b829bf801b796ee8652046183c7556ffc)
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Member
|
I am sorry - enabling new OS/architecture combinations does not meet a bar for release branches. |
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to dotnet/runtime#114705.
Description
Enable building .NET 10 CoreCLR on FreeBSD 14 i386 with the
freebsd-x86RID. The port covers the FreeBSD PAL context and native calling conventions, x86 caller-pop stack accounting in the JIT and GC unwinder, and native-width FreeBSD process fields used bySystem.Diagnostics.Process.This proposal targets
release/10.0, which still contains Unix x86 CoreCLR. The corresponding code was removed frommainin #137008. I would appreciate maintainer guidance on the appropriate branch for the port.Customer impact
A runtime-only distribution would let community users run .NET 10 applications on existing FreeBSD 14 i386 machines, including 32-bit hardware with SSE2/SSE3 and without SSE4.2.
Regression
This is a platform bring-up. On the physical test system the initial port built successfully but hit
SIGSEGVduring managed application startup. The caller-pop fixes in this series resolved the tested startup failure.Testing
Built .NET 10.0.16 from the exact PR head
fec45a4ba168936dd80b5d8145279b3b286fb354. CoreCLR, the native host, and the native libraries were built in Release on FreeBSD 14.4 i386. The managed framework was built forfreebsd-x86with .NET SDK 10.0.403. Both test runs used a fresh extraction of the resulting runtime package without an SDK or hardware-intrinsic overrides.procstatreported Capsicum mode for the worker.procstatreported Capsicum mode for the worker.These are downstream RU-SAR 0.6.11 build 21 application runs against the runtime built from the PR head.
Risk
This series changes low-level stack handling on Unix x86 and process-layout marshalling on FreeBSD. I would welcome targeted review of the x86 calling convention and the FreeBSD native field widths. The validation above covers i386 on FreeBSD 14.4 and 14.5.