Files
diviocity f3fd9f493f thirdparty/libgc: reinit the child locks by copying static initializers (#31071)
fork_child_proc() reinitialized mark_mutex and GC_allocate_ml in the
forked child with pthread_mutex_init()/pthread_rwlock_init(), aborting
the child when the call failed.  A statically initialized lock of the
same type is equivalent to initializing with NULL attributes, so copy
one over the live lock with BCOPY instead; the GC_allocate_ml rwlock
branch already did exactly that.

This removes the init calls from the child (which are slower and can
fail) and with them the two ABORT paths, so a plain fork() in a
multi-threaded program no longer depends on pthread_*_init() succeeding
in the single-threaded child.
2026-10-26 05:30:51 +03:00
..