stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nico...@roguewave.com>
Subject Re: Problem building Standard library
Date Fri, 19 May 2006 15:27:04 GMT
The problem - as I saw it in the locale_name_fmat comp test Jeremy was
running - seems to be a buffer overrun in LOCALE_NAME_FMAT.cpp at line
189 (trunk) because the 'def_locale' buffer may not have enough space to
hold the name of a locale, e.g. the one Jeremy got:

LC_CTYPE=en_US.UTF-8;LC_NUMERIC=de_DE;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;LC_TELEPHONE=en_US.UTF-8;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=en_US.UTF-8

The trunk version of the comp test is different in structure than the
one he was using but it uses the same buffer size.

Liviu

Jeremy Dean wrote:
> Looking at the log file, there is not much there other then it seg faulted:
> 
> # /roguewave/SourcePro/test/records/ch13n/11s/locale_name_fmat
> /bin/sh: line 1: 24873 Segmentation fault
> /roguewave/SourcePro/test/records
> /ch13n/11s/locale_name_fmat
> 
> Exit status: -117
> 
> 
> Here is the output of gdb:
> 
> (gdb) run
> Starting program:
> /roguewave/SourcePro/test/records/ch13n/11s/locale_name_fmat 
> /**/
> #undef _RWSTD_LOCALE_NAME_FMAT
> #define _RWSTD_LC_COLLATE   3
> #define _RWSTD_LC_CTYPE     0
> #define _RWSTD_LC_MONETARY  4
> #define _RWSTD_LC_NUMERIC   1
> #define _RWSTD_LC_TIME      2
> #define _RWSTD_LC_MESSAGES  5
> #define _RWSTD_LC_ALL       6
> #define _RWSTD_LC_MAX      _RWSTD_LC_ALL
> #define _RWSTD_LC_MIN      _RWSTD_LC_CTYPE
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00213929 in strcat () from /lib/tls/i686/libc.so.6
> (gdb) where
> #0  0x00213929 in strcat () from /lib/tls/i686/libc.so.6
> #1  0x080492e5 in main ()
>     at
> /roguewave/SourcePro/Ed9/etc/stdlib/config/src/LOCALE_NAME_FMAT.cpp:251
> 
> Jeremy 
> 
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Wednesday, May 17, 2006 10:00 AM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: Problem building Standard library
> 
> Jeremy Dean wrote:
>> I am having a problem building Standard Library.
> [...]
>> When I try to build an optimized build, the localedef hangs and never 
>> returns.
> 
> Have you searched the bug database for similar problems? The configuration
> issue below causes similar symptoms in locale:
> http://issues.apache.org/jira/browse/STDCXX-140. It's been fixed on the
> trunk.
> 
>> I was told to then try building a debug version, and the debug version 
>> of the library fails to compile with the following error:
> [...]
>> /roguewave/SourcePro/Ed9/source/stdlib/setlocale.h:45: error:
>> `_RWSTD_LC_ALL' was not declared in this scope
> 
> That's an obvious configuration issue. You need to find out why the test
> that's supposed to define the macro is failing.
> IIRC, the name of the test is LOCALE_NAME_FORMAT.cpp. Look at the log file
> to see what went wrong.
> 
> Martin
> 


Mime
View raw message