TEST: Verify clean process exit after HTTP server lifecycle#1464
Closed
EricGT wants to merge 1 commit intoSWI-Prolog:masterfrom
Closed
TEST: Verify clean process exit after HTTP server lifecycle#1464EricGT wants to merge 1 commit intoSWI-Prolog:masterfrom
EricGT wants to merge 1 commit intoSWI-Prolog:masterfrom
Conversation
Test that a process using HTTP server lifecycle (start/stop) exits cleanly without crashing. On Windows with PThreads4W, the library's DllMain(DLL_PROCESS_DETACH) runs after PL_cleanup() has freed thread data. Without explicit cleanup via pthread_win32_process_detach_np(), this causes ACCESS_VIOLATION in Debug builds where the CRT fills freed heap with 0xDD. The test spawns a subprocess that starts and stops an HTTP server, then halts. The HTTP server creates worker threads and allocates enough memory that PL_cleanup() triggers the crash in Debug builds. The parent verifies the exit code is 0 (not a crash). @see pthread_win32_process_detach_np() in src/pl-init.c
Member
|
Integrated into #1463 |
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.
Uses HTTP server start/stop pattern to reliably reproduce threading cleanup issues. Details in commit message.