Repository navigation
Conversation
✅ Release notes checked
|
|
I'm informed that: The closest clone is src/Compiler/Interactive/fsi.fs:1820,1926 : FsiDynamicCompiler has a static let mutable dynamicAssemblyId , incremented with Interlocked.Increment for emitted assembly IDs. Other stamp-like counters use module-level mutable state rather than a static type holder: src/Compiler/TypedTree/CompilerGlobalState.fs:137-144 ( uniqueCount , stampCount ) and src/Compiler/Checking/CheckRecordSyntaxHelpers.fs:177-180 ( bindId ). I found no other match combining static let mutable with Interlocked.Increment . |
a6d6e21 to
dcf59b9
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The initialization comment misleadingly claims independence from file initialization order, although supported --realsig- builds still delegate initialization to the file initializer.
1 open issue
What changed in this PR
Addresses #14225’s intermittent NullReferenceException during concurrent quotation deserialization in FSharp.Core.
Changes:
- Replaces the stamp-allocation closure with a dedicated holder using an atomic counter.
- Adds a 32-thread regression test checking successful deserialization and unique variable stamps.
- Documents the fix in the FSharp.Core release notes.
| File | Description |
|---|---|
tests/FSharp.Compiler.ComponentTests/Language/CodeQuotationTests.fs |
Adds concurrent quotation deserialization coverage. |
src/FSharp.Core/quotations.fs |
Moves variable stamp allocation into a dedicated holder. |
docs/release-notes/.FSharp.Core/11.0.200.md |
Records the concurrent-startup fix. |
Review effort: Balanced
|
|
||
| open Helpers | ||
|
|
||
| // Keep stamp allocation in an explicit type initializer, independent of this file's initialization order. |
There was a problem hiding this comment.
Suggested rewording applied. Leaving for resolution by real reviewer!
6ace506 to
4ae648c
Compare

Resolves #14225