You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security: death tests proving library hardening fires #306
Tests (EXPECT_DEATH) that an out-of-bounds operator[], a bad optional/expected access, a span overrun, etc. abort under the hardened build, per standard library; skipped with the reason where a platform's library lacks the check. Feeds docs/security/hardening.md.
Part of #286. PR into dev-0.5, from a feature branch in its own worktree.
tests/security/hardening_test.cpp: 8 death tests (vector/array/span/string/string_view index, empty front(), empty optional, expected with an error) plus an in-range control; they run when library hardening is active and skip with the reason otherwise.
docs/testing.md: one paragraph on them.
Why
To prove, per standard library and platform, that the hardening switches stop out-of-bounds and empty accesses; checked on GCC 15 (hardened and default -O0), Clang 22 (hardened, plain skips) and GCC 16 hardened.
Activity
homer6 commentedon Nov 3, 2026
Delivered in #329.
What changed
Why
Still open