This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix for bz14333 -- race between atexit() and exit()
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: Torvald Riegel <triegel at redhat dot com>, Andreas Schwab <schwab at suse dot de>, Joseph Myers <joseph at codesourcery dot com>, GLIBC Devel <libc-alpha at sourceware dot org>, Ricky Zhou <rickyz at google dot com>
- Date: Tue, 19 Sep 2017 15:33:12 -0700
- Subject: Re: [patch] Fix for bz14333 -- race between atexit() and exit()
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobNCZqgvcLJhuJt5eSWseuTfHJ9oVsG9TpPvytyfzF56mg@mail.gmail.com> <alpine.DEB.2.20.1707111221040.845@digraph.polyomino.org.uk> <CALoOobMw+FNimtKqhO4cyayp8HGeGWO55veqKCD=fNoknreXkA@mail.gmail.com> <alpine.DEB.2.20.1707111900580.9395@digraph.polyomino.org.uk> <CALoOobOgwZx2K-FWFi5zmqjk4vfxB4B2+Bv6koou7Ks9WCT4Yw@mail.gmail.com> <mvmwp7d7i29.fsf@suse.de> <CALoOobMnZ=dE52uWT-PXSb+Sz8SRbjG7FKCmuG+kZ47db76PUg@mail.gmail.com> <1500467179.27895.55.camel@redhat.com> <CALoOobPx5KHn7rGQKTy3UnEq_YnzXnGKrKCLmJHPd5bkipb79g@mail.gmail.com> <1500926864.30433.42.camel@redhat.com> <CALoOobO1sCK2jMJ69_r-m47PshpM3OnReWkAp6QA=vr6OycrJw@mail.gmail.com> <CALoOobPuWkBOjqMnb9OWf1-3G4=vXqL_Z0LTs7HWACn=Ew+mng@mail.gmail.com> <abd5aba0-4ffe-4794-f390-d57b1522b937@redhat.com> <CALoOobP4KGou=4OL7hVEDOTPesUyNnZE4CoaRhJCCU=RBGPyQQ@mail.gmail.com> <d4b7473f-92eb-db93-7b74-edc4805acffd@redhat.com> <CALoOobM=EkhzY9ye0bsGfFqqfz2kHGV10oJpER3ey_bMCNCj1A@mail.gmail.com> <2d7b1ff8-a87e-657d-4047-57ea99d40918@redhat.com>
On Tue, Sep 19, 2017 at 2:32 PM, Carlos O'Donell <carlos@redhat.com> wrote:
> Can you run the above test case with your patch?
...
> I expect it to print:
> second
> first
The bad news: it still prints:
second
first
second
The good news: there is a trivial fix: the loop in stdlib/exit.c must
*also* mark f->flavor as ef_free, and with that fix we get expected
output.
I'll add your test to the set of tests and send updated patch.
Thanks,
--
Paul Pluzhnikov