[
https://issues.apache.org/jira/browse/DISPATCH-2203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jiri Daněk updated DISPATCH-2203:
---------------------------------
Affects Version/s: 1.18.0
> 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, 1.18.0
> Reporter: Charles E. Rolke
> Priority: Major
> Labels: race-condition
>
> 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.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]