[release/10.0] Investigating #123950#124068
Closed
jkotas wants to merge 2 commits intodotnet:release/10.0from
Closed
[release/10.0] Investigating #123950#124068jkotas wants to merge 2 commits intodotnet:release/10.0from
jkotas wants to merge 2 commits intodotnet:release/10.0from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds compile-time diagnostic checks to investigate issue #123950. The changes introduce #error directives that will fail Linux builds if the HAVE_PTHREAD_CONDATTR_SETCLOCK and HAVE_CLOCK_MONOTONIC features are not available.
Changes:
- Added
#errordirectives in the fallback code paths for pthread condition attribute initialization on Linux - These checks are placed in two synchronization-related files: System.Native threading primitives and CoreCLR's synchronization manager
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/native/libs/System.Native/pal_threading.c | Added compile-time error check in SystemNative_LowLevelMonitor_Create to verify pthread_condattr_setclock is available on Linux |
| src/coreclr/pal/src/synchmgr/synchmanager.cpp | Added compile-time error check in CThreadSynchronizationInfo::InitializePreCreate to verify pthread_condattr_setclock is available on Linux |
jkotas
commented
Feb 6, 2026
jkotas
commented
Feb 6, 2026
jkotas
commented
Feb 6, 2026
| #ifdef __linux__ | ||
|
|
||
| #if !HAVE_CLOCK_MONOTONIC | ||
| //#error HAVE_CLOCK_MONOTONIC missing |
There was a problem hiding this comment.
This commented-out error directive should either be removed or uncommented. Having commented-out preprocessor error directives in the codebase can be confusing and suggests incomplete investigation work. If this check is needed, it should be active; if not, it should be removed entirely.
Suggested change
| //#error HAVE_CLOCK_MONOTONIC missing |
jkotas
commented
Feb 6, 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.
No description provided.