Skip to content

Meta: hardening pass - exception safety, container correctness, and object-model safety #763

Open

Description

@Dikluwe

Purpose

This issue is the coordination index for the current hardening work. Several PRs are stacked or touch the same legacy containers and path implementation files.

Detailed design and review discussion belongs in each pull request. This issue tracks dependency order, readiness, and merge progress. Status refreshed on 2026-10-07. Each line states whether a PR is merged or still open; the 19 follow-ups below include six dependent drafts. Passing checks and a clean merge status do not imply review approval. Recheck conflicts after every merge.

Working rules

  • Review dependent PRs before prerequisites merge if useful, but merge only after their prerequisites are integrated and the branch is refreshed and validated.
  • After a prerequisite merges, refresh its direct child from master, rerun focused validation, and update this checklist.
  • Review overlapping SoPath changes sequentially even when they are logically independent.

Dependency map

SbHash:  #750 (merged) -> #751 (merged) -> #752 (merged) -> #753 (merged) -> #754 (merged) -> #755
GL:      #756 (merged) -> #757 (merged) -> #758
Bump:    #759 (merged) -> #760 (merged)
OOM:     #769 + #770 -> #771 -> #772
                       #754 -------> #772

#770 is independent of #769 in Git history. #771 includes both prerequisite histories. #772 includes #771 and now #754; it should merge after both. #758 depends only on #757. The final #760 scope has no dependency on #755 or #758.

SbHash stack

SbList, SbSmallMap, and GL-context stack

SoPath and object-model hardening

These fixes are mostly independent in intent but overlap in SoPath and related implementation files. Review the remaining PRs sequentially from master and recheck conflicts after each merge.

The #746 and #747 regression registrations live in separate files under testsuite/regressions/, loaded by RegressionTests.cmake; both are now in master.

Resolved prerequisites

Independent and OOM PRs

Next merge steps

Current integration lab (2026-10-07)

lab/open-prs-integration at 48423165217c17abc2dddae8b0878c15a354a7b5 contains master fc2d9cc256b591160b916290fe4fe442ae128790 plus the exact heads of all 32 currently open PRs (30 from Dikluwe and two external). All 19 follow-ups #775–#793 are included. The head is published on the Dikluwe fork. Linux Debug shared and Release static builds in RAM each passed 120/120 CTests. Conflict resolutions exist only in the lab merges; PR heads were unchanged.

Submission order: 19 CC/Sb follow-ups (updated 2026-10-07)

