fc_malloc icon indicating copy to clipboard operation
fc_malloc copied to clipboard

Critical Error

Open dingsp opened this issue 5 years ago • 1 comments

https://github.com/bytemaster/fc_malloc/blob/7a56cf9eae24e7f8d6add42417531a8dea18c337/malloc3.cpp#L802

May be too many thread claims and there are two threads get the same index in the ring buffer, so I think it may cause serious error.

dingsp avatar Mar 17 '20 16:03 dingsp

I think claim block first and then compare claim_pos with _write_pos is safe. if claim_pos <= _write_pos, we can read the ring buffer.

dingsp avatar Mar 17 '20 18:03 dingsp