Moe Charm (CI)
f28cafbad3
Fix root cause: slab_index_for() offset calculation error in tiny_free_fast
...
ROOT CAUSE IDENTIFIED AND FIXED
Problem:
- tiny_free_fast.inc.h line 219 hardcoded 'ptr - 1' for all classes
- But C0/C7 have tiny_user_offset() = 0, C1-6 have = 1
- This caused slab_index_for() to use wrong position
- Result: Returns invalid slab_idx (e.g., 0x45c) for C0/C7 blocks
- Cascaded as: [TLS_SLL_NEXT_INVALID], [FREELIST_INVALID], [NORMALIZE_USERPTR]
Solution:
1. Call slab_index_for(ss, ptr) with USER pointer directly
- slab_index_for() handles position calculation internally
- Avoids hardcoded offset errors
2. Then convert USER → BASE using per-class offset
- tiny_user_offset(class_idx) for accurate conversion
- tiny_free_fast_ss() needs BASE pointer for next operations
Expected Impact:
✅ [TLS_SLL_NEXT_INVALID] eliminated
✅ [FREELIST_INVALID] eliminated
✅ [NORMALIZE_USERPTR] eliminated
✅ All 5 defensive layers become unnecessary
✅ Remove refcount pinning, guards, validations, drops
This single fix addresses the root cause of all symptoms.
Technical Details:
- slab_index_for() (superslab_inline.h line 165-192) internally calculates
position from ptr and handles the pointer-to-offset conversion correctly
- No need to pre-convert to BASE before calling slab_index_for()
- The hardcoded 'ptr - 1' assumption was incorrect for classes with offset=0
🤖 Generated with Claude Code (https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-12-04 03:15:39 +09:00
..
2025-12-03 21:56:52 +09:00
2025-12-03 21:56:52 +09:00
2025-11-26 14:45:26 +09:00
2025-11-29 08:44:29 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-01 16:37:59 +09:00
2025-11-05 12:31:14 +09:00
2025-12-02 20:58:25 +09:00
2025-11-05 12:31:14 +09:00
2025-11-08 17:08:00 +09:00
2025-11-08 17:08:00 +09:00
2025-12-03 18:06:24 +09:00
2025-12-01 16:37:59 +09:00
2025-12-01 16:37:59 +09:00
2025-11-29 06:57:03 +09:00
2025-12-02 20:56:55 +09:00
2025-11-05 12:31:14 +09:00
2025-11-28 17:00:56 +09:00
2025-11-05 12:31:14 +09:00
2025-12-02 20:58:25 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-01 16:05:55 +09:00
2025-12-01 22:06:10 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-08 12:54:52 +09:00
2025-12-01 22:06:10 +09:00
2025-11-26 15:43:45 +09:00
2025-12-01 22:06:10 +09:00
2025-11-07 01:27:04 +09:00
2025-12-02 19:13:28 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-03 20:42:28 +09:00
2025-12-03 20:42:28 +09:00
2025-12-03 21:56:52 +09:00
2025-12-03 20:42:28 +09:00
2025-11-20 07:32:30 +09:00
2025-11-11 01:47:06 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-16 03:21:13 +09:00
2025-11-16 03:21:13 +09:00
2025-12-02 20:55:31 +09:00
2025-11-28 18:14:31 +09:00
2025-11-28 16:11:15 +09:00
2025-12-03 09:15:59 +09:00
2025-12-03 20:42:28 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-26 13:14:18 +09:00
2025-11-05 12:31:14 +09:00
2025-11-29 06:57:03 +09:00
2025-11-21 23:00:24 +09:00
2025-11-28 00:45:27 +09:00
2025-11-27 04:35:47 +09:00
2025-11-05 12:31:14 +09:00
2025-11-13 06:50:20 +09:00
2025-11-26 14:45:26 +09:00
2025-11-13 06:50:20 +09:00
2025-11-07 01:27:04 +09:00
2025-12-03 12:11:27 +09:00
2025-11-13 14:25:54 +09:00
2025-11-27 03:18:33 +09:00
2025-11-05 12:31:14 +09:00
2025-11-21 03:20:42 +09:00
2025-11-28 04:32:15 +09:00
2025-12-03 18:06:24 +09:00
2025-11-21 01:16:45 +09:00
2025-11-13 06:50:20 +09:00
2025-11-13 06:50:20 +09:00
2025-11-27 04:35:47 +09:00
2025-11-26 13:14:18 +09:00
2025-11-26 14:45:26 +09:00
2025-11-30 07:16:50 +09:00
2025-11-21 01:23:59 +09:00
2025-11-20 07:32:30 +09:00
2025-11-13 16:33:03 +09:00
2025-11-05 12:31:14 +09:00
2025-11-20 07:32:30 +09:00
2025-11-05 12:31:14 +09:00
2025-12-03 20:42:28 +09:00
2025-11-21 01:16:45 +09:00
2025-11-05 12:31:14 +09:00
2025-11-14 01:02:00 +09:00
2025-11-14 05:41:49 +09:00
2025-11-26 14:45:26 +09:00
2025-12-03 15:30:28 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-27 04:35:47 +09:00
2025-11-27 04:35:47 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-02 20:32:22 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-21 01:23:59 +09:00
2025-11-05 12:31:14 +09:00
2025-11-21 03:20:42 +09:00
2025-11-28 00:43:57 +09:00
2025-11-07 01:27:04 +09:00
2025-11-21 03:20:42 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-07 01:27:04 +09:00
2025-11-27 03:41:07 +09:00
2025-11-11 00:02:24 +09:00
2025-11-28 18:16:32 +09:00
2025-12-01 16:37:59 +09:00
2025-11-22 09:34:35 +09:00
2025-12-01 22:06:10 +09:00
2025-11-29 06:47:13 +09:00
2025-12-03 18:06:24 +09:00
2025-11-20 07:32:30 +09:00
2025-11-20 07:32:30 +09:00
2025-12-03 13:28:44 +09:00
2025-12-02 19:13:28 +09:00
2025-11-28 16:08:44 +09:00
2025-12-03 20:42:28 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-11-05 12:31:14 +09:00
2025-12-03 20:42:28 +09:00
2025-11-05 12:31:14 +09:00
2025-11-27 05:19:56 +09:00
2025-11-10 18:04:08 +09:00
2025-11-05 12:31:14 +09:00
2025-11-26 13:14:18 +09:00
2025-11-17 03:22:27 +09:00
2025-11-21 23:00:24 +09:00
2025-11-09 16:49:34 +09:00
2025-11-08 23:53:25 +09:00
2025-11-17 03:22:27 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 15:00:13 +09:00
2025-11-14 15:00:13 +09:00
2025-11-14 14:29:05 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 14:29:05 +09:00
2025-11-09 18:55:50 +09:00
2025-11-14 15:32:07 +09:00
2025-11-09 18:55:50 +09:00
2025-11-28 01:04:29 +09:00
2025-11-13 06:50:20 +09:00
2025-11-27 11:52:11 +09:00
2025-11-29 05:13:04 +09:00
2025-12-03 21:56:52 +09:00
2025-12-01 16:37:59 +09:00
2025-11-29 05:13:04 +09:00
2025-11-30 15:21:42 +09:00
2025-12-02 20:25:48 +09:00
2025-11-29 05:13:04 +09:00
2025-11-20 07:32:30 +09:00
2025-11-20 07:32:30 +09:00
2025-12-03 21:56:52 +09:00
2025-11-17 02:47:58 +09:00
2025-12-03 13:28:44 +09:00
2025-11-27 03:18:33 +09:00
2025-12-03 21:56:52 +09:00
2025-11-06 21:54:12 +09:00
2025-11-14 01:02:00 +09:00
2025-11-26 13:14:18 +09:00
2025-11-29 06:47:13 +09:00
2025-11-27 03:41:07 +09:00
2025-11-14 05:41:49 +09:00
2025-11-28 00:43:07 +09:00
2025-11-29 06:57:03 +09:00
2025-11-29 06:57:03 +09:00
2025-12-02 20:25:48 +09:00
2025-12-02 20:25:48 +09:00
2025-11-09 23:15:02 +09:00
2025-12-03 12:29:31 +09:00
2025-12-04 03:15:39 +09:00
2025-12-03 12:29:31 +09:00
2025-11-07 01:27:04 +09:00
2025-12-03 12:11:27 +09:00
2025-11-28 04:36:37 +09:00
2025-11-05 12:31:14 +09:00
2025-11-07 01:27:04 +09:00
2025-11-26 14:45:26 +09:00
2025-12-03 12:11:27 +09:00
2025-11-30 11:06:44 +09:00
2025-12-03 09:57:12 +09:00
2025-11-07 01:27:04 +09:00
2025-11-13 16:33:03 +09:00
2025-11-05 12:31:14 +09:00
2025-11-11 21:49:05 +09:00
2025-11-07 01:27:04 +09:00
2025-11-05 12:31:14 +09:00
2025-12-03 18:06:24 +09:00
2025-12-02 20:22:42 +09:00
2025-11-06 21:54:12 +09:00
2025-11-07 22:34:24 +09:00
2025-11-05 12:31:14 +09:00