[GWP-ASan] Add locking around unwinder for atfork protection.

Unwinders (like libc's backtrace()) can call their own locks (like the
libdl lock). We need to let the unwinder release the locks before
forking. Wrap a new lock around the unwinder for atfork protection.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D95889

GitOrigin-RevId: 30973f6fe01cc0a9624147466f0c54b91a1b61d7
2 files changed