fix: NaN bypasses minInclusive/maxInclusive facets#64
fix: NaN bypasses minInclusive/maxInclusive facets#64gdesrosiers1805 wants to merge 1 commit intoapache:masterfrom
Conversation
|
bug can be reproduced by running one of the provided sample programs SAX2COUNT with the following arguments:
Note:This Bug was discovered in version 3.2.4 but was tested and found as well in latest release 3.3.0 as well. |
969c52c to
0e526fe
Compare
NaN silently passes bounds validation due to trichotomy failure in compareValues. Root Cause: - boundsCheck assumes trichotomy from compareValues (total order): -1, 0, or 1 - NaN triggers compareSpecial → returns 2 (INDETERMINATE) - Trichotomy broken by 4th value (NaN) - minInclusive: `if (result == -1)` → misses INDETERMINATE(2) - maxInclusive: `if (result == 1)` → misses INDETERMINATE(2) Affected: minInclusive/maxInclusive facets only Unaffected: minExclusive/maxExclusive correctly detect NaN Fix: - minInclusive: reject `(result != 1 && result != 0)` - maxInclusive: reject `(result != -1 && result != 0)`
0e526fe to
a5b837e
Compare
|
According to git history this bug was introduced in commit: What Changed:
What Was Missed:
|
NaN silently passes bounds validation due to trichotomy failure in compareValues.