RESOLVED FIXED 34948
tryMakeString should fail on error in length calculation
https://bugs.webkit.org/show_bug.cgi?id=34948
Summary tryMakeString should fail on error in length calculation
Gavin Barraclough
Reported 2010-02-15 10:51:33 PST
The sum of the length of substrings could overflow.
Attachments
The patch (6.55 KB, patch)
2010-02-15 10:52 PST, Gavin Barraclough
ggaren: review+
Gavin Barraclough
Comment 1 2010-02-15 10:52:57 PST
Created attachment 48759 [details] The patch No perf impact.
Geoffrey Garen
Comment 2 2010-02-15 12:40:47 PST
Comment on attachment 48759 [details] The patch r=me
Gavin Barraclough
Comment 3 2010-02-15 13:00:06 PST
Sending JavaScriptCore/ChangeLog Sending JavaScriptCore/runtime/UString.h Transmitting file data .. Committed revision 54788.
Gavin Barraclough
Comment 4 2010-02-15 14:03:48 PST
Errk! - thanks darin/aroben, made the output bool a reference in r54795. Darin - I will separately check the performance of using |=. My instinct is often to go with the branch, since on x86 the setcc instruction used to be multiple cycle, and a well predicted branch can be free. In this case there may be little performance difference, since I don't think makeString is heavily used or performance critical. As such perhaps I should switch to |=, since it's a line shorter. :o)
Note You need to log in before you can comment on or make changes to this bug.