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

Fix crash when calling pthread_mutex_lock on the main thread #5243

Merged

Conversation

TannerRogalsky
Copy link
Contributor

Related to #5038, robust_list.head was being set properly for new threads but wasn't being set for the main thread so the error persisted.

I have copied the relevant code into initMainThreadBlock and I have moved the pthread_mutex_(un)lock calls out of the if block as they should be tested (and work) regardless of the browser's threading support.

@kripken kripken requested a review from juj May 24, 2017 18:12
@OleksandrChekhovskyi
Copy link
Contributor

I can confirm that patch resolves the issue.

@juj
Copy link
Collaborator

juj commented Jun 23, 2017

Thanks for this patch, looks good!

@juj juj merged commit 7654279 into emscripten-core:incoming Jun 23, 2017
@TannerRogalsky TannerRogalsky deleted the fix_main_thread_locking branch September 6, 2018 18:57
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.

None yet

3 participants