Charles E. Rolke created DISPATCH-2203:
------------------------------------------
Summary: Alloc_pool_item_t sequence number should be atomic
Key: DISPATCH-2203
URL: https://issues.apache.org/jira/browse/DISPATCH-2203
Project: Qpid Dispatch
Issue Type: Test
Components: Router Node
Affects Versions: 1.16.1
Reporter: Charles E. Rolke
Alloc pool uses a sequence number for safe pointer dereferencing.
{code:java}
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;
{code}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]