Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not crash when pthread_create() is called before main() #75

Merged

Conversation

petterreinholdtsen
Copy link
Contributor

Make sure to initialize coz if pthread_create() is called before main().
This happend with openalpr when a shared library initialized a thread
in the library initialization code.

Fixes issue #54

Make sure to initialize coz if pthread_create() is called before main().
This happend with openalpr when a shared library initialized a thread
in the library initialization code.

Fixes issue plasma-umass#54
@petterreinholdtsen
Copy link
Contributor Author

Note, I left the debug output in place. Let me know if the approach is OK, then I can clean up the patch and push a new version.

@ccurtsinger
Copy link
Member

This seems to be working. I'd want to test it on a C++ program with a bunch of static initializers first, but I think it should be okay.

@petterreinholdtsen
Copy link
Contributor Author

[Charlie Curtsinger]

This seems to be working. I'd want to test it on a C++ program with a
bunch of static initializers first, but I think it should be okay.

Very good to hear. With it I was able to get coz running with my test
program. :)

Vennlig hilsen
Petter Reinholdtsen

@emeryberger emeryberger merged commit 4ceb44a into plasma-umass:master Oct 11, 2016
@emeryberger
Copy link
Member

@ccurtsinger - I am accepting the PR; please test asap. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants