feat: prepare v3.5.0 public FIXED cache and reliable benchmarks - #91
Merged
Merged
Conversation
| def send_group(pgid, sig): | ||
| try: | ||
| os.killpg(pgid, sig) | ||
| except ProcessLookupError: |
| target = os.readlink(fd) | ||
| if target.startswith('anon_inode:'): | ||
| fds[target] = fds.get(target, 0) + 1 | ||
| except (FileNotFoundError, ProcessLookupError): |
| response = connection.getresponse() | ||
| response.read() | ||
| ready = response.status == 200 | ||
| except (OSError, http.client.HTTPException): |
| type(first[k]) is int and type(last[k]) is int and last[k] >= first[k] | ||
| for k in first): | ||
| csw = sum(last[k] - first[k] for k in first) | ||
| except (KeyError, TypeError, ValueError): |
| from pathlib import Path | ||
| import subprocess | ||
| import tempfile | ||
| import unittest |
Member
|
In X.Y.Z version tag, Z is for urgent patches and critical issue. How about making a roadmap for v3.5 and unify it? |
Collaborator
Author
|
Agreed, @gg582. Let us target v3.5.0 instead of v3.4.2 and put the public FIXED cache, API changes, and benchmark work into one release roadmap. The TCP, sanitizer, and CI checks must still pass before release. We will then measure the released version and publish the results. The version change does not mean that #25 is resolved. |
Collaborator
Author
|
@gg582 unlock draft when you're ready to release :) |
gg582
marked this pull request as ready for review
September 14, 2026 13:15
gg582
added a commit
that referenced
this pull request
Sep 14, 2026
… GC scope Found while running the full test suite before cutting v3.5: the already-merged #109 (cwist_realloc() full-GC tracking fix) made cwist_realloc(NULL, ...) auto-track under full-GC, matching cwist_alloc()'s behavior -- correct in general, but it exposed a real latent bug in scheduler.c's heap_grow(), which relies on cwist_realloc() to grow s->heap from its initial NULL. s->heap is owned by the cwist_scheduler_t for its whole lifetime, not by whichever caller thread happens to trigger a resize. Left tracked on that thread's full-GC pending-sweep list, the thread exiting would have the sweep free the scheduler's own live heap array out from under it -- a real use-after-free, just waiting on a thread-exit timing window rather than a double-free like #109's bug. test_gc_job_handoff.c's own comment documented the old assumption explicitly: 'allocated by cwist_realloc, which is deliberately not scope-tracked' -- that was only ever true by accident, because the pre-#109 cwist_realloc() never tracked anything at all. Disown the grown heap immediately after cwist_realloc() returns it (matching the same handoff pattern used everywhere else this session), and update the stale comment. Reproduced the failure (actual=2 expected=1, a double-count from the same array being independently freed and allocated to by the sweep) at bare 739bafc (the #91 merge point, before any of this branch's other cherry-picks) to confirm this predates and is independent of them. 5/5 clean runs after the fix.
gg582
added a commit
that referenced
this pull request
Sep 14, 2026
… GC scope Same fix as main's f2404f4, minus the test (dev doesn't have tests/test_gc_job_handoff.c -- that's specific to #91's public-FIXED-cache work, main-only). The underlying bug is independent of that feature: dev already has #109's cwist_realloc() full-GC tracking fix, so heap_grow()'s cwist_realloc(NULL, ...) call has had this exact same latent use-after-free risk since #109 landed here too. Cherry-pick also needed a fixup: the #include <cwist/core/mem/gc.h> line present in main's scheduler.c wasn't in dev's version yet, so cwist_full_gc_enabled()/cwist_gc_scope_disown() weren't declared -- added it. Rebuilt clean; test_scheduler passes, malloc-baseline gate passes unchanged.
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.
Release hold
Do not publish v3.5.0 until the separately developed CVE fixes are included and their associated issue(s) resolved. This condition applies even if this PR and CI pass. The exact dependent issue/PR identifiers still need confirmation; missing identifiers do not waive the hold.
Summary
Verification
5b128f1178df374ee5bc3db1aba8f921a6af7d68: Linux ASan/UBSan, source distribution, interop and benchmark jobs passed; macOS C1M TCP failed with a receive timeout.Remaining gates
Roadmap:
docs/roadmap-v3.5.md. Related: #25, #85, #87.