Changeset 43110 in webkit
- Timestamp:
- Apr 30, 2009 9:10:25 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r43105 r43110 1 2009-04-30 Gavin Barraclough <barraclough@apple.com> 2 3 Reviewed by Geoff Garen. 4 5 Bug fix for rdar:/68455379. If a case-insensitive regex contains 6 a character class containing a range with an upper bound of \uFFFF 7 the parser will infinite-loop whist adding other-case characters 8 for characters in the range that do have another case. 9 10 * yarr/RegexCompiler.cpp: 11 (JSC::Yarr::CharacterClassConstructor::putRange): 12 1 13 2009-04-30 Gavin Barraclough <barraclough@apple.com> 2 14 -
trunk/JavaScriptCore/yarr/RegexCompiler.cpp
r43100 r43110 109 109 } 110 110 if (hi >= 0x80) { 111 UCharunicodeCurr = std::max(lo, (UChar)0x80);111 uint32_t unicodeCurr = std::max(lo, (UChar)0x80); 112 112 addSortedRange(m_rangesUnicode, unicodeCurr, hi); 113 113 114 114 if (m_isCaseInsensitive) { 115 115 while (unicodeCurr <= hi) { 116 // If the upper bound of the range (hi) is 0xffff, the increments to 117 // unicodeCurr in this loop may take it to 0x10000. This is fine 118 // (if so we won't re-enter the loop, since the loop condition above 119 // will definitely fail) - but this does mean we cannot use a UChar 120 // to represent unicodeCurr, we must use a 32-bit value instead. 121 ASSERT(unicodeCurr <= 0xffff); 122 116 123 if (isUnicodeUpper(unicodeCurr)) { 117 124 UChar lowerCaseRangeBegin = Unicode::toLower(unicodeCurr); -
trunk/LayoutTests/ChangeLog
r43109 r43110 1 2009-04-30 Gavin Barraclough <barraclough@apple.com> 2 3 Reviewed by Geoff Garen. 4 5 Add layout test for rdar:/68455379. 6 7 * fast/js/regexp-range-bound-ffff-expected.txt: Added. 8 * fast/js/regexp-range-bound-ffff.html: Added. 9 * fast/js/resources/regexp-range-bound-ffff.js: Added. 10 1 11 2009-04-30 Eric Carlson <eric.carlson@apple.com> 2 12
Note: See TracChangeset
for help on using the changeset viewer.