Bug 211445

Summary: [JSC] JSBigInt::maxLengthBits and JSBigInt::maxLength are wrong
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, ticaiolima, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>