Skip to content

v1.1.2

Latest

Choose a tag to compare

@github-actions github-actions released this 15 Jun 20:19
· 2 commits to master since this release
d38b598

pbr-cpp-memory-pool v1.1.2 — Maintenance (InstrumentedPool & core bug fixes)

A maintenance PATCH. v1.1.2 fixes four verified, externally-reported defects — the first real use of the in-repo bug ledger (ADR-0039) — plus the accumulated documentation work since v1.1.1. The library's public surface is unchanged (no API/ABI change); the fixes are header-only or core internals.

Fixed

  • BUG-0001InstrumentedPool growth-counter data race (high). notify_if_grew() read+wrote the non-atomic last_growths_ on the allocation hot path, racing under the documented-safe MUTEX + dynamic-growth + concurrent configuration (UB). last_growths_ is now std::atomic, advanced with a compare_exchange so grew fires once per growth without a race. A concurrent InstrumentedPool case was added to the ThreadSanitizer stress suite (the coverage gap that hid it).
  • BUG-0002live_ counter underflow (medium). deallocate() decremented the unsigned live_ for any non-null pointer, so a foreign or double-freed pointer (a no-op in the core, ADR-0012) wrapped it to SIZE_MAX. The decrement now clamps at zero. The C header's double-free note was corrected — the Decorator counts deallocations but does not detect a double-free.
  • BUG-0003 — missing destroyed event on move-assignment (low). Move-assigning over an instrumented pool released its Pool and observers without emitting PoolEvent::destroyed, asymmetric with the destructor. It now notifies before reassignment.
  • BUG-0004 — unguarded grow_pool overflow (low/latent). total * (grow_factor_ - 1) was computed before any overflow check; a would_overflow_product guard was added first, mirroring the create path. Not runtime-reachable (RAM exhausts first), so no test — a consistency fix.

Also in this release

  • The redundant docs-site CI badge was removed from the README header (all three locales); the published Doxygen site is still linked from the API reference badge.
  • The zh-Hans / ja README translations were re-synced to the v1.1.1 status.

Architecture Decision Records

No new ADRs — v1.1.2 is bug fixes and documentation, governed by existing decisions (ADR-0034 maintenance protocol, ADR-0039 bug ledger). The running total stays 40.

Spec Coverage Map

No change — all fifteen rows remain ✅ (ADR-0029). The fixes correct decorator/diagnostic behaviour and a latent guard, not a spec requirement.

What this release does not contain

  • No public-API/ABI changePool, TypedPool, PoolAllocator, the C ABI, and the compile-time knobs are unchanged.
  • No double-free detectionv1.1.2 corrects the over-promising header note; genuine double-free detection in the Decorator remains possible future work (it would be a feature, not a patch).

Verifying the release

Each platform tarball is the same complete cmake --install tree as v1.1.1 (full headers + static archive + CMake package config + pkg-config .pc). SHA-256 checksums are in SHA256SUMS:

sha256sum --check SHA256SUMS

Links