Bug 211445 - [JSC] JSBigInt::maxLengthBits and JSBigInt::maxLength are wrong
Summary: [JSC] JSBigInt::maxLengthBits and JSBigInt::maxLength are wrong
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-05 07:28 PDT by Yusuke Suzuki
Modified: 2020-05-05 09:25 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.18 KB, patch)
2020-05-05 07:33 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (2.19 KB, patch)
2020-05-05 07:49 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2020-05-05 07:28:05 PDT
[JSC] JSBigInt::maxLengthBits and JSBigInt::maxLength are wrong
Comment 1 Yusuke Suzuki 2020-05-05 07:33:15 PDT
Created attachment 398502 [details]
Patch
Comment 2 Caio Lima 2020-05-05 07:41:01 PDT
Comment on attachment 398502 [details]
Patch

LGTM. I'm wondering if we want to static assert that `maxLengthBits % (sizeof(Digit) * bitsPerByte) == 0`. IIUC, if this is not true, we will have `maxLengthBits` not aligned with `maxLength`.
Comment 3 Yusuke Suzuki 2020-05-05 07:47:08 PDT
(In reply to Caio Lima from comment #2)
> Comment on attachment 398502 [details]
> Patch
> 
> LGTM. I'm wondering if we want to static assert that `maxLengthBits %
> (sizeof(Digit) * bitsPerByte) == 0`. IIUC, if this is not true, we will have
> `maxLengthBits` not aligned with `maxLength`.

Sounds nice.
Comment 4 Yusuke Suzuki 2020-05-05 07:49:18 PDT
Created attachment 398505 [details]
Patch
Comment 5 Mark Lam 2020-05-05 08:24:10 PDT
Comment on attachment 398505 [details]
Patch

r=me
Comment 6 Mark Lam 2020-05-05 08:24:46 PDT
Comment on attachment 398505 [details]
Patch

Undoing can+ for now to let EWS run.
Comment 7 Mark Lam 2020-05-05 08:25:26 PDT
(In reply to Mark Lam from comment #6)
> Comment on attachment 398505 [details]
> Patch
> 
> Undoing can+ for now to let EWS run.

Ah autocorrect: /can+/cq+/
Comment 8 Yusuke Suzuki 2020-05-05 09:00:29 PDT
Comment on attachment 398505 [details]
Patch

EWS gets green, landing
Comment 9 EWS 2020-05-05 09:24:05 PDT
Committed r261174: <https://trac.webkit.org/changeset/261174>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398505 [details].
Comment 10 Radar WebKit Bug Importer 2020-05-05 09:25:18 PDT
<rdar://problem/62890572>