Details
-
Test
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.16.1, 1.18.0
-
None
Description
Alloc pool uses a sequence number for safe pointer dereferencing.
Definition
Line 55: uintmax_t sequence; // uintmax_t ensures proper alignment of following data
In qd_alloc:
Line 406: item->sequence = 0;
in qd_dealloc:
Line 477: item->sequence++;
In qd_alloc_sequence:
Line 525: reuturn item->sequence;
It is reasonably certain that multiple threads will be referencing the same item at nearly the same time. The code as shown gets flagged by tsan.
Attachments
Issue Links
- duplicates
-
DISPATCH-2320 TSAN: alloc sequence is non-atomic
- Open