[PATCH release/2.41/master] stdlib: resolve a double lock init issue after fork [BZ #32994]
Florian Weimer
fweimer@redhat.com
Fri Aug 1 14:05:55 GMT 2025
* Mark Wielaard:
> 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.
>
> Reviewed-by: Florian Weimer <fweimer@redhat.com>
> (cherry picked from commit d9a348d0927c7a1aec5caf3df3fcd36956b3eb23)
> ---
> NEWS | 1 +
> stdlib/abort.c | 6 +++++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS b/NEWS
> index 89d0935bebf4..1a58f3e4e456 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -32,6 +32,7 @@ The following bugs were resolved with this release:
> [32981] ports: elf/tst-execstack-prog-static-tunable fails on
> sparc64-linux-gnu
> [32987] elf: Fix subprocess status handling for tst-dlopen-sgid
> + [32994] stdlib: resolve a double lock init issue after fork
> [33164] iconv -o should not create executable files
> [33185] Fix double-free after allocation failure in regcomp
Okay.
Thanks,
Florian
More information about the Libc-alpha
mailing list