Closed Bug 2092282 Opened 2 days ago Closed 11 hours ago

[wpt-sync] Sync PR 64551 - [XSLT] Fix crash for xsl:import/xsl:include without href

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64551 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64551
Details from upstream follow.

Mason Freed <masonf@chromium.org> wrote:

[XSLT] Fix crash for xsl:import/xsl:include without href

XSLStyleSheet::LoadChildSheets() passed the result of xsltGetNsProp()
for the href attribute directly to String::FromUtf8(). When the
attribute is missing, xsltGetNsProp() returns null, and converting that
null pointer to std::string_view trips a libc++ hardening assertion,
crashing the renderer.

This CL skips loading a child sheet when href is absent. libxslt still
reports the missing attribute when it compiles the stylesheet.

Fixed: 566820671
Change-Id: I93a86c611cb8b2fd3d4f20da644b19e2eaebdc01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8693277
Auto-Submit: Mason Freed \<masonf@chromium.org>
Commit-Queue: Joey Arhar \<jarhar@chromium.org>
Reviewed-by: Joey Arhar \<jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1732853}

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 18 tests and 5 subtests

Status Summary

Firefox

OK : 6
PASS: 1[GitHub] 9[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 204[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 206[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 2[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 3[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Status: NEW → RESOLVED
Closed: 11 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.