Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The following trivial program will occasionally SIGSEGV, SIGABRT, or deadlock: #include <owcapi.h> int main() { char* buf; size_t len; OW_init("--fake 20 --fake 42"); OW_get("/",&buf,&len); return 0; } Backtraces show that these occur within calls to ow_regcomp, and most often during the underlying regcomp(3) call. It is also possible during the tsearch(3) call, which is explicitly thread-unsafe against a shared root. This patch replaces the tsearch check with the standard pthread_once mechanism, which is designed specifically for this use case. Signed-off-by: Justin Brewer <justin.brewer@vertivco.com> Signed-off-by: Johan Ström <johan@stromnet.se>
- Loading branch information
1 parent
8df9cea
commit 4d50ca6
Showing
7 changed files
with
119 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.