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

LoadProhibited exception when using EspMutex #8

Closed
N3xed opened this issue Aug 22, 2021 · 2 comments
Closed

LoadProhibited exception when using EspMutex #8

N3xed opened this issue Aug 22, 2021 · 2 comments

Comments

@N3xed
Copy link
Collaborator

N3xed commented Aug 22, 2021

The implementation for EspMutex was recently changed from using a pthread_mutex_t to a *mut pthread_mutex_t. This is incorrect as when locking, the pthread_mutex_lock function calls pthread_mutex_init_if_static which dereferences the mutex pointer. Because this pointer is initially set to PTHREAD_MUTEX_INITIALIZER (0xFFFFFFFF), this causes a load to this address which is invalid and causes a LoadProhibited exception.

@ivmarkov
Copy link
Collaborator

Sorry for this stupid mistake. Hopefully fixed now.

@N3xed
Copy link
Collaborator Author

N3xed commented Aug 22, 2021

Yup, fixed it.

@N3xed N3xed closed this as completed Aug 22, 2021
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

No branches or pull requests

2 participants