Version
every version
Context
HybridJacksonPool.StripedLockFreePool#releasePooled publishes a new stack head with CAS before initializing the node's next pointer.
current:
if (topStacks.compareAndSet(slot, next, newHead)) {
newHead.next = next;
return;
}
A concurrent acquirePooled can observe newHead immediately after the CAS, before newHead.next is assigned. In that window it may pop newHead and replace the stack head with null, detaching the previous stack.
I will submit a pr to fix it
Steps to reproduce
No response
Do you have a reproducer?
No response
Version
every version
Context
HybridJacksonPool.StripedLockFreePool#releasePooledpublishes a new stack head with CAS before initializing the node'snextpointer.current:
A concurrent acquirePooled can observe newHead immediately after the CAS, before newHead.next is assigned. In that window it may pop newHead and replace the stack head with null, detaching the previous stack.
I will submit a pr to fix it
Steps to reproduce
No response
Do you have a reproducer?
No response