-
Notifications
You must be signed in to change notification settings - Fork 84
Fix address domain widening creating duplicates #559
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
Conversation
|
Is the issue not even earlier, namely that Edit: Apparently |
|
If this property is violated here, this would result in loosing all elements in the left argument that are incomparable with all elements in the right set, right? |
|
But it does fix the issue we had for openSSL (and not just the reduced example). |
That's a good point. I didn't really think about it and just thought that's due to some special address domain thing. So there might be more wrong here indeed. Also, I suspect the
Hmm, I think due to the right argument being a join, all the addresses from the left should be contained and thus comparable with something on the right, so nothing should disappear. |
|
I added some unit tests for the lval domain used for the elements of address domain and there's an even more fundamental issue I guess:
I'm not completely sure anymore, what the intended semantics is supposed to be. Are |
I looked into this and the problem was that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not solve all the strange things going on here, but at least the ones where we are clear on how to solve them. I'd advocate merging.
Closes #554.
In the problematic
widen {a[def_exc:1], a} {a[def_exc:Not {0}([0,7])]}, previously it iterated over the two elements of the old set and widened those with the single element of the new set. Those inner widenings gave identical results and both remained.Now it iterates over the single element of the new set and widening that with the two elements just yields one element, avoiding the duplicate.
None of
HoarePOcontains explicit logic for avoiding duplicates though, it just uses lists for the buckets. So I cannot be fully sure that there aren't some other weird cases possible, where it can still break.