Files
hakmem/core/box
Moe Charm (CI) da8f4d2c86 Phase 8-TLS-Fix: BenchFast crash root cause fixes
Two critical bugs fixed:

1. TLS→Atomic guard (cross-thread safety):
   - Changed `__thread int bench_fast_init_in_progress` to `atomic_int`
   - Root cause: pthread_once() creates threads with fresh TLS (= 0)
   - Guard must protect entire process, not just calling thread
   - Box Contract: Observable state across all threads

2. Direct header write (P3 optimization bypass):
   - bench_fast_alloc() now writes header directly: 0xa0 | class_idx
   - Root cause: P3 optimization skips header writes by default
   - BenchFast REQUIRES headers for free routing (0xa0-0xa7 magic)
   - Box Contract: BenchFast always writes headers

Result:
- Normal mode: 16.3M ops/s (working)
- BenchFast mode: No crash (pool exhaustion expected with 128 blocks/class)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 05:12:32 +09:00
..