Closed
Bug 53335
Opened 24 years ago
Closed 24 years ago
substring with infinite and NaN indexs gives incorrect values
Categories
(Core :: XSLT, defect, P3)
Tracking
()
People
(Reporter: jjs, Assigned: keith)
References
()
Details
Attachments
(1 file)
The test cases that use infinite and NaN values are not returning the correct substrings as per the XPath spec for substring unusuale cases. Further investigations shows that the comparisons in StringFunctions.cpp (149+) allways return true, I.e if dbl is either NaN or +/- Infinity then dbl == Double::NaN is always true dbl == Double::POSITIVE_INFINITY is always true dbl == Double::NEGITIVE_INFINITY is always true This causes the checks for the unusuale cases to give incorrect results. Anyone got a vague Idea about how/why/where?
Well looks like the problem impacts windoze only. Bug 53518 is a general traking bug for broken maths under win2k. Can someone verify this?
Depends on: 53518
Comment 2•24 years ago
|
||
Testing the Javascript implementation using the following attachment gives: NaN == NaN, false NaN == -Infinity, false NaN == Infinity, false -Infinity == NaN, false -Infinity == -Infinity, true -Infinity == Infinity, false Infinity == NaN, false Infinity == -Infinity, false Infinity == Infinity, true I'll look into StringFunctions.cpp next
Comment 3•24 years ago
|
||
Comment 4•24 years ago
|
||
Isn't the file you are referencing StringFunctionCall.cpp? lines 147-152: if ( argc == 3) { dbl += evaluateToNumber((Expr*)iter->next(),context, cs); if (dbl == Double::POSITIVE_INFINITY) ++endIdx; else if ( dbl == Double::NEGATIVE_INFINITY ) endIdx = 0; else endIdx = (Int32)floor(dbl); } This seems to just be changing the ending index of the substring in a reasonable fashion. I checked the functions.html/functions.xml url using 2000100920/Win2000 and the tests of +- infinity return blank which agrees with IE 5.5. Is that not correct?
Bob, Please check the dependent bug 53518 for moe information on this bug.
Comment 6•24 years ago
|
||
jjs@acis.com.au - could you say exactly what the expected results are of loading your testcase in Mozilla? Gerv
Comment 7•24 years ago
|
||
Reporter is this still a problem in the latest builds?
Comment 8•24 years ago
|
||
Marking INVALID due to lack of reponse from reporter. Reopen if anyone still sees this problem.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
This whole problem is better documented and tracked in 53518
Status: RESOLVED → CLOSED
Updated•24 years ago
|
Status: CLOSED → UNCONFIRMED
Resolution: INVALID → ---
Comment 10•24 years ago
|
||
OK, reopening this bug. It is sure valid, and is one symptom of our troubles to handle NaNs on Windows. I don't have a windows build myself, but the js sources say VC is horked, and I trust them. Oh, and we don't even compile on OS/2. Keyser, it looks like you don't have a windows build either, so resolving this bug is probably not the right thing to do. And INVALID is saying, that we do like the specs say, you were probably looking for WORKSFORME. INVALID is a harsh word, don't say it unless you're 100% sure, and have good evidence. Axel
Reporter | ||
Comment 11•24 years ago
|
||
This seems to be getting a bit out of hand. How about I just classify this as a duplicate of bug 53518 and allow it to disappear. Its no ones fault that windows is busted ass and broken down. :) Err...I dont have a resolution of duplicate...Can some one make this go away?
No longer depends on: 53518
Comment 12•24 years ago
|
||
Hi Jus, duplicate is a good idea, doing so. See more substring foo in bug 59649 Axel *** This bug has been marked as a duplicate of 53518 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•