-
Notifications
You must be signed in to change notification settings - Fork 59
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
Improper locking error, unlocking an inactive lock? #91
Comments
I do agree this might be a problem. I assumed that the mutex would be locked when the program reaches that point of execution. Feel free to propose a fix. |
This is definitely quite hard to fix. I had a look today, and I couldn't come up with easy solution. I think the cache system needs a completely rewrite. |
@jikamens , do you fancy having a look at this? |
I don't understand the problem here. As far as I can tell from the code in |
Another friend of mine had a look at this, he said it is okay too. |
I wonder if this is related: |
Dear developers, thank you for your checking. When
Seg_exist(cf, dl_offset)==1
, should the unlock statementPTHREAD_MUTEX_UNLOCK(&cf->w_lock);
try to unlock a lockcf->w_lock
that is not acquired?According to this,
If a thread attempts to unlock a mutex that it has not locked or a mutex which is unlocked, undefined behavior results.
httpdirfs/src/cache.c
Lines 995 to 1054 in 939e287
Best,
The text was updated successfully, but these errors were encountered: