Bug 208657 - [JSC] Undefined behavior due to missing return statements
Summary: [JSC] Undefined behavior due to missing return statements
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-05 10:50 PST by David Kilzer (:ddkilzer)
Modified: 2020-03-05 14:27 PST (History)
8 users (show)

See Also:


Attachments
Patch v1 (11.68 KB, patch)
2020-03-05 10:54 PST, David Kilzer (:ddkilzer)
mark.lam: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.