NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/54192: lang/rust build error

Since it was not obvious to me, let me try to explain what happens:

 - a multithreaded program calls fork()
 - the forked child process only has a single lwp initially, wich has lid 1

So in the parent thread _lwp_self() (aka lid) was != 1, and now in the child
it has changed. Apparently something in ld.elf_so goes wrong later when
using _lwp_self() == 1 with a memory state inherited that was setup for 
_lwp_self() != 1.

Joergs patch makes the single lwp inherit the lid from the forking parent
thread (instead of always being 1).


Home | Main Index | Thread Index | Old Index