Conversation
The bug was an uninitialized pointer field diffThisType in DerivativeRequirementDecl class (source/slang/slang-ast-decl.h line 1021). The field was declared without a default initializer: This caused crashes in release builds because the uninitialized memory contained garbage that the serializer tried to dereference. Debug builds typically zero-initialize memory, masking the bug.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical crash in release builds caused by an uninitialized pointer field in the DerivativeRequirementDecl class. The fix initializes the diffThisType pointer to nullptr and temporarily disables the neural module build in the release CI to prevent the crash until the underlying issue is fully resolved.
Changes:
- Initialized the
diffThisTypepointer field tonullptrinDerivativeRequirementDeclto prevent crashes from garbage memory values - Added a CMake option to conditionally build the neural module
- Disabled neural module build in release CI workflow as a temporary workaround
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| source/slang/slang-ast-decl.h | Initialized diffThisType pointer to nullptr to fix the uninitialized memory bug |
| source/standard-modules/CMakeLists.txt | Added SLANG_ENABLE_NEURAL_MODULE option with conditional build logic |
| .github/workflows/release.yml | Disabled neural module in release builds via CMake flag |
| # | ||
|
|
||
| # Option to enable/disable neural module build (can be disabled if it breaks CI) | ||
| # TODO: there is release CI break, so we add this flag to disable the neural module build for now. |
There was a problem hiding this comment.
Corrected 'there is release CI break' to 'there is a release CI break'.
Suggested change
| # TODO: there is release CI break, so we add this flag to disable the neural module build for now. | |
| # TODO: there is a release CI break, so we add this flag to disable the neural module build for now. |
csyonghe
approved these changes
Feb 3, 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.
Close #9864.
The bug was an uninitialized pointer field diffThisType in DerivativeRequirementDecl class (source/slang/slang-ast-decl.h line 1021). The field was declared without a default initializer:
This caused crashes in release builds because the uninitialized memory contained garbage that the serializer tried to dereference. Debug builds typically zero-initialize memory, masking the bug.