Bug 208657

Summary: [JSC] Undefined behavior due to missing return statements
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1 mark.lam: review-

Description David Kilzer (:ddkilzer) 2020-03-05 10:50:20 PST
Undefined behavior in JavaScriptCore due to missing return statements.

<rdar://problem/60090482>
Comment 1 David Kilzer (:ddkilzer) 2020-03-05 10:54:26 PST
Created attachment 392599 [details]
Patch v1
Comment 2 Mark Lam 2020-03-05 10:58:58 PST
Comment on attachment 392599 [details]
Patch v1

r=me
Comment 3 Yusuke Suzuki 2020-03-05 13:07:08 PST
I think this is intentional. We would like to make B3/Air's generated code for the super frequently used functions as much as possible. And we intentionally avoid using RELEASE_ASSERT_NOT_REACHED(), and instead, using IGNORE_RETURN_TYPE_WARNINGS_BEGIN to suppress this type of warnings. So I don't think we should use RELEASE_ASSERT_NOT_REACHED().
Comment 4 Mark Lam 2020-03-05 13:12:45 PST
Comment on attachment 392599 [details]
Patch v1

Removing r+ given Yusuke's comment.
Comment 5 David Kilzer (:ddkilzer) 2020-03-05 14:27:10 PST
(In reply to Yusuke Suzuki from comment #3)
> I think this is intentional. We would like to make B3/Air's generated code
> for the super frequently used functions as much as possible. And we
> intentionally avoid using RELEASE_ASSERT_NOT_REACHED(), and instead, using
> IGNORE_RETURN_TYPE_WARNINGS_BEGIN to suppress this type of warnings. So I
> don't think we should use RELEASE_ASSERT_NOT_REACHED().

Okay, moving NTBF.  Looks like IGNORE_RETURN_TYPE_WARNINGS_BEGIN macros are already in these files.  This issue was found by a different tool.