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 error handling with MSVC #18

Merged
merged 1 commit into from
Feb 18, 2025
Merged

Fix error handling with MSVC #18

merged 1 commit into from
Feb 18, 2025

Conversation

LucaCiucci
Copy link
Owner

@LucaCiucci LucaCiucci commented Feb 18, 2025

Fixes #11.
Currently, setjmp and longjmp don't play whell with Rust as mentioned by several sources. The specific problem here was that the lambdas that we used to wrap fallible qhull functions were probably interacting with the exception handling on MSVC (I did not investigate further).
This fix avoids using lambdas at the cost of having separate functions for "trying" qhull functions depending on the number of arguments.

I did not investigate further what exactly happens when qhull calls longjmp and the usage of setjmp is technically still invalid but seems to fix the issue for now.

@LucaCiucci LucaCiucci merged commit 904bcea into main Feb 18, 2025
3 checks passed
@LucaCiucci LucaCiucci deleted the issue/11 branch February 18, 2025 07:08
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.

error::QhError<'a>::into_static doctest fails
1 participant