Closed Bug 549098 Opened 15 years ago Closed 15 years ago

TestUTF reports "ASSERTION: Not a UTF-8 string"

Categories

(Core :: XPCOM, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.9.3a2

People

(Reporter: sgautherie, Assigned: sicking)

References

()

Details

(Keywords: assertion)

Attachments

(1 file)

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1267283913.1267285043.30620.gz
OS X 10.5 comm-central-trunk leak test build on 2010/02/27 07:18:33
{
###!!! 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 458
LossyCopyUTF16toASCII(nsAString_internal const&, nsACString_internal&)+0x000019EE [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/build/libxpcom_core.dylib +0x000C61BC]
LossyCopyUTF16toASCII(nsAString_internal const&, nsACString_internal&)+0x00001A37 [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/build/libxpcom_core.dylib +0x000C6205]
AppendUTF8toUTF16(nsACString_internal const&, nsAString_internal&)+0x0000006A [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/build/libxpcom_core.dylib +0x000C44A8]
start+0x00000FA9 [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/tests/../../dist/bin/TestUTF +0x000025C5]
start+0x00000158 [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/tests/../../dist/bin/TestUTF +0x00001774]
start+0x000000A4 [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/tests/../../dist/bin/TestUTF +0x000016C0]
start+0x00000036 [/builds/slave/comm-central-trunk-macosx-debug/build/objdir/mozilla/xpcom/tests/../../dist/bin/TestUTF +0x00001652]
/bin/sh: line 1:  4404 Abort trap              XPCOM_DEBUG_BREAK=stack-and-abort ../../dist/bin/run-mozilla.sh ../../dist/bin/$f
make[3]: *** [check] Error 134
}
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1267283901.1267285840.32666.gz
Linux comm-central-trunk leak test build on 2010/02/27 07:18:21
{
###!!! 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 458
UNKNOWN [../../dist/bin/libxpcom_core.so +0x000E5083]
UNKNOWN [../../dist/bin/libxpcom_core.so +0x000E50CC]
AppendUTF8toUTF16(nsACString_internal const&, nsAString_internal&)+0x0000006F [../../dist/bin/libxpcom_core.so +0x000E334E]
UNKNOWN [../../dist/bin/TestUTF +0x00001BC1]
UNKNOWN [../../dist/bin/TestUTF +0x00000D3C]
UNKNOWN [../../dist/bin/TestUTF +0x00000C7E]
__libc_start_main+0x000000DC [/lib/libc.so.6 +0x00015DEC]
/bin/sh: line 1: 22551 Aborted                 XPCOM_DEBUG_BREAK=stack-and-abort ../../dist/bin/run-mozilla.sh ../../dist/bin/$f
gmake[3]: *** [check] Error 134
}
OS: Mac OS X → All
Depends on: 549100
Summary: [SeaMonkey] new TestUTF reports "ASSERTION: Not a UTF-8 string" → [SeaMonkey] check: new TestUTF reports "ASSERTION: Not a UTF-8 string"
This is more or less intended behavior unfortunately. The failing test is test_malformed8, which tests that various functions treat malformed utf8 strings properly.

However we apparently also want to assert anytime we end up with invalid utf8 strings, as that should really not happen. And for good reason as when the asserts fire there's generally a bad bug in our code.

The only thing I can think of is to disable these tests for debug builds. Patch coming up.
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1267286709.1267295123.28639.gz
WINNT 5.2 comm-central-trunk leak test build on 2010/02/27 08:05:09
{
###!!! ASSERTION: Not a UTF-8 string. This code should only be used for converting from known UTF-8 strings.: 'Error', file e:\builds\slave\comm-central-trunk-win32-debug\build\objdir\mozilla\dist\include\nsUTF8Utils.h, line 458

command timed out: 300 seconds without output
program finished with exit code 1
}
Hardware: x86 → All
Attached patch Patch to fix (deleted) — Splinter Review
Assignee: nobody → jonas
Attachment #429353 - Flags: review?(dbaron)
This isn't seamonkey specific. Nor is it random so no need to post links to logs.
No longer blocks: SmTestFail
Summary: [SeaMonkey] check: new TestUTF reports "ASSERTION: Not a UTF-8 string" → TestUTF reports "ASSERTION: Not a UTF-8 string"
Comment on attachment 429353 [details] [diff] [review]
Patch to fix

I guess so...
Attachment #429353 - Flags: review?(dbaron) → review+
Checked in, thanks for the quick review

http://hg.mozilla.org/mozilla-central/rev/644d92ef8781
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
V.Fixed, per SM21 tinderboxes.
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.3a2
Blocks: 551153
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: