If this is not a bug in boost::lockfree::detail::freelist, what am I missing here?
问题 In this file, the boost::lockfree::detail::freelist class is used to manage storage for a lock-free data structure (e.g., a queue), using a free list. The deallocate_impl method is used to free nodes by linking them back into the free list (a freed node becomes the new head of the free list, displacing the old head). This method is supposed to be thread-safe and lock-free. The original source code of one instance is duplicated here with my comments annotated to point out the suspicious code