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..
I cannot reproduce the failure because I do not have access to an Apple Silicon Mac.
<rdar://problem/75284949>
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.
Created attachment 422896 [details] Patch
Credits to Alexey who helped identify the undefined behavior and Tim who helped with debugging on Apple Silicon.
Committed r274271: <https://commits.webkit.org/r274271> All reviewed patches have been landed. Closing bug and clearing flags on attachment 422896 [details].
*** Bug 223054 has been marked as a duplicate of this bug. ***
*** Bug 223053 has been marked as a duplicate of this bug. ***