Skip to content

Commit 109ebb3

Browse files
Copilotjkotas
andauthored
Fix #123950: Add missing HAVE_CLOCK_MONOTONIC to config.h.in (#124086)
Fixes issue #123950 where Task.Delay freezes when system time jumps backwards on .NET 10 Linux - a regression from .NET 8 and 9. The root cause was a missing `#cmakedefine01 HAVE_CLOCK_MONOTONIC` directive in `src/coreclr/pal/src/config.h.in`. While CMake was successfully detecting monotonic clock support, the configuration value was never propagated to the generated config.h header. This caused the runtime to fall back to wall-clock time (CLOCK_REALTIME) instead of monotonic clocks (CLOCK_MONOTONIC), making timing operations vulnerable to system time adjustments. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
1 parent 1c69782 commit 109ebb3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/coreclr/pal/src/config.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
#cmakedefine01 HAVE_WORKING_GETTIMEOFDAY
8888
#cmakedefine01 HAVE_WORKING_CLOCK_GETTIME
8989
#cmakedefine01 HAVE_CLOCK_THREAD_CPUTIME
90+
#cmakedefine01 HAVE_CLOCK_MONOTONIC
9091
#cmakedefine01 HAVE_PTHREAD_CONDATTR_SETCLOCK
9192
#cmakedefine01 MMAP_ANON_IGNORES_PROTECTION
9293
#cmakedefine01 ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS

0 commit comments

Comments
 (0)