Closed Bug 551153 Opened 10 years ago Closed 10 years ago

###!!! ASSERTION: Not a UTF-8 string when running TestUTF and TestAtoms

Categories

(Core :: XPCOM, defect, major)

defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.9.3a3

People

(Reporter: standard8, Assigned: sgautherie)

References

()

Details

(Keywords: assertion)

Attachments

(1 file, 1 obsolete file)

Attached patch The fix (obsolete) — Splinter Review
Following bug 534136, debug builds are showing the following assertion when running TestUTF:

###!!! ASSERTION: Not a UTF-8 string. This code should only be used for converting from known UTF-8 strings.: 'Error', file ../../dist/include/nsUTF8Utils.h, line 100
nsCRT::moz_strdup(unsigned short const*)+0x000003EC [/Users/moztest/comm/main/tb/mozilla/dist/bin/./libxpcom_core.dylib +0x00024A68]
nsCRT::HashCodeAsUTF16(char const*, unsigned int, int*)+0x00000043 [/Users/moztest/comm/main/tb/mozilla/dist/bin/./libxpcom_core.dylib +0x000243CF]

From what I can tell, this is a test to check that a non-UTF8 string is handled correctly, and therefore it shouldn't fail the test.

If I fix that, then TestAtoms also gets a similar assertion.

Therefore I think its right that we just disable the part of the tests that is giving the assertion for debug builds (obviously release builds will still run the test).
Attachment #431345 - Flags: review?(jonas)
Am I right that there are a few tests that SeaMonkey runs but Firefox doesn't due to being libxul? Is there a bug filed on that? It doesn't make too much sense if we have core tests that aren't run by Firefox...
Blocks: SmTestFail
Status: NEW → ASSIGNED
Depends on: 549100
Severity: normal → major
Comment on attachment 431345 [details] [diff] [review]
The fix

I'm actually fixing most of this in bug 551129 already. Though had missed that the hashas16 asserts. However we should only disable the part of the test that uses the Malformed8Strings array. Mind disabling just that in this patch?
Attachment #431345 - Flags: review?(jonas) → review-
Depends on: 549098
Depends on: 551129
Per comment 2.

NB: I assume Mark won't mind if I take over.
Assignee: bugzilla → sgautherie.bz
Attachment #431345 - Attachment is obsolete: true
Attachment #431654 - Flags: review?(jonas)
No longer blocks: SmTestFail
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.3a3
Comment on attachment 431654 [details] [diff] [review]
(Bv1) Make it fully explicit that Malformed8Strings[] is not to be used in debug builds
[Checkin: Comment 4]


http://hg.mozilla.org/mozilla-central/rev/1912459c016b
Attachment #431654 - Attachment description: (Bv1) Make it fully explicit that Malformed8Strings[] is not to be used in debug builds → (Bv1) Make it fully explicit that Malformed8Strings[] is not to be used in debug builds [Checkin: Comment 4]
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.