RESOLVED FIXED Bug 186022
[JSC] JSBigInt::digitDiv has undefined behavior which causes test failures
https://bugs.webkit.org/show_bug.cgi?id=186022
Summary [JSC] JSBigInt::digitDiv has undefined behavior which causes test failures
Yusuke Suzuki
Reported 2018-05-27 10:59:30 PDT
[JSC] JSBigInt::digitDiv has undefined behavior which causes test failures
Attachments
Patch (5.76 KB, patch)
2018-05-27 11:03 PDT, Yusuke Suzuki
no flags
Patch (5.84 KB, patch)
2018-05-27 11:24 PDT, Yusuke Suzuki
no flags
Patch (5.84 KB, patch)
2018-05-27 11:36 PDT, Yusuke Suzuki
no flags
Patch (5.83 KB, patch)
2018-05-27 11:36 PDT, Yusuke Suzuki
no flags
Patch (8.38 KB, patch)
2018-05-27 21:43 PDT, Yusuke Suzuki
no flags
Patch (6.48 KB, patch)
2018-05-27 21:45 PDT, Yusuke Suzuki
no flags
Patch (6.50 KB, patch)
2018-05-27 21:52 PDT, Yusuke Suzuki
darin: review+
Yusuke Suzuki
Comment 1 2018-05-27 11:03:57 PDT
Yusuke Suzuki
Comment 2 2018-05-27 11:05:51 PDT
I don't think we should have perf test right now. We should do that once features are implemented. (we do not have enough DFG and FTL coverage for JSBigInt. in this situation, numbers are not so meaningful.)
Yusuke Suzuki
Comment 3 2018-05-27 11:24:27 PDT
Yusuke Suzuki
Comment 4 2018-05-27 11:36:14 PDT
Yusuke Suzuki
Comment 5 2018-05-27 11:36:55 PDT
Caio Lima
Comment 6 2018-05-27 18:15:51 PDT
Comment on attachment 341427 [details] Patch Nice work! Thank you for this Patch. I think it is ready to go.
Yusuke Suzuki
Comment 7 2018-05-27 21:22:00 PDT
Comment on attachment 341427 [details] Patch I've come up with more efficient and clean code. Updating.
Yusuke Suzuki
Comment 8 2018-05-27 21:43:50 PDT
Yusuke Suzuki
Comment 9 2018-05-27 21:45:04 PDT
Yusuke Suzuki
Comment 10 2018-05-27 21:52:50 PDT
Darin Adler
Comment 11 2018-05-28 17:29:06 PDT
Comment on attachment 341445 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341445&action=review > Source/JavaScriptCore/runtime/JSBigInt.cpp:460 > + static constexpr const unsigned shiftMask = digitBits - 1; I don’t think we ever need const in an expression if we already have constexpr. > Source/JavaScriptCore/runtime/JSBigInt.h:123 > + static constexpr const unsigned maxLength = 1024 * 1024 / (sizeof(void*) * bitsPerByte); Ditto.
Yusuke Suzuki
Comment 12 2018-05-28 23:41:45 PDT
Comment on attachment 341445 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341445&action=review Thanks! >> Source/JavaScriptCore/runtime/JSBigInt.cpp:460 >> + static constexpr const unsigned shiftMask = digitBits - 1; > > I don’t think we ever need const in an expression if we already have constexpr. Fixed. >> Source/JavaScriptCore/runtime/JSBigInt.h:123 >> + static constexpr const unsigned maxLength = 1024 * 1024 / (sizeof(void*) * bitsPerByte); > > Ditto. Fixed.
Yusuke Suzuki
Comment 13 2018-05-28 23:43:43 PDT
Radar WebKit Bug Importer
Comment 14 2018-05-28 23:44:17 PDT
Note You need to log in before you can comment on or make changes to this bug.