Skip to content

fix(anytls): potential race condition in c.idleSession.Len() in idleCleanupExpTime() - #3225

Merged
wwqgtxx merged 1 commit into
MetaCubeX:Alphafrom
chenx-dust:patch-2
Sep 19, 2026
Merged

wwqgtxx merged 1 commit into
MetaCubeX:Alphafrom
chenx-dust:patch-2

Conversation

@chenx-dust

Copy link
Copy Markdown

创建 slice sessionToClose 的时候获取了 c.idleSession.Len(),但不在 c.idleSessionLock.Lock() 保护之内,可能预分配过小的空间导致额外分配开销。虽然只影响预分配空间且触发条件苛刻,但确实是个竞态。

@wwqgtxx
wwqgtxx merged commit 5019cc0 into MetaCubeX:Alpha Sep 19, 2026
mouhinnipruxe pushed a commit to mouhinnipruxe/mihomo that referenced this pull request Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants