public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "johnlumby at hotmail dot com" <sourceware-bugzilla@sources.redhat.com> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/356] New: localedata: tests-mbwc/tst_iswalnum segfaults during make check Date: Mon, 30 Aug 2004 15:39:00 -0000 [thread overview] Message-ID: <20040830153917.356.johnlumby@hotmail.com> (raw) I am running on linux kernel 2.6.7 on an i686 (pentium III). gcc version 3.4.1 binutils assembler 2.15 downloaded glibc 2.3.3, applied two fixes as documented in msg00179.html (conflicting types for 'fixup' and profile_fixup') msg00013.html (initfini.c) after which build ok but make check - segfault in tst_iswalnum. The segfault occurs in wcfuncs.c func __iswalnum here return wctype_table_lookup (desc, wc); desc is supposed to be a ptr to a const string but contains 0x10. On some more investigating, I think I see (maybe) why: in loadlocale.c func _nl_intern_locale_data() line 118 if (__builtin_expect (_nl_value_types[category][cnt] == word, 0)) In the failing case, category is 0 (LC_CTYPE) and cnt (index) is 82 However the size of the _nl_value_types[LC_CTYPE] array is only 65. So the above line is accessing outrside the bounds of the array and may be therefore incorrectly assigning the value of the word instead of the pointer to the string. The size of the _nl_value_types[LC_CTYPE] array is determined by categories.def whereas the size of the max number of values of LC_CTYPE is determined in _NL_NUM_LC_CTYPE, which has a bigger and different list than categories.def I see the comment /* The actual definition of ctype is meaningless here.*/ in categories.def and I see some tricky run-time resolution of these externs in localeinfo.h : it is desireable to avoid always linking in the code and data for every category when we can tell at link time that they are unused. We can manage this playing some tricks with weak references. so maybe I am completely misunderstanding these type and value arrays (and gdb can't understand any of it either) but it does crash so please can you help. P.S. I did not try building from cvs since I don't have room for hoth 2.3.3 and cvs and want to use 2.3.3, and I see these files look pretty much the same in cvsweb, but if there's a fix in it please advise. -- Summary: localedata: tests-mbwc/tst_iswalnum segfaults during make check Product: glibc Version: 2.3.3 Status: NEW Severity: critical Priority: P2 Component: libc AssignedTo: gotom at debian dot or dot jp ReportedBy: johnlumby at hotmail dot com CC: glibc-bugs at sources dot redhat dot com http://sources.redhat.com/bugzilla/show_bug.cgi?id=356 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next reply other threads:[~2004-08-30 15:39 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-08-30 15:39 johnlumby at hotmail dot com [this message] 2004-08-30 18:11 ` [Bug libc/356] " johnlumby at hotmail dot com 2004-09-26 5:49 ` drepper at redhat dot com 2004-10-10 19:47 ` johnlumby at hotmail dot com 2004-10-10 19:50 ` johnlumby at hotmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040830153917.356.johnlumby@hotmail.com \ --to=sourceware-bugzilla@sources.redhat.com \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).