[wpt-sync] Sync PR 43094 - serial: Fix DCHECK crash when disconnect happens during abort
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox122 fixed)
Tracking | Status | |
---|---|---|
firefox122 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 43094 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/43094
Details from upstream follow.
Alvin Ji <alvinji@chromium.org> wrote:
serial: Fix DCHECK crash when disconnect happens during abort
The original implementation of
SerialPortUnderlyingSink::OnFlushOrDrain
assumed that a valid
pending_operation_
would always be available. However, this assumption
was flawed as disconnection could occur before the completion of the
abort operation.To address this issue, the serialPort-disconnect-during-abort test was
introduced to trigger the crash and demonstrate that the disconnection
handler cleared pending_operation_. The revised code now checks the validity ofpending_operation_
before attempting to resolve it.This modification ensures that
SerialPortUnderlyingSink::OnFlushOrDrain
correctly even when
disconnection occurs during an abort operation, preventing potential
crashes.Bug: 1499045
Change-Id: I5e09595063f8b18f8ff1da82ab23d1b21afdc6d2Reviewed-on: https://chromium-review.googlesource.com/5021930
WPT-Export-Revision: c2dddc0b9e9e2b2a7eec765f736725b3b530a8f1
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Comment 1•11 months ago
|
||
Assignee | ||
Comment 2•11 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 2 tests and 1 subtests
Status Summary
Firefox
OK
: 2
FAIL
: 2
Chrome
CRASH
: 2
Safari
OK
: 2
FAIL
: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /serial/serialPort-disconnect-during-abort.https.any.html [wpt.fyi]:
OK
[GitHub
],SKIP
[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview
,Gecko-android-em-7.0-x86_64-qr-debug-geckoview
,Gecko-android-em-7.0-x86_64-qr-opt-geckoview
,Gecko-linux1804-64-qr-debug
,Gecko-linux1804-64-qr-opt
,Gecko-windows11-32-2009-qr-debug
,Gecko-windows11-32-2009-qr-opt
,Gecko-windows11-64-2009-qr-debug
,Gecko-windows11-64-2009-qr-opt
] (Chrome:CRASH
, Safari:OK
)- Disconnect error during abort works correctly:
FAIL
(Safari:FAIL
)
- Disconnect error during abort works correctly:
- /serial/serialPort-disconnect-during-abort.https.any.worker.html [wpt.fyi]:
OK
[GitHub
],SKIP
[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview
,Gecko-android-em-7.0-x86_64-qr-debug-geckoview
,Gecko-android-em-7.0-x86_64-qr-opt-geckoview
,Gecko-linux1804-64-qr-debug
,Gecko-linux1804-64-qr-opt
,Gecko-windows11-32-2009-qr-debug
,Gecko-windows11-32-2009-qr-opt
,Gecko-windows11-64-2009-qr-debug
,Gecko-windows11-64-2009-qr-opt
] (Chrome:CRASH
, Safari:OK
)- Disconnect error during abort works correctly:
FAIL
(Safari:FAIL
)
- Disconnect error during abort works correctly:
Tests Disabled in Gecko Infrastructure
- /serial/serialPort-disconnect-during-abort.https.any.html [wpt.fyi]:
OK
[GitHub
],SKIP
[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview
,Gecko-android-em-7.0-x86_64-qr-debug-geckoview
,Gecko-android-em-7.0-x86_64-qr-opt-geckoview
,Gecko-linux1804-64-qr-debug
,Gecko-linux1804-64-qr-opt
,Gecko-windows11-32-2009-qr-debug
,Gecko-windows11-32-2009-qr-opt
,Gecko-windows11-64-2009-qr-debug
,Gecko-windows11-64-2009-qr-opt
] (Chrome:CRASH
, Safari:OK
) - /serial/serialPort-disconnect-during-abort.https.any.worker.html [wpt.fyi]:
OK
[GitHub
],SKIP
[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview
,Gecko-android-em-7.0-x86_64-qr-debug-geckoview
,Gecko-android-em-7.0-x86_64-qr-opt-geckoview
,Gecko-linux1804-64-qr-debug
,Gecko-linux1804-64-qr-opt
,Gecko-windows11-32-2009-qr-debug
,Gecko-windows11-32-2009-qr-opt
,Gecko-windows11-64-2009-qr-debug
,Gecko-windows11-64-2009-qr-opt
] (Chrome:CRASH
, Safari:OK
)
Comment 5•10 months ago
|
||
bugherder |
Description
•