Bug 181150 - [JSC] JIT requires sizeof(bool) == 1
Summary: [JSC] JIT requires sizeof(bool) == 1
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: 2017-12-25 05:27 PST by Yusuke Suzuki
Modified: 2018-01-23 07:12 PST (History)
9 users (show)

See Also:


Attachments
Patch (6.05 KB, patch)
2017-12-25 05:28 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (2.82 MB, application/zip)
2017-12-25 07:58 PST, EWS Watchlist
no flags Details
Patch (1.46 KB, patch)
2018-01-21 01:00 PST, 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 2017-12-25 05:27:23 PST
[JSC] Use uint8_t instead of bool if it is used in JIT
Comment 1 Yusuke Suzuki 2017-12-25 05:28:35 PST
Created attachment 330178 [details]
Patch
Comment 2 EWS Watchlist 2017-12-25 07:58:08 PST
Comment on attachment 330178 [details]
Patch

Attachment 330178 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/5826319

New failing tests:
imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/update.https.html
Comment 3 EWS Watchlist 2017-12-25 07:58:09 PST
Created attachment 330183 [details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 4 Yusuke Suzuki 2017-12-30 10:38:34 PST
The failed test is not related to this patch.
Comment 5 Alex Christensen 2018-01-02 11:31:13 PST
Comment on attachment 330178 [details]
Patch

Are you building on a system where sizeof(bool) != 1?
Comment 6 Yusuke Suzuki 2018-01-04 07:59:34 PST
(In reply to Alex Christensen from comment #5)
> Comment on attachment 330178 [details]
> Patch
> 
> Are you building on a system where sizeof(bool) != 1?

No. But it is not defined. To avoid difficult bugs, I think we should do either,

1. Changing bool to uint8_t if it is touched from JIT code
2. Add the requirement to WebKit, `static_assert(sizeof(bool) == 1, "")`
Comment 7 Saam Barati 2018-01-04 08:44:15 PST
(In reply to Yusuke Suzuki from comment #6)
> (In reply to Alex Christensen from comment #5)
> > Comment on attachment 330178 [details]
> > Patch
> > 
> > Are you building on a system where sizeof(bool) != 1?
> 
> No. But it is not defined. To avoid difficult bugs, I think we should do
> either,
> 
> 1. Changing bool to uint8_t if it is touched from JIT code
> 2. Add the requirement to WebKit, `static_assert(sizeof(bool) == 1, "")`

I like (2)
Comment 8 Yusuke Suzuki 2018-01-04 08:46:19 PST
(In reply to Saam Barati from comment #7)
> (In reply to Yusuke Suzuki from comment #6)
> > (In reply to Alex Christensen from comment #5)
> > > Comment on attachment 330178 [details]
> > > Patch
> > > 
> > > Are you building on a system where sizeof(bool) != 1?
> > 
> > No. But it is not defined. To avoid difficult bugs, I think we should do
> > either,
> > 
> > 1. Changing bool to uint8_t if it is touched from JIT code
> > 2. Add the requirement to WebKit, `static_assert(sizeof(bool) == 1, "")`
> 
> I like (2)

OK, I'll update the patch.
Comment 9 Yusuke Suzuki 2018-01-21 01:00:11 PST
Created attachment 331862 [details]
Patch
Comment 10 WebKit Commit Bot 2018-01-23 07:11:05 PST
Comment on attachment 331862 [details]
Patch

Clearing flags on attachment: 331862

Committed r227411: <https://trac.webkit.org/changeset/227411>
Comment 11 WebKit Commit Bot 2018-01-23 07:11:07 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2018-01-23 07:12:32 PST
<rdar://problem/36774590>