reduce tsan warning by ensuring a require edge; issue #130

This commit is contained in:
daan 2020-07-22 15:28:14 -07:00
parent 8aa18d3661
commit 70be91d6b8

View File

@ -978,7 +978,7 @@ static mi_segment_t* mi_abandoned_pop(void) {
mi_atomic_increment(&abandoned_readers); // ensure no segment gets decommitted
mi_tagged_segment_t next = 0;
do {
ts = mi_atomic_read_relaxed(&abandoned);
ts = mi_atomic_read(&abandoned);
segment = mi_tagged_segment_ptr(ts);
if (segment != NULL) {
next = mi_tagged_segment(segment->abandoned_next, ts); // note: reads the segment's `abandoned_next` field so should not be decommitted