Skip to content

tests/server: fix initialization on Windows Vista+#19973

Closed
vszakats wants to merge 3 commits intocurl:masterfrom
vszakats:wservinit
Closed

tests/server: fix initialization on Windows Vista+#19973
vszakats wants to merge 3 commits intocurl:masterfrom
vszakats:wservinit

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Dec 14, 2025

Make sure to call curlx_now_init() before the first call to
curlx_now().

Before this patch the first curlx_now() used the non-Vista code path
calling GetTickCount() on Vista+. This is harmless, but the upcoming
PR #18009 is going to drop the non-Vista code path, causing a division
by zero at startup in test servers, without this fix.

Bug: #18009 (comment)

Make sure to call `curlx_now_init()` before the first call to
`curlx_now()`.

Bug: curl#18009 (comment)
@vszakats vszakats added tests Windows Windows-specific labels Dec 14, 2025
@vszakats
Copy link
Member Author

Confirmed fixing PR #18009 with Vista+-only code path:
https://github.com/curl/curl/actions/runs/20215925672/job/58028836456?pr=18009

@vszakats vszakats changed the title tests/server: fix initialization on Windows tests/server: fix initialization on Windows Vista+ Dec 15, 2025
@vszakats vszakats closed this in b10b7c1 Dec 15, 2025
@vszakats vszakats deleted the wservinit branch December 15, 2025 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

1 participant