[Webkit-unassigned] [Bug 229843] New: Math.hypot checks for infinite values prematurely
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 2 16:58:43 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=229843
Bug ID: 229843
Summary: Math.hypot checks for infinite values prematurely
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: richard.gibson at gmail.com
The algorithm for Math.hypot at https://tc39.es/ecma262/#sec-math.hypot requires coercing each argument to a Number before doing anything else. However, this coercion is incorrectly aborted after encountering an infinite value.
The following expression should throw an exception, but does not:
Math.hypot({valueOf(){ return Infinity }}, {valueOf(){ throw new Error("arguments[1]") }})
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210902/c4057d1a/attachment.htm>
More information about the webkit-unassigned
mailing list