[PATCH] [BZ #19402] Clear list of acquired robust mutexes in the child process after forking.
Florian Weimer
fweimer@redhat.com
Thu Jan 26 14:42:00 GMT 2017
On 01/24/2017 09:27 PM, Torvald Riegel wrote:
> On Mon, 2017-01-23 at 15:57 +0100, Florian Weimer wrote:
>> On 01/13/2017 04:37 PM, Torvald Riegel wrote:
>>> On Fri, 2017-01-13 at 14:11 +0100, Florian Weimer wrote:
>>>> On 12/23/2016 10:31 PM, Torvald Riegel wrote:
>>>>>> Can we add a test case for this?
>>>>> What do you have in mind? Checking that the list is reset to zero after
>>>>> fork? Do we need a test for that if we have documented the need to do
>>>>> that in the code?
>>>>
>>>> What about the attached patch?
>>>
>>> That looks fine generally, with the following exceptions / comments:
>>>
>>> According to the feedback so far we got for
>>> http://austingroupbugs.net/view.php?id=1112 the trylock-based test is
>>> actually UB. There should be a comment making that clear (ie, that we
>>> rely on something we know about our current implementation to test
>>> this).
>>>
>>> If this was a multi-threaded test program, it would be invalid because
>>> non-async-signal-safe functions are executed in the child before exec()
>>> is called. In a single-threaded program, it's not quite clear to me
>>> what POSIX really wants. There's indication that only AS-safe functions
>>> should be called, but IIRC that's not explicitly stated.
>>> Florian says we still need to support this as an extension. If so, this
>>> should be made clear in the test (using a suitable comment).
>>
>> I added a comment and an additional test which uses an error-checking mutex.
>>
>> Test case still passes on current master. Okay to commit?
>
> LGTM.
Siddhesh, is this okay despite the freeze? It's a test-only change:
<https://sourceware.org/ml/libc-alpha/2017-01/msg00423.html>
Thanks,
Florian
More information about the Libc-alpha
mailing list