Closed Bug 1669162 Opened 5 years ago Closed 5 years ago

Crash in [@ mapped_hyph_compile_file]

Categories

(Core :: Layout: Text and Fonts, defect, P2)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- unaffected
firefox83 --- fixed

People

(Reporter: gsvelto, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/dc737d7e-22c7-4c3f-bf0f-d97330201003

Reason: SIGSEGV /SEGV_MAPERR

MOZ_CRASH Reason: assertion failed: `(left == right)` left: `"ISO8859-1"`, right: `"UTF-8"`: Only UTF-8 patterns are accepted!

Top 10 frames of crashing thread:

0 libxul.so RustMozCrash mozglue/static/rust/wrappers.cpp:17
1 libxul.so mozglue_static::panic_hook mozglue/static/rust/lib.rs:89
2 libxul.so core::ops::function::Fn::call src/libcore/ops/function.rs:72
3 libxul.so std::panicking::rust_panic_with_hook src/libstd/panicking.rs:474
4 libxul.so rust_begin_unwind src/libstd/panicking.rs:378
5 libxul.so std::panicking::begin_panic_fmt src/libstd/panicking.rs:332
6 libxul.so mapped_hyph_compile_file third_party/rust/mapped_hyph/src/ffi.rs:226
7 libxul.so nsHyphenator::nsHyphenator intl/hyphenation/glue/nsHyphenator.cpp:306
8 libxul.so nsHyphenationManager::GetHyphenator intl/hyphenation/glue/nsHyphenationManager.cpp:149
9 libxul.so nsHyphenationManager::ShareHyphDictToProcess intl/hyphenation/glue/nsHyphenationManager.cpp:349

This appears to be a regression from bug 1667192, Jonathan can you have a look and confirm if my hunch is correct?

This started with buildid 20201002092536.

Flags: needinfo?(jfkthame)

Yes, definitely bug 1667192.

This seems to imply that the user has added a hyphenation dictionary to their installation (I wonder how?), as none of the resources we ship have ISO8859-1 encoding. Prior to bug 1667192 their added dictionary would simply have been ignored, but now we attempt (and fail) to load it.

A minimal fix would be to just reject the resource (without panicking), but maybe we can do better. I'll look into it.

Flags: needinfo?(jfkthame)

Oh, wait - this is on Linux, not Android; that makes it less surprising that someone has modified the collection of dictionaries, at least.

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

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

I guess somebody on Arch Linux has been building/installing Nightly with uncompiled .dic hyphenation files. That hasn't been supported since bug 1590167 (landed in mozilla72), but apparently they didn't notice that their hyphenation wasn't working any more, or at least didn't report it.

With bug 1667192, we reintroduced support for .dic files, for the sake of Android (but the code isn't limited to that platform), with the caveat that only UTF-8 files are accepted. But this user's .dic(s) use legacy encodings, and the compiler asserts on that.

So the patch here updates the compiler to safely reject non-Unicode files, rather than asserting. So these people's files still won't work (but that doesn't seem to have been much of an issue!) unless they update the encoding, but at least they won't crash.

(I might consider support for legacy encodings as a followup, though I don't see it as a high priority.)

Priority: -- → P2
Attachment #9179601 - Attachment description: Bug 1669162 - Update mapped_hyph to 0.4.1 so that .dic parse errors are non-fatal. r=heycam → Bug 1669162 - Update mapped_hyph to 0.4.2 so that .dic parse errors are non-fatal. r=heycam
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bc5b6dcb7057 Update mapped_hyph to 0.4.2 so that .dic parse errors are non-fatal. r=heycam
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
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: