Skip to content

Release v1.2.2: Hardened Safety & Static Validation

Latest

Choose a tag to compare

@gooderfreed gooderfreed released this 20 Jul 20:38
02c6c87

This patch release introduces critical memory safety hardening, robust compile-time validation, and API refinements.

Safety & Hardening

  • Defensive Rollback Guard: Added an unconditional check in estack_free_to_marker to prevent out-of-bounds reads and memory corruption when using corrupted markers under CONTRACT release builds.
  • Truncation Protection: Added a static assertion to prevent silent truncation of ESTACK_MAGIC on 32-bit platforms.

Static Validation & Configuration

  • Power-of-Two Enforcement: Added static assertions ensuring ESTACK_MIN_ALIGNMENT and ESTACK_DEFAULT_HEADER_ALIGNMENT are valid powers of two.
  • Alignment Logic Fixes: Enforced a minimum header alignment limit and corrected configuration overrides to prevent breaking ESTACK_NO_AUTO_ALIGN mode.

API & Documentation

  • Refined Diagnostics: Removed const from estack_print to correctly match its internal stack-allocation diagnostics.
  • Strict Alignment Warnings: Documented hardware fault risks on strict-alignment platforms when disabling payload or header alignment.

Complex inside. Simple outside.