From issues-return-1272-apmail-stdcxx-issues-archive=stdcxx.apache.org@stdcxx.apache.org Sat Apr 12 21:03:11 2008 Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 59530 invoked from network); 12 Apr 2008 21:03:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Apr 2008 21:03:10 -0000 Received: (qmail 34987 invoked by uid 500); 12 Apr 2008 21:03:10 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 34966 invoked by uid 500); 12 Apr 2008 21:03:10 -0000 Mailing-List: contact issues-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list issues@stdcxx.apache.org Received: (qmail 34957 invoked by uid 99); 12 Apr 2008 21:03:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 14:03:10 -0700 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 21:02:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CBAE7234C0BC for ; Sat, 12 Apr 2008 14:00:04 -0700 (PDT) Message-ID: <439422272.1208034004819.JavaMail.jira@brutus> Date: Sat, 12 Apr 2008 14:00:04 -0700 (PDT) From: "Martin Sebor (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Created: (STDCXX-859) SIGSEGV in localedef on invalid Unicode character MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org SIGSEGV in localedef on invalid Unicode character ------------------------------------------------- Key: STDCXX-859 URL: https://issues.apache.org/jira/browse/STDCXX-859 Project: C++ Standard Library Issue Type: Bug Components: Utilities Affects Versions: 4.2.0 Reporter: Martin Sebor Priority: Minor Fix For: 4.2.2 The {{localedef}} utility crashes on the invalid locale definition file below: {noformat} $ cat ctype.src && ./localedef -c -w -f ~/stdcxx/etc/nls/charmaps/ISO-8859-1 -i ctype.src ctype LC_CTYPE cntrl .. END LC_CTYPE Segmentation fault {noformat} The stack trace: {noformat} (gdb) r -c -w -f ~/stdcxx/etc/nls/charmaps/ISO-8859-1 -i ctype.src ctype Starting program: /build/sebor/stdcxx-gcc-4.1.2-15D/bin/localedef -c -w -f ~/stdcxx/etc/nls/charmaps/ISO-8859-1 -i ctype.src ctype [Thread debugging using libthread_db enabled] [Detaching after fork from child process 5076. (Try `set detach-on-fork off'.)] [New Thread 46912499609232 (LWP 5073)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912499609232 (LWP 5073)] 0x00002aaaaab1e9d3 in __rw::__rw_memset (dst=0x79c732, c=48, nbytes=18446744073709475633) at /home/sebor/stdcxx/src/string.cpp:93 93 *tmp = c; Missing separate debuginfos, use: debuginfo-install gcc.x86_64 (gdb) where #0 0x00002aaaaab1e9d3 in __rw::__rw_memset (dst=0x79c732, c=48, nbytes=18446744073709475633) at /home/sebor/stdcxx/src/string.cpp:93 #1 0x00002aaaaab29f14 in std::char_traits::assign ( __s=0x79c732 '0' ..., __n=18446744073709551615, __c=48 '0') at /home/sebor/stdcxx/include/rw/_traits.h:451 #2 0x00002aaaaab2a0bb in std::string::replace (this=0x7ffffed7e0d0, __pos=2, __len=0, __count=18446744073709551615, __val=48 '0') at /home/sebor/stdcxx/include/string.cc:432 #3 0x00002aaaaab3c5f3 in std::string::append (this=0x7ffffed7e0d0, __n=18446744073709551615, __c=48 '0') at /home/sebor/stdcxx/include/string:1244 #4 0x0000000000452ae4 in Def::process_sym_ellipsis (this=0x7ffffed7e790, start_sym=@0x7ffffed7e890, end_sym=@0x7ffffed7e200, type=Scanner::tok_hex_ellipsis, m=__rw::__rw_cntrl) at /home/sebor/stdcxx/util/ctype.cpp:260 #5 0x000000000045345a in Def::process_mask (this=0x7ffffed7e790, m=__rw::__rw_cntrl, name=0x4d2019 "cntrl") at /home/sebor/stdcxx/util/ctype.cpp:349 #6 0x0000000000453ff2 in Def::process_ctype (this=0x7ffffed7e790) at /home/sebor/stdcxx/util/ctype.cpp:764 #7 0x000000000045be12 in Def::process_input (this=0x7ffffed7e790) at /home/sebor/stdcxx/util/def.cpp:495 #8 0x0000000000406b5f in create_locale (std_src=@0x7ffffed7ff60, std_cmap=@0x7ffffed7ff50, outdir=@0x7ffffed7ff40, std_locale=@0x7ffffed7ff30, force_output=true, use_ucs=false, no_position=false, link_aliases=false) at /home/sebor/stdcxx/util/localedef.cpp:217 #9 0x0000000000407f26 in localedef_main (argc=8, argv=0x7ffffed800d8) at /home/sebor/stdcxx/util/localedef.cpp:564 #10 0x0000000000408146 in main (argc=8, argv=0x7ffffed800d8) at /home/sebor/stdcxx/util/localedef.cpp:596 {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.