Files
hakmem/docs
Moe Charm (CI) 1b58df5568 Add comprehensive final report on root cause fix
After extensive investigation and testing, confirms that the root cause of
TLS SLL corruption was a type safety bug in tiny_alloc_fast_push.

ROOT CAUSE:
- Function signature used void* instead of hak_base_ptr_t
- Allowed implicit USER/BASE pointer confusion
- Caused corruption in TLS SLL operations

FIX:
- 5 files: changed void* ptr → hak_base_ptr_t ptr
- Type system now enforces BASE pointers at compile time
- Zero runtime cost (type safety checked at compile, not runtime)

VERIFICATION:
- 180+ seconds of stress testing:  PASS
- Zero crashes, SIGSEGV, or corruption symptoms
- Performance impact: < 1% (negligible)

LAYERS ANALYSIS:
- Layer 1 (refcount pinning):  ESSENTIAL - kept
- Layer 2 (release guards):  ESSENTIAL - kept
- Layer 3 (next validation):  REMOVED - no longer needed
- Layer 4 (freelist validation):  REMOVED - no longer needed

DESIGN NOTES:
- Considered Layer 3 re-architecture (3a/3b split) but abandoned
- Reason: misalign guard introduced new bugs
- Principle: Safety > diagnostics; add diagnostics later if needed

Final state: Type-safe, stable, minimal defensive overhead

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 05:40:50 +09:00
..

Docs Overview

このフォルダは hakmem の設計・計測・運用メモを体系化して管理する場所です。

  • INDEX.md: 目次(各ドキュメントへのリンク)
  • benchmarks/: ベンチマーク手順とスイープ結果の保存先
  • specs/: 現在の仕様SACS3/HW/ENVを集約
  • roadmap/: これからの実装計画・優先度・タスク

運用ルール(提案)

  • 1つの変更/計測のまとまりにつき1ファイルor 1フォルダ
  • 再現コマンド・環境変数・ハード構成は必ず記載
  • 大きな連続出力はファイルへ保存し、本文からは抜粋/要約を記載