Closed Bug 851982 Opened 7 years ago Closed 6 years ago

Assertion failure in nsUnicharStreamLoader::WriteSegmentFun with ISO-2022-JP (#2)

Categories

(Core :: Networking, defect, critical)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla24
Tracking Status
firefox23 --- wontfix
firefox24 --- fixed
firefox-esr17 --- unaffected
b2g18 --- unaffected
b2g-v1.1hd --- unaffected
b2g-v1.2 --- unaffected

People

(Reporter: jruderman, Assigned: emk)

References

Details

(Keywords: assertion, sec-moderate, testcase, Whiteboard: [adv-main24+])

Attachments

(3 files)

Attached file testcase
Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))), at netwerk/base/src/nsUnicharStreamLoader.cpp:218

Same assertion as bug 843434, which Josh fixed last week.
Assignee: nobody → VYV03354
mErrBehavior check is needed here, too.
https://mxr.mozilla.org/mozilla-central/source/intl/uconv/ucvja/nsJapaneseToUnicode.cpp#506
And we should audit the all occurrence of |goto error2;|.
Duplicate of this bug: 883083
also this is happing on realworld sites see my bug 883083
:emk or josh, can you supply a patch here?
Attachment #765062 - Flags: review?(smontagu)
Attached patch Regression testSplinter Review
Attachment #765064 - Flags: review?(smontagu)
Although the assertions are debug only, this change is web-visible because of TextDecoder. The test should catch all possible cases.

I commented out |SimpleTest.expectAssertions(0, 2);| line because testharness doesn't define SimpleTest.
Attachment #765062 - Flags: review?(smontagu) → review+
Attachment #765064 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/84855cdd91da
https://hg.mozilla.org/mozilla-central/rev/d1d09117491f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
> I commented out |SimpleTest.expectAssertions(0, 2);| line because testharness 
> doesn't define SimpleTest.

Which test harness does this test run in?
dom/encoding/test/test_TextDecoder.html.
Was this bug present in Firefox 23 or earlier?
Flags: needinfo?(VYV03354)
Probably Firefox 20 or later. This is a regression from bug 638379.
Flags: needinfo?(VYV03354)
Group: core-security
You need to log in before you can comment on or make changes to this bug.