https://bugs.openldap.org/show_bug.cgi?id=9947
Issue ID: 9947 Summary: Race in epoch.c Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: lloadd Assignee: bugs@openldap.org Reporter: ondra@mistotebe.net Target Milestone: ---
When epoch_leave() tests whether other threads might still be alive, it can test things in reverse order, testing too early to catch a thread to come in and too late to see a thread that just left. If those two saw each other, the clock would not advance and the data in refs might actually still be a reachable pointer.
The tests in epoch_leave can actually be simplified leading to machine code not all compilers could figure out by themselves.
https://bugs.openldap.org/show_bug.cgi?id=9947
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |IN_PROGRESS Ever confirmed|0 |1 Assignee|bugs@openldap.org |ondra@mistotebe.net
--- Comment #1 from Ondřej Kuzník ondra@mistotebe.net --- https://git.openldap.org/openldap/openldap/-/merge_requests/581
https://bugs.openldap.org/show_bug.cgi?id=9947
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.5.14 Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=9947
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |TEST
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- head:
• e45869dd by Ondřej Kuzník at 2022-11-07T10:00:10+00:00 ITS#9947 Fix race in epoch.c and simplify
https://bugs.openldap.org/show_bug.cgi?id=9947
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|TEST |FIXED
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- RE26:
• 397d9227 by Ondřej Kuzník at 2022-12-05T16:25:26+00:00 ITS#9947 Fix race in epoch.c and simplify
RE25:
• f6854b2a by Ondřej Kuzník at 2022-12-05T16:25:57+00:00 ITS#9947 Fix race in epoch.c and simplify
https://bugs.openldap.org/show_bug.cgi?id=9947
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED