Closed
Bug 67004
Opened 24 years ago
Closed 24 years ago
Infinite loop caused by malformed XPath expression
Categories
(Core :: XSLT, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: darkmane, Assigned: keith)
References
Details
Attachments
(3 files)
|
79 bytes,
text/xml
|
Details | |
|
289 bytes,
text/xml
|
Details | |
|
2.74 KB,
patch
|
Details | Diff | Splinter Review |
I'll attach a test case, but in ExprParser::createUnionExpr(ExprLexer& lexer)
the expression '<apply-templates match="testvalue@testattrib=Test"/>' causes an
infinite loop.
The code seems to be stuck on the '='.
| Reporter | ||
Comment 1•24 years ago
|
||
| Reporter | ||
Comment 2•24 years ago
|
||
| Assignee | ||
Comment 3•24 years ago
|
||
Your Xpath expression is invalid. I'll look into the infinite loop because we
shouldn't be entering an infinite loop even on badly formed XPath expressions.
You are missing a "/" between testvalue and @.
--Keith
Comment 4•24 years ago
|
||
Reporter did the above suggestion fix the problem?
| Reporter | ||
Comment 5•24 years ago
|
||
Yes that did fix my problem, but the underlying bug (Infinite Loop on Malformed
XPath rather than complex) is still there.
| Assignee | ||
Comment 7•24 years ago
|
||
Changing subject line to something more meaningful.
Summary: Infinite loop in transformiix caused by complex XPath matching → Infinite loop caused by malformed XPath expression
| Assignee | ||
Comment 9•24 years ago
|
||
67349 is not really a duplicate. It's similiar because we don't throw an XPath
error, but there is no infinate loop caused by "test@attr". The infinite loop
occurs for something like this "test@attr=foo". In both cases we need to report
an error within the expression however.
--Keith
Status: NEW → ASSIGNED
| Assignee | ||
Comment 10•24 years ago
|
||
OK...I know where to fix it, the only problem is how to report the error! :-(
How should we handle errors within Mozilla?
--Keith
| Assignee | ||
Comment 11•24 years ago
|
||
Attaching a patch which at least prints out an error and prevents the infinite
loop.
We still need to come up with a proper way to report errors.
Comment 12•24 years ago
|
||
Error reporting should be done by generating a result document describing the
error. This seems to say, report the error from XPath to XSLT somehow, right?
Perhaps we should add a error code and string to XPath, this should go into
the XPathProcessor, too.
Peter?
Axel
| Assignee | ||
Comment 13•24 years ago
|
||
Comment 15•24 years ago
|
||
Keith has checkin perms, no patch keyword. This is for unprivileged contributors
only.
Axel
Keywords: patch
Comment 16•24 years ago
|
||
r=me, looks good. no new bugs, will file the old ones ;-)
Depends on: 75102
Fixed with the lexer/parser rewrite
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•