From 77dd55aae51a698637997171a9c349a713d2d20c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 4 Aug 2023 15:18:52 -0400 Subject: [PATCH] libroot: Reinitialize global heap lock after fork. The per-heap locks are reinitialized already by the routine which invokes this one, but this global lock was previously missed. May fix a deadlock reported by trungnt2910 to happen in the .NET port. --- src/system/libroot/posix/malloc_hoard2/arch-specific.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/libroot/posix/malloc_hoard2/arch-specific.cpp b/src/system/libroot/posix/malloc_hoard2/arch-specific.cpp index 20f4cdf913..688b602f6e 100644 --- a/src/system/libroot/posix/malloc_hoard2/arch-specific.cpp +++ b/src/system/libroot/posix/malloc_hoard2/arch-specific.cpp @@ -79,6 +79,8 @@ __init_after_fork(void) sHeapBase); exit(1); } + + hoardLockInit(sHeapLock, "heap"); }