These are the 19 original local codex/pre-pr/* candidates. All have now been submitted as PRs. #775–#787 are ready for review; #788–#793 remain drafts because they carry explicitly declared prerequisite histories. The numbers preserve the planned dependency order. Refresh stacked drafts after prerequisites merge, then request review of their own remaining diffs. As of 2026-10-07, all six dependent drafts are mergeable against current master and each passed 9/9 CI checks; #793 required an ABI preservation follow-up (f623dfaf13) before that result.

Group 1 — independent fixes and test infrastructure

  1. codex/pre-pr/bump-fixture-static — PR #775, isolated static-test fixture correction; land before branches whose static tests use it.
  2. codex/pre-pr/sbheap-cancel-contract — PR #776, isolated contract documentation; CI passed, including Windows.
  3. codex/pre-pr/sblist-value-bounds — PR #777, after the already merged Make SbList growth exception safe #756; CI passed, including Windows.
  4. codex/pre-pr/sbplist-bounds — PR #778, after the already merged Make SbPList growth exception safe #740; CI passed, including Windows.
  5. codex/pre-pr/callback-list-copy-stress — PR #779, focused copy/lifetime regression; CI passed, including Windows.
  6. codex/pre-pr/profiler-stats-lifetime — PR #780, profiler action-data lifetime and insertion ownership; CI passed, including Windows.

Group 2 — containers and dictionaries

  1. codex/pre-pr/cc-list-bounds — PR #786, isolated bounds delta; refresh after OOM stack through Handle OOM in cc_dict consumers and supporting primitives #772.
  2. codex/pre-pr/cc-dict-complete — draft PR #789, stacked on Define the SbHash noexcept hash contract #753, Relink SbHash entries during resize #754 and Relink cc_dict entries and preserve state on resize allocation failure #769–Handle OOM in cc_dict consumers and supporting primitives #772 plus fixture Fix duplicate bump fixture global in static builds #775; refresh after prerequisites merge.
  3. codex/pre-pr/cc-hash-complete — draft PR #790, stacked on Complete cc_dict hash exception and capacity contracts #789; refresh after the shared prime helper lands.
  4. codex/pre-pr/sbdict-complete — draft PR #791, stacked on Complete cc_dict hash exception and capacity contracts #789; refresh after cc_dict completion.
  5. codex/pre-pr/sbhash-complete — draft PR #792, stacked on Define the SbHash noexcept hash contract #753–Defer SbHash storage allocation #755, Relink cc_dict entries and preserve state on resize allocation failure #769–Handle OOM in cc_dict consumers and supporting primitives #772 and fixture Fix duplicate bump fixture global in static builds #775; remove duplicate shared prime helper after Complete cc_dict hash exception and capacity contracts #789 lands.
  6. codex/pre-pr/sbsmallmap-complete — PR #781, isolated type contract and failure coverage; CI passed, including Windows. The static fixture is tracked separately in Fix duplicate bump fixture global in static builds #775.

Group 3 — map consumers and rendering

  1. codex/pre-pr/glglue-lifetime-complete — PR #787, own lifetime delta; lab preserved Handle OOM in cc_dict consumers and supporting primitives #772 OOM insertion check, refresh this line after Handle OOM in cc_dict consumers and supporting primitives #772 merges.
  2. codex/pre-pr/gl-contexts-small-complete — draft PR #793, stacked on Use SbSmallMap for small GL context caches #758, Complete SbSmallMap equality contract and failure coverage #781 and fixture Fix duplicate bump fixture global in static builds #775; refresh to retain only the GL context follow-up.
  3. codex/pre-pr/action-apply-exceptions — PR #782, isolated action state restoration; CI passed, including Windows.
  4. codex/pre-pr/gl-render-exceptions — draft PR #788, stacked on #782. Pure master fails its GL regression (80/81); stack with Restore SoAction state when traversal throws #782 passes (82/82), as does the lab (107/107). Refresh after Restore SoAction state when traversal throws #782 merges.

Group 4 — overlapping bump-cache changes, sequentially

  1. codex/pre-pr/bump-cache-ready-path — PR #783, ready path first; CI passed, including Windows.
  2. codex/pre-pr/bump-cache-diagnostics-memory — PR #784, own diff; merge after Avoid bump diagnostic setup on ready cache requests #783, then refresh. CI passed, including Windows.
  3. codex/pre-pr/bump-shared-programs — PR #785, own diff; merge after Avoid bump diagnostic setup on ready cache requests #783 and Reduce bump cache diagnostic memory #784. Combined lab gate resolved initializer and diagnostic test expectation; carry resolution into Share validated bump programs across renderers #785 after prerequisites land. CI passed, including Windows.

The two SCXML alias branches belong to the separate XML workstream and are outside this CC/Sb submission queue.

Publication gate for each item: transport the current head to Windows and record its result; refresh a PR branch on its actual target master; verify that its PR diff contains only its own contribution (and the explicitly stated prerequisite history for a stacked draft); compile and run focused and full tests on that target. Also validate the candidate in a separate temporary lab/teste/<topic> worktree against the fixed lab/open-prs-integration composition recorded in docs/CONTROLE_BRANCHES.md, using RAM for builds. Record base/change SHAs, commands and results, fix and repeat on failure, then remove the temporary copy. Open as draft after these gates, then request review when ready.

XML and SCXML PR family (2026-10-07)

This is a separate workstream from the 19 CC/Sb follow-ups above. Independent changes are open and ready for review: #794, #795, #797–#803, and #804–#808. The #804 SARIF-upload failure was transient: an empty commit reran CI without changing the tree or PR diff, and all 9/9 checks now pass (ABI, CodeQL, and all platform jobs). Ready for review does not imply maintainer approval.

Dependent drafts and merge order:

Sequence Draft Refresh after prerequisite merges
#795 → #796 Bundled Expat 2.9.0; #795 selects the matching header Remove #795 history from the #796 diff
#808 → #809 DOM comparison, null CDATA regression, ASan/UBSan/libFuzzer harness Retain only the #809 contribution
#801 → #810 → #811 Length guard, then opt-in parser resource limits Refresh each direct child in order; retain only its own contribution

The three new drafts #809–#811 were tested both on their declared stacked destination histories and in separate temporary cumulative lab worktrees. Full Linux CTest totals: #809 85/85 (stack) and 124/124 (lab), #810 86/86 and 124/124, #811 87/87 and 125/125. #809 also passed a 100-run Clang/ASan/UBSan/libFuzzer smoke. All builds were in RAM. Remote CI has now passed 9/9 checks on each draft (ABI, CodeQL, Ubuntu, Windows, and macOS). The local-only lab/open-prs-integration now ends at 4944c772ed066453a89da8acb35cea64ccf498e1; this newer XML integration head was not pushed to the fork. Recheck conflicts and CI after each prerequisite merge.

Base and data structures: candidates 14–21 published (2026-10-09)

These eight follow-ups are now submitted. All remain open. #827 and #831 are ready for review; the other six remain drafts because they include prerequisite histories. Ready for review and passing CI do not imply maintainer approval.

Candidate PR and scope Status Direct prerequisites
14 #825 — abort safely on cc_rbptree node allocation failure Draft #772
15 #826 — safe traversal when callbacks mutate auditors Draft #772, #813
16 #827 — cleanup registration lifetime and reentrant shutdown Ready for review Independent
17 #828 — atomic standard-stream initialization and descriptor ownership on failure Draft #827
18 #829 — handle unavailable standard streams in consumers Draft #828
19 #830 — sticky read-error status and compressed errors distinguished from EOF Draft; ABI check requires review #829
20 #831 — preserve callback-list state when insertion throws Ready for review Independent
21 #832 — strong exception guarantee for callback-list copy and assignment Draft #831

Dependency and refresh order

#772 ------------> #825
#772 + #813 ------> #826 ------> #823 (existing draft)
#827 ------------> #828 ------> #829 ------> #830
#831 ------------> #832

#823 now explicitly declares #826 as a prerequisite. After each prerequisite merges, refresh its direct child from master, retain its own contribution, rerun focused and full validation, and recheck conflicts. Keep #830 in draft until its prerequisite and ABI review are resolved.

Validation at the published heads

The final local cumulative publication lab is lab/open-prs-integration at d7f08bae8c9b0091789474b334a3dca81de3be3e: 35/35 focused tests and 153/153 full CTests, no skips, using a RAM build (GCC/Ninja, Debug shared, COIN_THREADSAFE=ON, external Expat, Xvfb/software GLX). This local lab head was not pushed to the fork and does not represent upstream integration. Earlier lab sections above retain their dated snapshots.

The original 21-contribution Base/data-structure queue is now published as #812–#832. The six font candidates remain unpublished and depend on #774; they are outside this publication batch.

Activity

  1. veelo commented on Sep 30, 2026

    @veelo
    Member

    Thank you for your work and for the tokens. At this stage I think further merges halt on resolving conflicts and taking PRs out of draft. I'll keep an eye on updates.

  2. veelo commented on Sep 30, 2026

    @veelo
    Member

    It appears that the moment I merge one PR, all other PRs start reporting conflicts. I think we might need to iterate them one by one. I have approved #743 so if you could resolve that one once more then I can merge it. After that we can proceed with #744. You can also take #751 out of draft mode, if you are happy with its state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions