Changeset 260522 in webkit
- Timestamp:
- Apr 22, 2020 11:12:34 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r260517 r260522 1 2020-04-22 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] JSBigInt inc operation does not produce right HeapBigInt zero 4 https://bugs.webkit.org/show_bug.cgi?id=210860 5 6 Reviewed by Mark Lam. 7 8 * stress/bigint-zero-canonicalized.js: Added. 9 (shouldBe): 10 1 11 2020-04-22 Saam Barati <sbarati@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r260520 r260522 1 2020-04-22 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] JSBigInt inc operation does not produce right HeapBigInt zero 4 https://bugs.webkit.org/show_bug.cgi?id=210860 5 6 Reviewed by Mark Lam. 7 8 JSBigInt::inc can produce signed HeapBigInt zero, which is not meeting the invariant of JSBigInt. 9 This patch fixes it by checking zero status before setting `setSign(true)`. 10 11 * runtime/JSBigInt.cpp: 12 (JSC::JSBigInt::inc): 13 * runtime/JSCJSValue.cpp: 14 (JSC::JSValue::dumpInContextAssumingStructure const): 15 1 16 2020-04-22 Devin Rousso <drousso@apple.com> 2 17 -
trunk/Source/JavaScriptCore/runtime/JSBigInt.cpp
r260358 r260522 447 447 return absoluteAddOne(globalObject, x, SignOption::Unsigned); 448 448 JSBigInt* result = absoluteSubOne(globalObject, x, x->length()); 449 if (result->isZero()) 450 return result; 449 451 result->setSign(true); 450 452 return result; -
trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp
r260331 r260522 313 313 out.print("Structure: ", inContext(*jsCast<Structure*>(asCell()), context)); 314 314 else if (isHeapBigInt()) 315 out.print("BigInt[heap-allocated]: addr=", RawPointer(asCell()) );315 out.print("BigInt[heap-allocated]: addr=", RawPointer(asCell()), ", length=", jsCast<JSBigInt*>(asCell())->length(), ", sign=", jsCast<JSBigInt*>(asCell())->sign()); 316 316 else if (structure->classInfo()->isSubClassOf(JSObject::info())) { 317 317 out.print("Object: ", RawPointer(asCell()));
Note: See TracChangeset
for help on using the changeset viewer.