Bug 13004

Summary: Repeatedly calling XPathExpression.evaluate() causes crashes or memory leaks
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: XMLAssignee: Alexey Proskuryakov <ap>
Severity: Normal    
Priority: P1    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Description Flags
test case (will crash)
kill Expression::optimize()
kill Expression::optimize() darin: review+

Description Alexey Proskuryakov 2007-03-07 11:44:40 PST
Also, assertion failures on debug builds. Patch forthcoming.
Comment 1 Alexey Proskuryakov 2007-03-07 11:52:35 PST
Even worse than that - there is a case that causes a crash in release build, too. This seems way more broken than I thought, still investigating...
Comment 2 Alexey Proskuryakov 2007-03-07 11:53:39 PST
Created attachment 13520 [details]
test case (will crash)
Comment 3 Alexey Proskuryakov 2007-03-07 13:12:23 PST
Created attachment 13523 [details]
kill Expression::optimize()

The expression optimization seems pretty much completely broken to me at the moment. Everything from optimize() to isConstant() has major problems (though it could be that I'm misunderstanding the design, of course).  I suggest just removing it.

I have checked that fast/xpath tests take exactly the same time as they did.
Comment 4 Alexey Proskuryakov 2007-03-07 14:16:12 PST
Created attachment 13528 [details]
kill Expression::optimize()

Oops, forgot to include ChangeLogs.
Comment 5 Darin Adler 2007-03-07 15:05:31 PST
Comment on attachment 13528 [details]
kill Expression::optimize()


If we want to do an optimization like this in the future we should make some performance test cases and make sure they actually get faster.
Comment 6 Sam Weinig 2007-03-07 20:01:10 PST
Landed in r20051.