This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] posix: Fix improper assert in Linux posix_spawn (BZ#22273)



On 12/10/2017 15:49, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> As suggested by Andreas Schwab, this patch removes the faulty assert
>> and also handles any signal that happens before fork and execve as the
>> spawn was successful (and thus relaying the handling to the caller to
>> figure this out).  Different than Florian, I can not see why using
>> atomics to set err would help here, essentially the code runs
>> sequentially (due CLONE_VFORK) and I think it would not be legal the
>> compiler evaluate ec without checking for new_pid result (thus there
>> is no need to compiler barrier).
> 
> I thought you'd need to guard against reordering in the child.  Since
> the err member is the only thing that is written and the syscalls in
> the child act as compiler barriers (so that the store cannot float to
> the beginning of the function), this is not actually an issue here.
> 

Right, so are you ok with the patch proposed?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]