Closed Bug 77300 Opened 24 years ago Closed 23 years ago

ASSERTION: unable to use nl_langinfo(CODESET): '0'

Categories

(Core :: Internationalization, defect)

x86
SunOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: timeless, Assigned: bstell)

References

()

Details

(Keywords: assertion)

Attachments

(2 files)

SunOS 5.7 Generic_106541-15 sun4u sparc SUNW,Ultra-2 glib 1.2.9 libIDL 0.6.8 qt 2.2.0 mozilla CVS ~/.mozconfig ac_add_options --without-gtk ac_add_options --with-qt ac_add_options --enable-toolkit=qt ac_add_options --enable-ultrasparc ac_add_options --disable-tests ac_add_options --with-qtdir=/tmp/qt-2.2.0/ ac_add_options --with-libIDL-prefix=/tmp/idl/ mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-qt-@CONFIG_GUESS@ ./run-mozilla.sh ./mozilla-bin MOZILLA_FIVE_HOME=. LD_LIBRARY_PATH=.:./plugins:/tmp/qt-2.2.0/lib/:/tmp/idl/lib:/tmp/glib/lib LIBRARY_PATH=.:./components SHLIB_PATH=. LIBPATH=. ADDON_PATH=. MOZ_PROGRAM=./mozilla-bin MOZ_TOOLKIT= moz_debug=0 moz_debugger= File descriptors set to 512 Type Manifest File: /tmp/obj-qt-sparc-sun- solaris2.7/dist/bin/components/xpti.dat nsNativeComponentLoader: autoregistering begins. nsNativeComponentLoader: autoregistering succeeded nNCL: registering deferred (0) ###!!! ASSERTION: failed to create encoder: '0', file /tmp/mozilla/intl/uconv/src/nsUNIXCharset.cpp, line 396 ###!!! Break: at file /tmp/mozilla/intl/uconv/src/nsUNIXCharset.cpp, line 396 ###!!! ASSERTION: unable to use nl_langinfo(CODESET): '0', file /tmp/mozilla/intl/uconv/src/nsUNIXCharset.cpp, line 320 ###!!! Break: at file /tmp/mozilla/intl/uconv/src/nsUNIXCharset.cpp, line 320 Initialized app shell component {18c2f989-b09f-11d2-bcde-00805f0e1353}, rv=0x00000000 GFX: dpi=96 t2p=0.0666667 p2t=15 depth=32 WEBSHELL+ = 1 nsPluginHostImpl ctor ********** Got plugins path: /tmp/obj-qt-sparc-sun-solaris2.7/dist/bin/./plugins WEBSHELL+ = 2 Disabling View Source StyleSheet Enabling Quirk StyleSheet Note: verifyreflow is disabled Style Data Sharing is Enabled :) Note: styleverifytree is disabled Note: frameverifytree is disabled Shut down app shell component {18c2f989-b09f-11d2-bcde-00805f0e1353}, rv=0x00000000 nsPluginHostImpl::Observe "xpcom-shutdown" ### beging nsCacheService::Shutdown() ###!!! ASSERTION: ### active entry = nsnull!: 'entry', file /tmp/mozilla/netwerk/cache/src/nsCacheService.cpp, line 1057 ###!!! Break: at file /tmp/mozilla/netwerk/cache/src/nsCacheService.cpp, line 1057 Segmentation Fault Steps to reproduce: build moz Qt, run moz Expected Results: Mozilla Window. Actual Results: No Window, +Seg Fault. I'm filing two bugs, one for intl and one for cache
timeless: 1) can you run the 'locale' command so I can see what locale you are using? 2) can you find out what the charset name is when it fails? thanks
y:~: locale LANG= LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL= The second request will take work, i can't run gdb because i've eaten my entire swap space by building. I'll have the answer by friday. However, if you provide a recommended debugging patch i can try to have it thursday noonish.
add Ulrich Drepper to cc:
If I set LC_CTYPE to "C" I get the assert but the app runs. timeless: do you find that the assert causes the app to stop?
Strange. Not that I would ever have suggested to use nl_langinfo() on Solaris but it seems to work fine for me. Well, "fine" is the way that the return value makes sense even if they are very non-standard. drepper@blues drepper$ LC_ALL=en_US.UTF-8 ./u codeset = UTF-8 drepper@blues drepper$ LC_ALL=en_US ./u codeset = ISO8859-1 drepper@blues drepper$ LC_ALL=fr.ISO8859-15 ./u codeset = ISO8859-15 drepper@blues drepper$ LC_ALL=C ./u codeset = 646 This is a Solaris 7 machine. On Solaris 8 the results are the same. The only bad things about this are the names of the charsets: 646 should be ISO_646.IRV:1991 or ISO646-US ISO8859-1 should be ISO-8859-1 Instead of running locale, run this program with different locales as I did above: #include <langinfo.h> #include <locale.h> int main() { setlocale (LC_ALL, ""); printf ("codeset = %s\n", nl_langinfo (CODESET) ?: "**NULL**"); return 0; } (OK, some gcc-ism in there but I'm lazy.)
You omited #include <stdio.h> y:/tmp: g++ a.cpp y:/tmp: ./a.out codeset = 646 y:/tmp: setenv LC_ALL en_US.UTF-8 y:/tmp: ./a.out codeset = UTF-8 y:/tmp: setenv LC_ALL en_US y:/tmp: ./a.out codeset = ISO8859-1 y:/tmp: setenv LC_ALL fr.ISO8859-15 y:/tmp: ./a.out codeset = ISO8859-15 y:/tmp: setenv LC_ALL C y:/tmp: ./a.out codeset = 646 remember, this is solaris 7 I'm not sure if this assert is killing mozilla, actually i suspect it's the next assert that is, but I can't tell if this one is hurting, so I filed this bug [and its sibling for the other assert]. Can you fix it so we don't assert?
I want to fix the assert. Do we think this should be part of 0.9 or 0.9.1 ?
Status: NEW → ASSIGNED
On Linux: set LC_CTYPE=C => nl_langinfo(CODESET) returns "ANSI_X3.4-1968" On Solaris: set LC_CTYPE=C => nl_langinfo(CODESET) returns "646" Frank: should we add mappings to charsetalias.properties: ansi_x3.4-1968=us-ascii 646=us-ascii
I believe Mozilla's aliases are for the Internet (e.g. HTTP, HTML, email). nl_langinfo's name space is quite distinct from that. I believe the vendors just came up with whatever names they felt like using. That doesn't mean, of course, that those names are used on the Internet. Yeah, yeah, be liberal in what you accept and all that, but being too liberal isn't good either. (Look at the amount of "broken" HTML on the Web today.)
Blocks: qt
Changing QA contact to katakai@japan.sun.com. Please re-assign further as appropriate.
QA Contact: andreasb → katakai
Blocks: 79119
ANSI_X3.4-1968 is in http://www.iana.org/assignments/character-sets so we should add it to charsetalias.properties anyway I think it is fine to also add 646 to charsetalias.properties bstell- go ahead and make the patch. I will review it after you put into the attachment
Attached patch patch defining the 2 charsets (deleted) — Splinter Review
r=ftang
I hereby give rs= to bstell and others for all such property-file-only changes. Any property-file changes that have code effects would have to come with code changes, too, and all the changes would need full review. /be
Brendan emailed me a clarification: > I hereby give rs= for all such changes -- so long as you're sure of the > "only" part. Any whiff of code changes, or effects on code that knows > something about a property, or property naming conventions, etc., and we > need to have full review. > > /be
Target Milestone: --- → mozilla0.9.1
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verifiled on Solaris.
Status: RESOLVED → VERIFIED
Keywords: assertion
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: