[PATCH COMMITTED] stdlib: resolve a double lock init issue after fork [BZ #32994]

Mark Wielaard mark@klomp.org
Thu Jul 31 17:47:36 GMT 2025


Hi Florian,

On Thu, Jul 31, 2025 at 07:16:39PM +0200, Florian Weimer wrote:
> From: Davide Cavalca <davide@cavalca.name>
> 
> The __abort_fork_reset_child (introduced in
> d40ac01cbbc66e6d9dbd8e3485605c63b2178251) call resets the lock after the
> fork. This causes a DRD regression in valgrind
> (https://bugs.kde.org/show_bug.cgi?id=503668), as it's effectively a
> double initialization, despite it being actually ok in this case. As
> suggested in https://sourceware.org/bugzilla/show_bug.cgi?id=32994#c2
> we replace it here with a memcpy of another initialized lock instead,
> which makes valgrind happy.

Thanks! Happy valgrind makes happy Mark!

Would it be possible to backport this to the 2.42 and 2.41 stable
branches?

Do you want my to try?

Thanks,

Mark


More information about the Libc-alpha mailing list