Issues
- bytecode differs depending on if precise math is enabledLDEV-5194Resolved issue: LDEV-5194Pothys - MitrahSoft
- Caster methods like toShort, toInteger, toByte don't check for truncation or overflowLDEV-5193
- ParseNumber doesn't respect precise math, always returns a doubleLDEV-5189Resolved issue: LDEV-5189Pothys - MitrahSoft
- Regression: BitXor,BitSHRN,BitSHLN return wrong answer when preciseMath is default and then toggledLDEV-5180Resolved issue: LDEV-5180Pothys - MitrahSoft
- regression: float handlingLDEV-5179
- Regression: Invalid call of the function [ArraySort], second Argument [function] is invalid (precise.math=false)LDEV-5178Resolved issue: LDEV-5178Pothys - MitrahSoft
- Performance Regression due preciseMath being on by defaultLDEV-5161Resolved issue: LDEV-5161Pothys - MitrahSoft
- Strange result from Evaluate since 6.1.0.243LDEV-5130Resolved issue: LDEV-5130Pothys - MitrahSoft
- Switch all functions from double to NumberLDEV-5089Resolved issue: LDEV-5089Michael Offner
- regression - The decimal value 0.005 is not close enough to any integer.LDEV-4897Resolved issue: LDEV-4897Pothys - MitrahSoft
- Integer division rounds integers unexpectedlyLDEV-4668
- Regression in `precisionEvaluate` between Lucee 5 & 6LDEV-4545Resolved issue: LDEV-4545Pothys - MitrahSoft
- regression: Error (java.lang.VerifyError) Message Bad type on operand stackLDEV-4507Resolved issue: LDEV-4507Michael Offner
- don't accept strings of format “m d" as valid datesLDEV-4506Resolved issue: LDEV-4506Pothys - MitrahSoft
- "." should not be accepted/converted as/to a numberLDEV-4480Resolved issue: LDEV-4480Michael Offner
- BigDecimal Invalid operation error with pow() / exponentLDEV-4449Resolved issue: LDEV-4449Michael Offner
- Cannot cast String [352.] to a value of type [numeric]LDEV-4448Resolved issue: LDEV-4448
- application strictNumberValidation = (true / false)LDEV-4317
- regression: ints being returned as decimalsLDEV-4188Resolved issue: LDEV-4188Pothys - MitrahSoft
- CFQueryParam Somehow Able to Circumvent SQL Query Error With Large NumberLDEV-4137Michael Offner
- DeserializeJSON Corrupts Large NumbersLDEV-4103Resolved issue: LDEV-4103Pothys - MitrahSoft
- lucee 6.0 - large number values (without floating points) handled as the wrong valueLDEV-4070Resolved issue: LDEV-4070Michael Offner
- FormatBaseN() returns different values in Lucee compared to ACFLDEV-3776Resolved issue: LDEV-3776Pothys - MitrahSoft
- Simple floating point operation returns incorrect resultLDEV-3730Resolved issue: LDEV-3730
- Long Bigint values are not handled correctlyLDEV-3729Resolved issue: LDEV-3729Michael Offner
- Large decimal number strings lose precision when converted to a number formatLDEV-3662Resolved issue: LDEV-3662Michael Offner
- deserializeJSON() converts large decimals to stringLDEV-3661Resolved issue: LDEV-3661Pothys - MitrahSoft
- cfoutput decimal numers as integerLDEV-3444Michael Offner
- IsNumeric returns True on strings like "3d" and "6f" (5.3.8 regression!)LDEV-3275Resolved issue: LDEV-3275Pothys - MitrahSoft
- Arguments with type of "numeric" are not being cast to doubleLDEV-3056Resolved issue: LDEV-3056Michael Offner
- Incompatibility with ACF-precision increase in float going to be stringLDEV-2969Resolved issue: LDEV-2969Michael Offner
- += Operator throws java.lang.IncompatibileClassChange errors after using duplicate()LDEV-656Michael Offner
- DollarFormat does not round upLDEV-574Resolved issue: LDEV-574Michael Offner
- Allow string member functions to work on numeric values (like their non member equivalents)LDEV-332Resolved issue: LDEV-332Pothys - MitrahSoft
bytecode differs depending on if precise math is enabled
Description
Environment
relates to
Details
Assignee
Pothys - MitrahSoftPothys - MitrahSoftReporter
Zac SpitzerZac SpitzerPriority
NewFix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Details
Details
Assignee
Reporter
Priority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
Activity
Pothys - MitrahSoft17 December 2024 at 12:30Edited
, I tested this ticket with Lucee version 6.2.0.218-SNAPSHOT. When I ran BitXor() and BitOr() with preciseMath set to false
in admin mode, now return the expected results and work fine
Michael Offner13 December 2024 at 10:30
Lucee 6.2
Michael Offner13 December 2024 at 10:28
solution is to exclude the “preciseMath“ setting from any compiler decision, so the result from the compiler works independent of that settings, of course still with the limitation that settings brings.
Michael Offner13 December 2024 at 09:43
problem is that Lucee compiler detects, that you pass a literal string into a function takes a number as argument, so the compiler already optimizes and convert the string already to a Number at compilation time what causes an overflow.
After switching back to precise mode being off by default, the following tests started to fail
It seems different byte code is generated depending on the setting of precise mode
both tests use
application action="update" preciseMath=true;
https://github.com/lucee/Lucee/blob/6.2/test/functions/BitXor.cfc#L50
https://github.com/lucee/Lucee/blob/6.2/test/functions/BitOr.cfc#L58
but the bytecode differs depending on if the number is passed as a string or number
as number it’s
LiteralValue.toNumber(paramPageContext, Long.MAX_VALUE)
as string, it’s
LiteralValue.toNumber(paramPageContext, "9223372036854778000")