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 #12

Merged
merged 1 commit into from
May 16, 2024
Merged

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.

@wally4000 wally4000 merged commit 3577f9d into allegrex-v4.4.0 May 16, 2024
1 of 2 checks passed
@sharkwouter sharkwouter deleted the allegrex-v4.4.0-fixLockAPI branch May 16, 2024 07:03
fjtrujy added a commit that referenced this pull request May 16, 2024
Define properly _CLOCKS_PER_SEC
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.

2 participants