Repository navigation
fix: purge-holes secure guard-page segfault, C++ test scope, scavenger-polluted pacing test (#618) - #622
Merged
Conversation
…luted pacing test (#618) - page-holes.c: mi_page_discard_slack ran its range to the end of the slices, over the MI_SECURE>=5 trailing PROT_NONE guard page; the scavenger's eager-zero memset there segfaulted (idle-thread-releases- large-page, deterministic in a secure C++ build). Stop before the guard, as arena.c's page_noguard_size does. - test-purge-holes.c: scope test_owner_sweep_pacing's measurement locals so its early goto done is valid C++ (MI_USE_CXX); reads unchanged. - new-thread-does-not-sweep-at-once counted process-wide discards, so a background scavenger sweep of thread A's page during C's life was charged to C (loaded: 33/144 fail at 227eef0; 0/144 with the scavenger off). Run it in its own process with no scanner (test-new-thread-pacing, static builds), as test-reserved-page-reuse does. Split out of the rejected V7 draft #616 so the fixes land on their own.
Local-Gate: v1 tree=4e8686a912585756840b5a6d1bb1f4a6993c6a78 secs=73 lanes=lint:run
Ci-Attestation: {"at":1792738979,"gate":"python/all/lint","host":"linux-x86_64","key":"a205b85527b6c381cb0d7b1b8f84a8462b6b50492a47b48b07c583ea0879eb00","lane":"lint","parents":["322fd8352a89f7ed4d063c486a8a4742d0cb2c37"],"secs":73,"stamp":"8bfbb21af4ce30960798d94dba866ac8","tree":"4e8686a912585756840b5a6d1bb1f4a6993c6a78","v":1,"via":"run"}
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.
Closes #618. The fixes from draft #616, split out because V7 itself was rejected (see #616). All three defects reproduce on
main(227eef0); none depends on V7.mi_page_discard_slackran its range up to the end of the slices, which includes the MI_SECURE≥5 trailing PROT_NONE guard page. The scavenger's eager-zeromemsetthere segfaulted every time (idle-thread-releases-large-page, secure C++ build; backtrace in fix: resolve purge-test C++ compilation and pacing validation blockers #618). The range now stops before the guard page, matchingpage_noguard_sizeinarena.c. RED: SIGSEGV 3/3. GREEN: 32/32, 3/3 runs.test_owner_sweep_pacing's earlygoto donecrossed initialized locals, which C++ rejects (MI_USE_CXX). An inner scope fixes it; reads, checks and cleanup are unchanged. RED: compile error at line 1939. GREEN: compiles.new-thread-does-not-sweep-at-oncecounted process-wide discards, so a background scavenger sweep was charged to thread C. Under load: 33/144 failures at 227eef0, 0/144 with the scavenger off. The test now runs in its own process with no scanner (test-new-thread-pacing, static builds), liketest-reserved-page-reuse. The thresholds are unchanged, and the background-release cases still run with the scavenger on.Local: Release 70/70, shared 38/38, secure C++ purge-holes 3/3 runs, plus the ctest runs on #616's head (owner-gate Debug 86/86). The same fixes passed #616's full PR CI, including native MSVC and win-gnu. C and Rust vendor are in separate commits. Local gate passed.
Not fixed here: #619 (test-fork-locks C++ link failure, pre-existing).
🤖 Generated with Claude Code