-
Notifications
You must be signed in to change notification settings - Fork 43
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
Ion binary crashes with floating point exception #221
Comments
This error is triggered by the following numbers.
This seems to be because the Do you have a use case for decimals with exponents this large? |
No I am just practicing fuzzing stuff/looking for security issues. |
Thanks for the report, @docfate111 . I'm going to reopen this so we can raise a more graceful error. |
The global decContext `g_IonEventDecimalContext` has traps set to DEC_Errors, which wouldn't be set if `decContextDefault()` would be used with any `kind` but DEC_INIT_BASE.
Is there any reason diff --git a/tools/events/ion_event_util.cpp b/tools/events/ion_event_util.cpp
index 5a26a5d..5f61843 100644
--- a/tools/events/ion_event_util.cpp
+++ b/tools/events/ion_event_util.cpp
@@ -22,7 +22,7 @@ decContext g_IonEventDecimalContext = {
DEC_MAX_MATH, // max exponent
-DEC_MAX_MATH, // min exponent
DEC_ROUND_HALF_EVEN, // rounding mode
- DEC_Errors, // trap conditions
+ 0, // trap conditions
0, // status flags
0 // apply exponent clamp?
};
|
Running build-release.sh to install creates ion and ionizer.
Going into ion-c/build/release/tools/cli
Running
cause floating point exception for some inputs such as
or
The text was updated successfully, but these errors were encountered: