Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put error global variables into thread-local storage
Global variable `error_buffer` is used to store a string that is returned to callers, so there is a race condition if dynamic linking is invoked from 2 OCaml domains in parallel Since the error message must be returned, a mutex cannot be used to prevent the race condition GNU libc uses that same solution: keep the last error in thread-local storage; so support for calling dlerror from a different thread than the one calling dlopen is not to be expected Co-authored-by: David Allsopp <[email protected]>
- Loading branch information