Changeset 38929 in webkit for trunk/JavaScriptCore
- Timestamp:
- Dec 2, 2008, 8:53:02 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r38928 r38929 1 2008-12-02 Geoffrey Garen <[email protected]> 2 3 Reviewed by Cameron Zwarich. 4 5 Fixed https://bugs.webkit.org/show_bug.cgi?id=22537 6 REGRESSION (r38745): Assertion failure in jsSubstring() at ge.com 7 8 The bug was that index would become greater than length, so our 9 "end of input" checks, which all check "index == length", would fail. 10 11 The solution is to check for end of input before incrementing index, 12 to ensure that index is always <= length. 13 14 As a side benefit, generateJumpIfEndOfInput can now use je instead of 15 jg, which should be slightly faster. 16 17 * wrec/WREC.cpp: 18 (JSC::WREC::Generator::compileRegExp): 19 * wrec/WRECGenerator.cpp: 20 (JSC::WREC::Generator::generateJumpIfEndOfInput): 21 1 22 2008-12-02 Gavin Barraclough <[email protected]> 2 23 -
trunk/JavaScriptCore/wrec/WREC.cpp
r38839 r38929 61 61 62 62 failures.link(); 63 generator.generateJumpIfEndOfInput(failures); 63 64 generator.generateIncrementIndex(); 64 generator.generateJumpIfEndOfInput(failures);65 65 parser.parsePattern(failures); 66 66 generator.generateReturnSuccess(); -
trunk/JavaScriptCore/wrec/WRECGenerator.cpp
r38891 r38929 114 114 void Generator::generateJumpIfEndOfInput(JumpList& failures) 115 115 { 116 failures.append(j g32(index, length));116 failures.append(je32(length, index)); 117 117 } 118 118
Note:
See TracChangeset
for help on using the changeset viewer.