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
audit-round-1 fixes: drop MISRA_ on bench-local macro; tighten misc
Applied findings from the audit-loop round 1:
Allocator_misra_correct.c:
MISRA_BENCH_SLAB_MAX_SLOT -> BENCH_SLAB_MAX_SLOT (MISRA_ prefix
reserved for FEATURE_/MAGIC/guards; bench-local cap is none).
bench_realloc(MODE_SLAB) comment: rewritten to admit the soft NULL
is intentional (avoid aborting the whole bench process on a
routing mismatch), instead of the contradictory 'Fail loudly'.
enum BenchMode -> bench_mode (file-local enum; convention uses
snake_case for private types).
Allocator_misra.c, Allocator_misra_correct.c:
Drop dead <stdlib.h> include.
Allocator_misra_arena.c, Allocator_misra_page.c:
int g_*_live -> bool.
Allocator.h:
Document the reset asymmetry in bench_use_fixed_size/general --
misra backends tear down and reinit between benches; libc-shape
backends keep process malloc state. Median absorbs the cold
iteration; not advantageous to misra.
Scripts/run.py (render_frag_table):
Footprint = 0.0 MB rendered as 'n/a' (mimalloc 3.3.0's
mi_stats_get is broken; old rendering flattered mimalloc by
making it look like it allocated nothing).
Source/Misra/Std/Allocator/Slab.c (alloc loop):
Explain why the pre-redesign 'bitmap word reads back its bit
already set' LOG_FATAL was dropped -- it was a self-consistency
probe (defending against a corrupt-with-itself bitmap word, not
against caller bugs), and the new contiguous-bitmaps layout makes
it a defense against CTZ64 itself being broken. Free's
double-free check still defends against the real-world failure
mode (releasing a slot twice from user code).
Carried forward without change: the alloc-side check is permanently
removed -- not re-added under FEATURE_HEAP_VALIDATE_FULL -- because
it tested platform code, not caller code.
All 104 MisraStdC tests still pass on Linux.
0 commit comments