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

htable: fix crash if deleted entry is reused #1142

Merged
merged 1 commit into from Jun 2, 2017
Merged

Conversation

lazedo
Copy link
Contributor

@lazedo lazedo commented May 30, 2017

resets 'first' when esize == 0

@lazedo
Copy link
Contributor Author

lazedo commented May 30, 2017

these crashes were caught by running with -x tlsf

@miconda
Copy link
Member

miconda commented Jun 2, 2017

@lazedo - I am not sure be46742 is actually effective and fixes anything -- first should become NULL if the last item in the slot (entry) is removed, because it->next should be NULL at that moment.

Can you describe what was the issue you faced? Maybe the problem is in another part and it->next is wrong, but that will have bad effects in other cases.

The commit 18ba95a seems ok.

resets 'first' when esize == 0
@lazedo
Copy link
Contributor Author

lazedo commented Jun 2, 2017

@miconda thanks for the comment. i think you're right. i re-tested with only the second commit and it seems to be working.

@miconda
Copy link
Member

miconda commented Jun 2, 2017

@lazedo - ok, thanks for the feedback and fix! You can merge that commit and backport as needed to stable branches.

@lazedo lazedo merged commit 2d771f5 into master Jun 2, 2017
@lazedo lazedo deleted the lazedo-patch-1 branch June 2, 2017 13:20
@lazedo
Copy link
Contributor Author

lazedo commented Jun 2, 2017

@miconda backported to 4.4 and 5.0

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

2 participants