Fix potential freelist corruption in unified_cache_refill (Class 0) and improve TLS SLL logging/safety
This commit is contained in:
@ -538,8 +538,8 @@ static inline bool tls_sll_pop_impl(int class_idx, hak_base_ptr_t* out, const ch
|
||||
uint64_t cnt = atomic_fetch_add_explicit(&g_tls_sll_invalid_head[class_idx], 1, memory_order_relaxed);
|
||||
static __thread uint8_t s_log_limit[TINY_NUM_CLASSES] = {0};
|
||||
if (s_log_limit[class_idx] < 4) {
|
||||
fprintf(stderr, "[TLS_SLL_POP_INVALID] cls=%d head=%p dropped count=%llu\n",
|
||||
class_idx, raw_base, (unsigned long long)cnt + 1);
|
||||
fprintf(stderr, "[TLS_SLL_POP_INVALID] cls=%d head=%p (val=%llx) dropped count=%llu\n",
|
||||
class_idx, raw_base, (unsigned long long)base_addr, (unsigned long long)cnt + 1);
|
||||
s_log_limit[class_idx]++;
|
||||
}
|
||||
// Help triage: show last successful push base for this thread/class
|
||||
|
||||
Reference in New Issue
Block a user