Closed Bug 1721424 Opened 3 years ago Closed 3 years ago

Print preview error when printing

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

VERIFIED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox90 --- wontfix
firefox91 --- verified
firefox92 --- verified

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1715771#c16:

Using the nightly build from https://treeherder.mozilla.org/jobs?repo=mozilla-central&revision=9c579e2ce174b063bdba7b0a7d43896949c19822 which has the fix I keep getting the error message on Ubuntu 18.04 and Windows 10. Reproduced it on a youtube video (eg: https://www.youtube.com/watch?v=kknVfOJZ1w0) and printing to PDF in Landscape (Portrait mode does not always trigger the error but in Landscape I always got it to trigger the error).

This is happening because the page includes a link whose rect has a negative y-coordinate, and _cairo_strtod chokes on the sign. In turn, this results in parse_array infinite-looping when it tries to read the rect coordinates (continually appending zeros to the list of values), until eventually it hits an out-of-memory failure.

Filed https://gitlab.freedesktop.org/cairo/cairo/-/issues/499 about the upstream bug.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

Another possible fix here would be to ensure that we always have HAVE_NEWLOCALE and HAVE_STRTOD_L defined when we build cairo, so that it uses the standard library functions without its fallback wrapper. They're probably available on all platforms we care about these days, I guess.

But (trivially) fixing the bug in cairo's fallback code path means we're not dependent on these configuration details, and seems the lowest-risk approach right now.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f75c10c88c13
Fix _cairo_strtod to accept a leading sign, avoiding infinite loop in parse_array. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Set release status flags based on info from the regressing bug 454059

Comment on attachment 9232187 [details]
Bug 1721424 - Fix _cairo_strtod to accept a leading sign, avoiding infinite loop in parse_array. r?jrmuizel

Beta/Release Uplift Approval Request

  • User impact if declined: Possible failure when generating Save-as-PDF output
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: (Already verified in https://bugzilla.mozilla.org/show_bug.cgi?id=1715771#c22; the two bugs resulted in similar user-visible failure.)
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Trivial fix, merged (with testcase) upstream already
  • String changes made/needed:
Attachment #9232187 - Flags: approval-mozilla-beta?

Comment on attachment 9232187 [details]
Bug 1721424 - Fix _cairo_strtod to accept a leading sign, avoiding infinite loop in parse_array. r?jrmuizel

Approved for 91 beta 6, thanks.

Attachment #9232187 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Marking it as verified on firefox91 and firerfox92, based on my testing from bug 1715771 comment 22 and comment 23.

Status: RESOLVED → VERIFIED
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: