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 scandir DD_LOCK #15

Merged
merged 1 commit into from
May 16, 2024
Merged

Fix scandir DD_LOCK #15

merged 1 commit into from
May 16, 2024

Conversation

fjtrujy
Copy link
Member

@fjtrujy fjtrujy commented May 16, 2024

Description

Be sure the __lock_release_recursive(dirp->dd_lock); is being called before the closedir(dirp); otherwise it will crash as the dirp->dd_lock is going to be deleted in closedir and on top of that the dirp is freed also in closedir.

This issue has been there in newlib for years, however, it wasn't noticed because first of all LOCK API looks to be barely used, and secondly because it also requires the flag HAVE_DD_LOCK to be enabled.

Cheers.

@fjtrujy fjtrujy merged commit cad2e57 into ee-v4.4.0 May 16, 2024
1 of 2 checks passed
@fjtrujy fjtrujy deleted the ee-v4.4.0-fixLockAPI branch October 22, 2024 11:14
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.

1 participant