Bug 229575 - Float32Arrays.sort() return undefined when length < 2
Summary: Float32Arrays.sort() return undefined when length < 2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-26 10:49 PDT by carol.sun
Modified: 2021-08-26 22:43 PDT (History)
10 users (show)

See Also:


Attachments
Patch (5.10 KB, patch)
2021-08-26 19:07 PDT, 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 carol.sun 2021-08-26 10:49:01 PDT
Safari has a javascript bug where Float32Arrays and Float64Arrays return undefined if it is sorted and has less than 2 elements. 

For example,
`new Float32Array([1]).slice().sort()`
returns undefined, when it should return Float32Array [4]
Comment 1 Yusuke Suzuki 2021-08-26 19:07:48 PDT
Created attachment 436602 [details]
Patch
Comment 2 EWS 2021-08-26 22:42:49 PDT
Committed r281686 (241036@main): <https://commits.webkit.org/241036@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 436602 [details].
Comment 3 Radar WebKit Bug Importer 2021-08-26 22:43:20 PDT
<rdar://problem/82423241>