BwTree
                                
                                
                                
                                    BwTree copied to clipboard
                            
                            
                            
                        "Use-after-free" race between workers and cleaner thread.
In ClearEpoch, the head_epoch_p is deallocated (bwtree.h:8442) even though there may be stale references that are about to attempt an atomic fetch_add on the object (bwtree.h:8091).
Although this race would be exceedingly rare, it would be safer to defer deallocation of the epoch to when current_epoch_p is unlinked in a future call to ClearEpoch.