Changeset 110443 in webkit
- Timestamp:
- Mar 12, 2012 10:31:26 AM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r110430 r110443 1 2012-03-12 SangGyu Lee <sg5.lee@samsung.com> 2 3 Integer overflow check code in arithmetic operation in classic interpreter 4 https://bugs.webkit.org/show_bug.cgi?id=80465 5 6 Reviewed by Gavin Barraclough. 7 8 * interpreter/Interpreter.cpp: 9 (JSC::Interpreter::privateExecute): 10 1 11 2012-03-12 Zeno Albisser <zeno@webkit.org> 2 12 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r109866 r110443 2353 2353 JSValue src1 = callFrame->r(vPC[2].u.operand).jsValue(); 2354 2354 JSValue src2 = callFrame->r(vPC[3].u.operand).jsValue(); 2355 if (src1.isInt32() && src2.isInt32() && !( src1.asInt32() | (src2.asInt32() & 0xc0000000))) // no overflow2355 if (src1.isInt32() && src2.isInt32() && !((src1.asInt32() | src2.asInt32()) & 0xc0000000)) // no overflow 2356 2356 callFrame->uncheckedR(dst) = jsNumber(src1.asInt32() + src2.asInt32()); 2357 2357 else { … … 2372 2372 JSValue src1 = callFrame->r(vPC[2].u.operand).jsValue(); 2373 2373 JSValue src2 = callFrame->r(vPC[3].u.operand).jsValue(); 2374 if (src1.isInt32() && src2.isInt32() && !(src1.asInt32() | src2.asInt32() >> 15)) // no overflow2374 if (src1.isInt32() && src2.isInt32() && !(src1.asInt32() | src2.asInt32()) >> 15) // no overflow 2375 2375 callFrame->uncheckedR(dst) = jsNumber(src1.asInt32() * src2.asInt32()); 2376 2376 else { … … 2440 2440 JSValue src1 = callFrame->r(vPC[2].u.operand).jsValue(); 2441 2441 JSValue src2 = callFrame->r(vPC[3].u.operand).jsValue(); 2442 if (src1.isInt32() && src2.isInt32() && !( src1.asInt32() | (src2.asInt32() & 0xc0000000))) // no overflow2442 if (src1.isInt32() && src2.isInt32() && !((src1.asInt32() | src2.asInt32()) & 0xc0000000)) // no overflow 2443 2443 callFrame->uncheckedR(dst) = jsNumber(src1.asInt32() - src2.asInt32()); 2444 2444 else {
Note: See TracChangeset
for help on using the changeset viewer.