Changeset 201737 in webkit
- Timestamp:
- Jun 6, 2016 8:02:06 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r201733 r201737 1 2016-06-06 Michael Saboff <msaboff@apple.com> 2 3 octal and binary parsing is wrong for some programs 4 https://bugs.webkit.org/show_bug.cgi?id=158437 5 6 Reviewed by Saam Barati. 7 8 When there is an error parsing an binary or octal literal, we need to clear the returnValue 9 of any residual value. This is because the processing of returnValue happens before the 10 syntax check for the extra character. Without clearing returnValue, we end trying to 11 categorize the value as an INTEGER or DOUBLE token. If the value happens to be an 12 impure NaN, we ASSERT. 13 14 * parser/Lexer.cpp: 15 (JSC::Lexer<T>::parseBinary): 16 (JSC::Lexer<T>::parseOctal): 17 * tests/stress/regress-158437.js: New test. 18 1 19 2016-06-06 Mark Lam <mark.lam@apple.com> 2 20 -
trunk/Source/JavaScriptCore/parser/Lexer.cpp
r200038 r201737 1569 1569 } 1570 1570 1571 if (isASCIIDigit(m_current)) 1571 if (isASCIIDigit(m_current)) { 1572 returnValue = 0; 1572 1573 return false; 1574 } 1573 1575 1574 1576 returnValue = parseIntOverflow(m_buffer8.data(), m_buffer8.size(), 2); … … 1607 1609 } 1608 1610 1609 if (isASCIIDigit(m_current)) 1611 if (isASCIIDigit(m_current)) { 1612 returnValue = 0; 1610 1613 return false; 1614 } 1611 1615 1612 1616 returnValue = parseIntOverflow(m_buffer8.data(), m_buffer8.size(), 8);
Note: See TracChangeset
for help on using the changeset viewer.