Skip to content

Initialize, refresh and release the SoBase auditor cache - #821

Open
Dikluwe wants to merge 2 commits into
coin3d:masterfrom
Dikluwe:codex/pr/sobase-getauditors-cache
Open

Dikluwe wants to merge 2 commits into
coin3d:masterfrom
Dikluwe:codex/pr/sobase-getauditors-cache

Conversation

@Dikluwe

@Dikluwe Dikluwe commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Problem

The first SoBase::getAuditors() call can keep its local list pointer null after inserting the cache entry. Refreshing a cached list with a forward removal loop also leaves stale entries after index shifts. The cached list must additionally be deleted when its owning SoBase is destroyed.

Changes

  • Use the newly created list immediately and rebuild its contents correctly.
  • Erase and delete the cached list under the existing auditor mutex during SoBase destruction.
  • Add regressions for an empty first lookup, repeated refreshes and cached-list lifetime.

The returned list remains borrowed; its lifetime ends with the SoBase. Existing public signatures and object layout are unchanged.

Validation

Linux Debug shared/threadsafe build: candidate 88/88 CTests and previous integration lab 132/132. Three focused tests passed with ASan/UBSan/vptr and LeakSanitizer; the lifetime reproducer previously reported 1,008 bytes in 18 allocations. The final publication integration gate is recorded below.

Independent of the other SoBase candidates. Upstream integration remains the maintainers' decision.

Final publication gate — 2026-10-08

The exact published heads, merged over the existing integration lab, passed 13/13 directed CTests and 139/139 total CTests, with no skips. GCC/Ninja Debug shared build, COIN_THREADSAFE=ON, external Expat, all build/compiler temporary files in RAM. The GLX test environment used Xvfb, LIBGL_ALWAYS_SOFTWARE=1 and COIN_GLX_PIXMAP_DIRECT_RENDERING=1. The initial full run omitted the latter setting and failed to create GLX contexts; the corrected environment passed without code changes. Integration commit: bc83f34.

Native Windows/macOS and ABI checks are left to this PR's CI.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant