mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-15 20:25:17 +03:00
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
this is in the malloc initialisation path- but pthread_atfork calls malloc() in
|
|
musl (doesn't in glibc), so it causes an infinite spin on the spinlock taken in
|
|
this path.
|
|
|
|
there's no real good way to work around this, but musl 1.2.4 contains a
|
|
commit to use internal __libc_malloc for pthread_atfork instead of calling
|
|
the externally defined malloc and causing a loop here, so this won't be needed
|
|
then.
|
|
|
|
(also surprising how this doesn't break anything)
|
|
--
|
|
--- a/base/allocator/partition_allocator/partition_root.cc
|
|
+++ b/base/allocator/partition_allocator/partition_root.cc
|
|
@@ -248,9 +248,9 @@
|
|
// However, no perfect solution really exists to make threads + fork()
|
|
// cooperate, but deadlocks are real (and fork() is used in DEATH_TEST()s),
|
|
// and other malloc() implementations use the same techniques.
|
|
- int err =
|
|
- pthread_atfork(BeforeForkInParent, AfterForkInParent, AfterForkInChild);
|
|
- PA_CHECK(err == 0);
|
|
+ //int err =
|
|
+ // pthread_atfork(BeforeForkInParent, AfterForkInParent, AfterForkInChild);
|
|
+ //PA_CHECK(err == 0);
|
|
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
|
}
|
|
|