Bug 223050 - [ macOS debug arm64 ] fast/dom/Range/compareBoundaryPoints-compareHow-exception.html is a constant text failure
Summary: [ macOS debug arm64 ] fast/dom/Range/compareBoundaryPoints-compareHow-excepti...
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: Chris Dumez
URL:
Keywords: InRadar
: 223053 223054 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-03-10 15:05 PST by Robert Jenner
Modified: 2021-03-11 09:56 PST (History)
10 users (show)

See Also:


Attachments
Patch (1.76 KB, patch)
2021-03-10 20:07 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Jenner 2021-03-10 15:05:18 PST
fast/dom/Range/compareBoundaryPoints-compareHow-exception.html

is a constant text failure in macOS debug on Apple Silicon only.

HISTORY URL:
https://results.webkit.org/?suite=layout-tests&test=fast%2Fdom%2FRange%2FcompareBoundaryPoints-compareHow-exception.html

DIFF TEXT:
--- /Volumes/Data/worker/bigsur-debug-applesilicon-tests-wk2/build/layout-test-results/fast/dom/Range/compareBoundaryPoints-compareHow-exception-expected.txt
+++ /Volumes/Data/worker/bigsur-debug-applesilicon-tests-wk2/build/layout-test-results/fast/dom/Range/compareBoundaryPoints-compareHow-exception-actual.txt
@@ -8,7 +8,7 @@
 PASS range.compareBoundaryPoints(Range.END_TO_END, sourceRange) is -1
 PASS range.compareBoundaryPoints(Range.END_TO_START, sourceRange) is -1
 PASS range.compareBoundaryPoints(65536, sourceRange) is -1
-PASS range.compareBoundaryPoints(-1, sourceRange) threw exception NotSupportedError: The operation is not supported..
+FAIL range.compareBoundaryPoints(-1, sourceRange) should throw a NotSupportedError. Did not throw.
 PASS range.compareBoundaryPoints(4, sourceRange) threw exception NotSupportedError: The operation is not supported..
 PASS range.compareBoundaryPoints(100, sourceRange) threw exception NotSupportedError: The operation is not supported..
 PASS range.compareBoundaryPoints(65535, sourceRange) threw exception NotSupportedError: The operation is not supported..
Comment 1 Robert Jenner 2021-03-10 15:05:38 PST
I cannot reproduce the failure because I do not have access to an Apple Silicon Mac.
Comment 2 Radar WebKit Bug Importer 2021-03-10 15:06:02 PST
<rdar://problem/75284949>
Comment 3 Chris Dumez 2021-03-10 15:20:52 PST
We are passing -1 as 'how' parameter (of type unsigned short). I would expect this to wrap around and become a very large number. Valid values for 'how' are in the range [0, 3]. We would throw if getting anything outside the range. I am unclear how we went from -1 to [0, 3] for now.
Comment 4 Chris Dumez 2021-03-10 20:07:18 PST
Created attachment 422896 [details]
Patch
Comment 5 Chris Dumez 2021-03-10 20:13:52 PST
Credits to Alexey who helped identify the undefined behavior and Tim who helped with debugging on Apple Silicon.
Comment 6 EWS 2021-03-11 01:10:37 PST
Committed r274271: <https://commits.webkit.org/r274271>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422896 [details].
Comment 7 Alexey Proskuryakov 2021-03-11 09:53:31 PST
*** Bug 223054 has been marked as a duplicate of this bug. ***
Comment 8 Alexey Proskuryakov 2021-03-11 09:56:04 PST
*** Bug 223053 has been marked as a duplicate of this bug. ***