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 lp_interval_set_a (and lp_dyadic_interval_set_a) when I is a point interval. #46

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

nafur
Copy link
Collaborator

@nafur nafur commented Jul 27, 2020

Fixes #45.

This PR refactors both lp_dyadic_interval_set_a and lp_interval_set_a to support point intervals. Essentially, it moves the special case for I->is_point to the front and thereby avoid the immediate comparison with &I->b (which segfaults, because b is not initialized).

@nafur nafur added the bug label Jul 27, 2020
@nafur nafur requested a review from dddejan July 27, 2020 18:59
@dddejan dddejan merged commit 8b3f485 into master Jul 27, 2020
@dddejan
Copy link
Member

dddejan commented Jul 27, 2020

Thanks!

nafur added a commit to nafur/libpoly that referenced this pull request Jun 8, 2021
The current I->a is simply overwritten, lp_value_assign takes care of properly destructing it before reassigning.
@ahmed-irfan ahmed-irfan deleted the fix_45 branch March 13, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected crash with lp_interval_set_a
2 participants