Problem with Memory with strings on HP-IPF

2007-11-30 Thread Jeremy Dean
I have a customer that is working on HP-IPF with the SourcePro edition 9
release of the Standard Library.  He is noticing quite a bit of memory
growth on the HP IPF versus the HP pa-risc platforms.  I was wondering
if anyone has run into this problem.
 
Here is a sample test case provided by the customer:
 
#include stdio.h
#include stdlib.h
#include string
 

void print_mallinfo()
{
struct mallinfo info;
info = mallinfo();
printf(Memory allocation info:\n);
printf( total space in arena = %d\n, info.arena);
printf( number of ordinary blocks = %d\n, info.ordblks);
printf( number of small blocks = %d\n, info.smblks);
printf( space in holding block headers = %d\n, info.hblkhd);
printf( number of holding blocks = %d\n, info.hblks);
printf( space in small blocks in use = %d\n, info.usmblks);
printf( space in free small blocks = %d\n, info.fsmblks);
printf( space in ordinary blocks in use = %d\n,
info.uordblks);
printf( space in free ordinary blocks = %d\n, info.fordblks);
printf( keep option space penalty = %d\n, info.keepcost);
printf( space in use = %d\n, info.usmblks + info.uordblks);
printf( space free = %d\n, info.fsmblks + info.fordblks); }
 
main(int argc, char **argv)
{
for (int ix=0; ix2; ix++)
{
std::string *p = new std::string(A);
print_mallinfo();
}
return 0;
}
 
On a HP-paRisc machine the output is as follows:
 
Memory allocation info:
 total space in arena = 106444
 number of ordinary blocks = 141
 number of small blocks = 200
 space in holding block headers = 1832
 number of holding blocks = 2
 space in small blocks in use = 80
 space in free small blocks = 7920
 space in ordinary blocks in use = 21928
 space in free ordinary blocks = 74672
 keep option space penalty = 0
 space in use = 22008
 space free = 82592
Memory allocation info:
 total space in arena = 106444
 number of ordinary blocks = 142
 number of small blocks = 200
 space in holding block headers = 1832
 number of holding blocks = 2
 space in small blocks in use = 160
 space in free small blocks = 7840
 space in ordinary blocks in use = 30152
 space in free ordinary blocks = 66448
 keep option space penalty = 0
 space in use = 30312
 space free = 74288
 
I am still working on trying to get the IPF results.
 
Jeremy


Crash with using a std::vector

2007-11-07 Thread Jeremy Dean
I have a customer that is getting the following core dump. It apperas to
be throwing an assertion in the reference operator* () const function.
Any thoughts as to what might be causing this error?
 
Platform:
AIX 5.3
xlC++ 8.0
Multi Threaded Shared Release Library.
 
Core output as follows:
 
OT/Abort trap in pthread_kill at 0xd0128514 ($t5)
0xd0128514 (pthread_kill+0x88) 80410014 lwz   r2,0x14(r1)
(dbx) where
pthread_kill(??, ??) at 0xd0128514
_p_raise(??) at 0xd0127fac
raise.raise(??) at 0xd0353a98
abort() at 0xd03b1c78
__rw_assert_fail(const char*,const char*,int,const char*)(expr =
_C_is_dereferenceable (), file =
/usr/opt/RogueWave/SourcePro/Ed9/includ
e/rw/_iterbase.h, line = 428, func = (nil)), line 96 in assert.cpp
SysTranIdMgr.operator*() const(0x31301d08), line 428 in _iterbase.h
SysKosinLogStatMdlBroker.operator[](unsigned long)(0x31301d58, 0x8),
line 478 in vector
ZokItakuSCSV::outMotoData()(this = 0x314c89e8), line 490 in
ZokItakuSCSV.cpp
ZokItakuSCSV::crtMotoFile()(this = 0x314c89e8), line 211 in
ZokItakuSCSV.cpp
unnamed block in ZokTourokuCtl::commonTouroku(const
ZokWinTourokuRec,short)(this = 0x31303f20, aTourokuRec = (...), aRet
= 1), line 1022
in ZokTourokuCtl.cpp
ZokTourokuCtl::commonTouroku(const ZokWinTourokuRec,short)(this =
0x31303f20, aTourokuRec = (...), aRet = 1), line 1022 in ZokTourokuCtl
.cpp
ZokTourokuCtl::regItakuTouroku(const ZokWinTourokuRec,short)(this =
0x31303f20, aTourokuRec = (...), aRet = 1), line 224 in ZokTourokuCt
l.cpp
unnamed block in ZokKanriServerCtlImpl::regItakuTouroku(const
ZokWinTourokuOrbRec)(this = 0x312c7b58, aTourokuOrbRec = (...)), line
386 in
 ZokKanriServerCtlImpl.cpp
ZokKanriServerCtlImpl::regItakuTouroku(const ZokWinTourokuOrbRec)(this
= 0x312c7b58, aTourokuOrbRec = (...)), line 386 in ZokKanriServerC
tlImpl.cpp
POA_ZokKanriServerCtl_tieZokKanriServerCtlImpl::regItakuTouroku(const
ZokWinTourokuOrbRec)(this = 0x31285358, _aTourokuOrbRec = (...)),
line 2371 in pm_s.hh
_regItakuTouroku(void*,CORBA_MarshalInBuffer,const
char*,VISReplyHandler)(_obj = 0x31285358, _istrm = (...), _oper =
regItakuTouroku, _
handler = (...)), line 2005 in pm_s.cc
execute__11VISSkelInfoFRC14VISGIOPRequestR21CORBA_MarshalInBufferR15VISR
eplyHandler(0x313f93d8, 0x313f2b08, 0x313f2d58, 0x313041c4) at 0xd24
42b98
_do_request__22VISGIOPProtocolAdapterFP14VISGIOPRequestP14VISGlobalTable
(0x313f5a28, 0x313f2b08, 0x31307ca8) at 0xd24361ec
dispatchMessage__22VISGIOPProtocolAdapterFPQ2_14ProtocolEngine7MessageP2
1VISThreadSpecificData(0x313f5a28, 0x313f2c64, 0x31307ca8) at 0xd243
6d20
do_work__23VISThreadPoolDispatcherFPQ2_14ProtocolEngine15ProtocolAdapter
RlP21VISThreadSpecificData(0x312e8838, 0x313f5a28, 0x313f5c50, 0x313
07ca8) at 0xd2508b54
do_work__17VISDispatchWorkerFP21VISThreadSpecificData(0x313f5c48,
0x31307ca8) at 0xd250a824
_perform_task__13VISThreadPoolFP14VISTPoolWorker(0x312e8ce8, 0x312e8de8)
at 0xd24aadd4
begin__14VISTPoolWorkerFv(0x312e8de8) at 0xd24aaf58
_start__9VISThreadFPv(0x312e8de8) at 0xd29ed6f4

 
Thanks,
 
Jeremy
 
 


Problem building stdcxx-4.2.0-rc6 on Solaris

2007-10-22 Thread Jeremy Dean
I am trying to build the stdcxx-4.2.0-rc6 on Solaris 10 with Sunpro 11
compiler.
 
I used the following command:
gmake BUILDDIR=/build/dean/stdcxx-420-rc6/stdcxx-4.2.0 BUILDTYPE=15d
CONFIG=sunpro.config
 
Then I get the following error:
gmake[1]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[2]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[3]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[4]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[5]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[6]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[7]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[8]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[9]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[10]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[11]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[12]: Entering directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[12]: execvp: gmake: Arg list too long
gmake[12]: *** [w] Error 127
gmake[12]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[11]: *** [w] Error 2
gmake[11]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[10]: *** [w] Error 2
gmake[10]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[9]: *** [w] Error 2
gmake[9]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[8]: *** [w] Error 2
gmake[8]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[7]: *** [w] Error 2
gmake[7]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[6]: *** [w] Error 2
gmake[6]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[5]: *** [w] Error 2
gmake[5]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[4]: *** [w] Error 2
gmake[4]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[3]: *** [w] Error 2
gmake[3]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[2]: *** [w] Error 2
gmake[2]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake[1]: *** [libstd] Error 2
gmake[1]: Leaving directory `/build/dean/stdcxx-420-rc6/stdcxx-4.2.0'
gmake: *** [libstd] Error 2
 
Jeremy Dean 
Rogue Wave Software, Inc.
Technical Support 
Phone: 303-545-3205 -- 1-800-404-4767 
E-mail: [EMAIL PROTECTED] 
Web: http://www.roguewave.com/support 
Knowledge Base entries: 
http://www.roguewave.com/kbdocs/search.html 
View issues online at: 
http://www.roguewave.com/youraccount/login/
 


RE: Getting incorrect behavior on strstream

2007-06-25 Thread Jeremy Dean
Ok, so I added the S  std::ends; to each of the stream statements.
This did resolve it on Red hat, however on Solaris for the first
testfunction it did not:

void test1() {
std::ostringstream S;
long double x = std::pow(1e300,2);
S  Somethingstd::setprecision(8)  x;
S   else;
S  std::ends;
std::printf(Test1: %s\n, S.str().c_str()); 
}

On solaris it is printing up until the double and then nothing else is
printed.  However if I change the precision to less then 8 then it works
fine.

Jeremy


-Original Message-
From: Martin Sebor [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 11:36 AM
To: stdcxx-dev@incubator.apache.org
Subject: Re: Getting incorrect behavior on strstream

Farid Zaripov wrote:
 -Original Message-
 From: Jeremy Dean [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 22, 2007 11:45 PM
 To: stdcxx-dev@incubator.apache.org
 Subject: Getting incorrect behavior on strstream

 I have a testcase that is showing incorrect behavior ostrstream or
 ostringstream:
 
 [...]
 
 Any thoughts on this problem?
 
   ostrstream::str() returns just the beginning pointer to the
sequence.
 The sequence don't
 have the null character unless you especially inserted it. You should 
 print no more that
 otrstream::pcount() characters.
 
   See Remarks on the page

Better yet, refer to the stdcxx Class Reference :)

http://incubator.apache.org/stdcxx/doc/stdlibref/strstreambuf.html#idx12
24

Martin



[jira] Created: (STDCXX-461) Error in formatting of infinity

2007-06-25 Thread Jeremy Dean (JIRA)
Error in formatting of infinity 


 Key: STDCXX-461
 URL: https://issues.apache.org/jira/browse/STDCXX-461
 Project: C++ Standard Library
  Issue Type: Bug
  Components: 27. Input/Output
Reporter: Jeremy Dean
Priority: Minor


referrenced in e-mail thread:
http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200706.mbox/ajax/[EMAIL
 PROTECTED]

But the test program does demonstrate a real problem, and that is the 
formatting of infinity when the stream precision is greater than 7. It looks as 
though the num_put facet inserts the string inf\0\0ity into the stream rather 
than inf.

$ cat u.cpp  make u  ./u | od -c
#include cassert
#include iostream
#include sstream

int main () {
 std::ostringstream s;
 s.precision (8);
 s  1 / 0.0;
 std::cout  s.str ()  '\n';
 assert (s.str () == inf);
}
gcc -c -I/build/sebor/stdcxx/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG 
-I/build/sebor/stdcxx/include -I/build/sebor/stdcxx-gcc-4.1.0-11s/include
-I/build/sebor/stdcxx/examples/include  -pedantic -nostdinc++ -g  -W 
-Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long   u.cpp
u.cpp: In function 'int main()':
u.cpp:8: warning: division by zero in '1 / 0.'
gcc u.o -o u  -L/build/sebor/stdcxx-gcc-4.1.0-11s/lib  -lstd11s -lsupc++ -lm 
Assertion failed: s.str () == inf, file u.cpp, line 10
000   i   n   f  \0  \0   i   t   y  \n
011


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Getting incorrect behavior on strstream

2007-06-22 Thread Jeremy Dean
I have a testcase that is showing incorrect behavior ostrstream or
ostringstream:
 
#include cstdio
#include iostream
#include iomanip
#include sstream
#include strstream
#include cmath
 
void test1() {
std::ostringstream S;
long double x = std::pow(1e300,2);
S  Somethingstd::setprecision(8)  x;
S   else;
std::printf(Test1: %s\n, S.str().c_str());
}
void test2() {
std::ostrstream S;
long double x = std::pow(1e300,2);
S  Something   std::setprecision(7)  x;
S   else;
std::printf(Test2: %s\n, S.str());
}
void test3() {
std::ostrstream S;
long double x = 0.0/0.0;
S  Something   std::setprecision(8)  x;
S   else;
std::printf(Test3: %s\n, S.str());
}
int main(int argc, char* argv[]) {
test1();
test2();
test3();
}
 
 
On solaris 8 with Sun Studio 8 patch 14 I get the following output
 
Test1: Something inf
Test2: Something inf else else
Test3: Something nan else
 
Test1 is missing else
Test2 has an extra else
Test3 looks ok.
 
On RedHat 3u6 I get the following output:
 
Test1: Something inf else
Test2: Something inf else
Test3: Something nan elseing inf else
 
Test1 and 2 look ok
Test3 however has extra output ing inf else
 
Any thoughts on this problem?
 
Thanks,
 
Jeremy
 
Jeremy Dean 
Rogue Wave Software,
A QUOVADX(tm) division 
Technical Support 
Phone: 303-545-3205 -- 1-800-404-4767 
E-mail: [EMAIL PROTECTED] 
Web: http://www.roguewave.com/support 
Knowledge Base entries: 
http://www.roguewave.com/kbdocs/search.html 
View issues online at: 
http://www.roguewave.com/youraccount/login/


Question on Static builds

2007-06-15 Thread Jeremy Dean
I have a question on static builds on AIX using Standard Library from
SourcePro edition 9.  This build does not make a static library, but
rather a shared archive.  This creates a dependency on any executable
that is linked with this library, which is what we are trying to avoid
when trying to build static libraries.  Here is a copy of the final
creation of the library:
 
xlCcore -q32 -qmkshrobj -o  stdrsd.o   assert.o bitset.o
catalog.o codecvt.o collate.o ctype.o ctype_bits.o exception.o export.o
facet.o file.o  
instance.o ios.o ios_bits.o iostore.o iostream.o iso2022.o limits.o
limits_bits.o locale_bits.o locale_body.o locale_classic.o
locale_combine.o 
locale_core.o locale_eq.o locale_global.o locale_name.o memattr.o
memory.o messages.o num_get.o num_put.o  punct.o random.o rwstderr.o 
setlocale.o strstream.o strtol.o ti_collate.o ti_filebuf.o
ti_insert_dbl.o ti_insert_int.o  ti_insert_ptr.o ti_ios.o ti_istream.o
ti_messages.o 
ti_money_get.o ti_money_put.o ti_moneypunct.o ti_num_get.o ti_num_put.o
ti_numpunct.o ti_ostream.o ti_streambuf.o ti_string.o ti_stringbuf.o 
ti_time_get.o ti_time_put.o ti_wcollate.o ti_wfilebuf.o
ti_winsert_dbl.o ti_winsert_int.o ti_winsert_ptr.o ti_wios.o
ti_wistream.o ti_wmessages.o 
ti_wmoneypunct.o ti_wmoney_get.o  ti_wmoney_put.o ti_wnum_get.o
ti_wnum_put.o ti_wnumpunct.o ti_wostream.o ti_wstreambuf.o ti_wstring.o 
ti_wstringbuf.o  ti_wtime_get.o ti_wtime_put.o time_get.o time_put.o
tmpbuf.o typeinfo.o valarray.o version.o vecbool.o wcodecvt.o wctype.o
-g -Wl,-bh:5 -D_RWCONFIG=rsd 
-I./../../../include -I./../../../include/ansi -I./../../.. -I.. -I.
-D_RWBUILD_std -qrtti=all -qtemplateregistry=libstdrsd.tempreg
-L./../../../lib
ar  -bh:5 -rvu ./../../../lib/libstd41-rsd.a stdrsd.o
ar: Creating an archive file ./../../../lib/libstd41-rsd.a.
a - stdrsd.o
 
Is this supposed to be intentional or is this a bug with the SourcePro
release.
 
Jeremy
 
Jeremy Dean 
Rogue Wave Software,
A QUOVADX(tm) division 
Technical Support 
Phone: 303-545-3205 -- 1-800-404-4767 
E-mail: [EMAIL PROTECTED] 
Web: http://www.roguewave.com/support 
Knowledge Base entries: 
http://www.roguewave.com/kbdocs/search.html 
View issues online at: 
http://www.roguewave.com/youraccount/login/
 


question about locales

2007-04-03 Thread Jeremy Dean
Is there a workaround for not having any locale installed on a machine
other then installing one? The error that comes up is that _RWSTD_LC_ALL
is undefined.

 
Jeremy Dean 
Rogue Wave Software,
A QUOVADX(tm) division 
Technical Support 
Phone: 303-545-3205 -- 1-800-404-4767 
E-mail: [EMAIL PROTECTED] 
Web: http://www.roguewave.com/support 
Knowledge Base entries: 
http://www.roguewave.com/kbdocs/search.html 
View issues online at: 
http://www.roguewave.com/youraccount/login/
 


AIX xlC 7.0 and static library

2006-09-06 Thread Jeremy Dean
I am building a static library of the standard library, however when I
try to run my executable on my deployed machine I get the following
error:
 
exec(): 0509-036 Cannot load program tpdlist because of the following
errors:
0509-150   Dependent module libstd12s_rw.a(std12s_rw.o) could
not be loaded.
0509-022 Cannot load module libstd12s_rw.a(std12s_rw.o).
0509-026 System error: A file or directory in the path name does
not exist.
 
So based on this error message, do I also need to deploy the Standard
library (libstd12s_rw.a)?  Does this not defeat the purpose of a static
library?
 
Jeremy Dean 
Rogue Wave Software,
A QUOVADX(tm) division 
Technical Support 
Phone: 303-545-3205 -- 1-800-404-4767 
E-mail: [EMAIL PROTECTED] 
Web: http://www.roguewave.com/support 
Knowledge Base entries: 
http://www.roguewave.com/kbdocs/search.html 
View issues online at: 
http://www.roguewave.com/youraccount/login/
 


[jira] Created: (STDCXX-286) AIX static libraries are not static, but rather use the mkshrobj flag

2006-09-06 Thread Jeremy Dean (JIRA)
AIX static libraries are not static, but rather use the mkshrobj flag
-

 Key: STDCXX-286
 URL: http://issues.apache.org/jira/browse/STDCXX-286
 Project: C++ Standard Library
  Issue Type: Bug
  Components: Build
Affects Versions: 4.1.3
 Environment: AIX with Visual Age compiler
Reporter: Jeremy Dean


The static library that is generated is not static within the application.  The 
library would still need to be deployed with application otherwise get the 
following error:

exec(): 0509-036 Cannot load program tpdlist because of the following errors:
0509-150   Dependent module libstd12s_rw.a(std12s_rw.o) could not be 
loaded.
0509-022 Cannot load module libstd12s_rw.a(std12s_rw.o).
0509-026 System error: A file or directory in the path name does not 
exist.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (STDCXX-286) AIX static libraries are not static, but rather use the mkshrobj flag

2006-09-06 Thread Jeremy Dean (JIRA)
 [ http://issues.apache.org/jira/browse/STDCXX-286?page=all ]

Jeremy Dean updated STDCXX-286:
---

Description: 
The static library that is generated is not static within the application.  The 
library would still need to be deployed with application otherwise get the 
following error:

exec(): 0509-036 Cannot load program tpdlist because of the following errors:
0509-150   Dependent module libstd12s_rw.a(std12s_rw.o) could not be 
loaded.
0509-022 Cannot load module libstd12s_rw.a(std12s_rw.o).
0509-026 System error: A file or directory in the path name does not 
exist.



  was:
The static library that is generated is not static within the application.  The 
library would still need to be deployed with application otherwise get the 
following error:

exec(): 0509-036 Cannot load program tpdlist because of the following errors:
0509-150   Dependent module libstd12s_rw.a(std12s_rw.o) could not be 
loaded.
0509-022 Cannot load module libstd12s_rw.a(std12s_rw.o).
0509-026 System error: A file or directory in the path name does not 
exist.


Martin's response on this:

Yes. We've been using the -qmkshrobj compiler flag to prelink library object 
files (i.e., to generate code for template specializations used in the library 
sources). The side-effect of using this option is that it results in the 
archiver producing an AIX shared archive rather an ordinary one. Shared 
archives must be deployed just like shared libraries do.

Rebuilding the library with a recent version of XLC++ and without the 
-qmkshrobj option should let you produce an ordinary archive that could be used 
to link self-contained programs (it appears to with 8.0).
Earlier versions of VisualAge might be problematic (likely due to the tempinc 
model).


 AIX static libraries are not static, but rather use the mkshrobj flag
 -

 Key: STDCXX-286
 URL: http://issues.apache.org/jira/browse/STDCXX-286
 Project: C++ Standard Library
  Issue Type: Bug
  Components: Build
Affects Versions: 4.1.3
 Environment: AIX with Visual Age compiler
Reporter: Jeremy Dean

 The static library that is generated is not static within the application.  
 The library would still need to be deployed with application otherwise get 
 the following error:
 exec(): 0509-036 Cannot load program tpdlist because of the following errors:
 0509-150   Dependent module libstd12s_rw.a(std12s_rw.o) could not be 
 loaded.
 0509-022 Cannot load module libstd12s_rw.a(std12s_rw.o).
 0509-026 System error: A file or directory in the path name does not 
 exist.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (STDCXX-189) locale_name_fmat seg faults during the configuration

2006-05-24 Thread Jeremy Dean (JIRA)
locale_name_fmat seg faults during the configuration


 Key: STDCXX-189
 URL: http://issues.apache.org/jira/browse/STDCXX-189
 Project: C++ Standard Library
Type: Bug

  Components: Build  
Versions: 4.1.2
 Environment: Linux AS 4u3
gcc 3.4.4-2
Reporter: Jeremy Dean


If locale command is lengthy then LOCALE_NAME_FMAT.cpp  program will crash.  
Seems to be a buffer overrun  in LOCALE_NAME_FMAT.cpp at line189 (trunk) 
because the 'def_locale' buffer may not have enough space to hold the name of a 
locale.

http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200605.mbox/[EMAIL
 PROTECTED]


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



Problem building Standard library

2006-05-17 Thread Jeremy Dean
I am having a problem building Standard Library.
 
I am running on RedHat Advanced Server 4 update 3, but have put the support
compiler /binutils on the machine 
GNU 3.4.4-2
Binutils 2.15.92.0.2-15
 
When I try to build an optimized build, the localedef hangs and never
returns.  I was told to then try building a debug version, and the debug
version of the library fails to compile with the following error:
 
 gcc  -D_RWCONFIG=11s -I./../../../include -I./../../../include/ansi
-I./../../.. -I/roguewave/SourcePro/Ed9/source/stdlib -I. -D_RWBUILD_std
-Wcast-align -Wcast-qual -Wwrite-strings -g --pedantic -Wall -W
-Wno-long-long  -c /roguewave/SourcePro/Ed9/source/stdlib/codecvt.cpp  
In file included from /roguewave/SourcePro/Ed9/source/stdlib/codecvt.cpp:58:
/roguewave/SourcePro/Ed9/source/stdlib/setlocale.h:45: error:
`_RWSTD_LC_ALL' was not declared in this scope
 
 
 
Jeremy Dean 
Rogue Wave Software,
A QUOVADX(tm) division 
Technical Support 
Phone: 303-545-3205 -- 1-800-404-4767 
E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  
Web: http://www.roguewave.com/support http://www.roguewave.com/support  
Knowledge Base entries: 
http://www.roguewave.com/kbdocs/search.html
http://www.roguewave.com/kbdocs/search.html  
View issues online at: 
http://www.roguewave.com/youraccount/login/
http://www.roguewave.com/youraccount/login/ 
 


RE: Problem building Standard library

2006-05-17 Thread Jeremy Dean
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:[EMAIL PROTECTED] 
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


RE: Problem building Standard library

2006-05-17 Thread Jeremy Dean
I compiled this new test on the system and it also gets a segmentation
fault.

Jremy
 

-Original Message-
From: Martin Sebor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 17, 2006 2:57 PM
To: stdcxx-dev@incubator.apache.org
Subject: Re: Problem building Standard library

Jeremy Dean wrote:
 Looking at the log file, there is not much there other then it seg
faulted:

You might want to try the latest version of the test (i.e., the one that
includes changes made for STDCXX-140):
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/LOCALE_NA
ME_FMAT.cpp?view=log

Martin

 
 # /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:25
 1
 
 Jeremy
 
 -Original Message-
 From: Martin Sebor [mailto:[EMAIL PROTECTED]
 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


Problem building locales on AIX

2006-04-27 Thread Jeremy Dean
I am having a problem building locales on AIX.  Here is the build error:
 
'/usr/billing/RogueWave/SourcePro/Ed9/rw_buildspace/nls/15s'
 ./../../bin/15s/localedef --no_position -w -c -f
./../../etc/stdlib/nls/charmaps/ISO-8859-1 -i
./../../etc/stdlib/nls/src/af_ZA ./../../nls/af_ZA.ISO-8859-1
exec(): 0509-036 Cannot load program ./../../bin/15s/localedef because of
the following errors:
 0509-150   Dependent module libstd15s.a(std15s.o) could not be loaded.
 0509-022 Cannot load module libstd15s.a(std15s.o).
 0509-026 System error: A file or directory in the path name does not exist.
make: 1254-004 The error code from the last command is 255.
 
My platform is AIX 5.3 with Visual Age 6.0
 
 
Jeremy Dean 
Rogue Wave Software,
A QUOVADX(tm) division 
Technical Support 
Phone: 303-545-3205 -- 1-800-404-4767 
E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  
Web: http://www.roguewave.com/support http://www.roguewave.com/support  
Knowledge Base entries: 
http://www.roguewave.com/kbdocs/search.html
http://www.roguewave.com/kbdocs/search.html  
View issues online at: 
http://www.roguewave.com/youraccount/login/
http://www.roguewave.com/youraccount/login/ 
 


Problems with locale warnings

2006-02-21 Thread Jeremy Dean
Hi, 
 
When building our application I seem to be getting a number of warnings
concerned with locale: 
 
xlC_r  -I/opt/sourcepro/rw_buildspace_edition9
-I/opt/sourcepro/rw_buildspace_edition9/include
-I/opt/sourcepro/rw_buildspace_edition9/include/ansi
-I/opt/ctp_tools/project/Release_2.6.0/include -I/opt/probe/user/c/include
-I/usr/mqm/inc -I.-DUNIX -DANSI -DVERSION=\\ -D_RWCONFIG=12s  -c
dbdocquote.C 
/opt/sourcepro/rw_buildspace_edition9/rw/tools/decport.h, line 172.5:
1540-1091 (W) The friend declaration round specifies a default argument
expression and is not a definition. 
dbdocquote.C, line 2729.19: 1540-0274 (S) The name lookup for setfill
did not find a declaration. 
/opt/sourcepro/rw_buildspace_edition9/include/iomanip, line 183.1:
1540-1298 (I) template __rw_smanip__rw_setfill_CharT,_CharT
setfill(_CharT) needs to be declared in the containing scope to be found by
name lookup. 
/opt/sourcepro/rw_buildspace_edition9/include/loc/_locale.h, line 344.12:
1540-2411 (W) A dynamic cast is present, but the correct RTTI option is not
specified. 
/opt/sourcepro/rw_buildspace_edition9/include/loc/_locale.h, line 336.1:
1540-0700 (I) The previous message was produced while processing
__rw::__rw_get_facetstd::moneypunctchar,0 (const locale , const
moneypunctchar,0 *). 
/opt/sourcepro/rw_buildspace_edition9/include/loc/_locale.h, line 81.9:
1540-0700 (I) The previous message was produced while processing
std::use_facetstd::moneypunctchar,0 (const locale ). 
/opt/sourcepro/rw_buildspace_edition9/include/loc/_money_put.cc, line
288.31: 1540-0700 (I) The previous message was produced while processing
std::money_putchar,std::ostreambuf_iteratorchar,std::char_traitschar 
::do_put(iter_type, bool, ios_base , char_type, long double) const. 
/opt/sourcepro/rw_buildspace_edition9/include/loc/_money_put.h, line 52.8:
1540-0700 (I) The previous message was produced while processing struct
std::money_putchar,std::ostreambuf_iteratorchar,std::char_traitschar 
. 
/opt/sourcepro/rw_buildspace_edition9/include/loc/_money_put.cc, line
322.1: 1540-0700 (I) The previous message was produced while processing
template class _CharT, class _OutputIter
std::money_put::do_put(iter_type, bool, ios_base , char_type, const
string_type ) const. 
make: The error code from the last command is 1. 
 
LANG on the box is set to en_GB, which is also the only locale that I built
with the libraries. Previously we always had LANG set to en_US. 
 
Any idea what is causing these and what I need to do to get rid of them? 
 
Regards 
 
Jeremy Dean 
Rogue Wave Software,
A QUOVADX(tm) division 
Technical Support 
Phone: 303-545-3205 -- 1-800-404-4767 
E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  
Web: http://www.roguewave.com/support http://www.roguewave.com/support  
Knowledge Base entries: 
http://www.roguewave.com/kbdocs/search.html
http://www.roguewave.com/kbdocs/search.html  
View issues online at: 
http://www.roguewave.com/youraccount/login/
http://www.roguewave.com/youraccount/login/ 
 


RE: Problem building on Solaris

2006-02-01 Thread Jeremy Dean
After rebuilding with these macros, everything seems to go fine, the library
builds ok.  Now we are getting strange errors with the examples: alg4.cpp

It is failing on line 156 of include/set

The error is unable to instantiate from non templated 

Unfortunately this is from a secure site, so not able to get exact error
message. 

Getting similar error with example tele.cpp  failing on line 349 ofr
include/map

Jeremy

-Original Message-
From: Martin Sebor [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 31, 2006 9:58 AM
To: stdcxx-dev@incubator.apache.org
Subject: Re: Problem building on Solaris


Jeremy Dean wrote:
 I am building on Solaris 10 with the Sun Studio 10 compiler and 
 getting this
 error:
 
 CC  -D_RWCONFIG=15dECB -I./../../../include -I./../../.. -I.. -I. 
 -D_RWBUILD_std -g -D_REENTRANT -mt -PIC -library=%none  -c 
 ../bitset.cpp
 
 CC  -D_RWCONFIG=15dECB -I./../../../include -I./../../.. -I.. -I. 
 -D_RWBUILD_std -g -D_REENTRANT -mt -PIC -library=%none  -c ../char.cpp
 CC  -D_RWCONFIG=15dECB -I./../../../include -I./../../.. -I.. -I.
 -D_RWBUILD_std -g -D_REENTRANT -mt -PIC -library=%none  -c
 ../codecvt.cpp  
 ./../../../include/loc/_rw_setlocale.h, line 53: Error: _RWSTD_LC_ALL
 is
 not defined.
 1 Error(s) detected.
 *** Error code 1
 make: Fatal error: Command failed for target `codecvt.o'
  
 This is on a secure machine and can not install any locales on it:
  
 locale -a
 POSIX
 C
 iso_8859_1
  
 Is there any work around for this problem?

The most likely cause is that the LOCALE_NAME_FMAT.cpp configuration test
fails to #define the macro (the test is designed to define these even if no
locales are installed so what you're seeing is definitely a bug). I created
STDCXX-128 for it: http://issues.apache.org/jira/browse/STDCXX-128

The easiest workaround is to grab the macro definitions from a test run a
machine that does have some locales installed. Here's what I get on one of
our Solaris 10 boxes:

#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
#define _RWSTD_CAT_3(pfx) { 3, LC_COLLATE, pfx::_C_collate } #define
_RWSTD_CAT_0(pfx) { 0, LC_CTYPE, pfx::_C_ctype } #define _RWSTD_CAT_4(pfx)
{ 4, LC_MONETARY, pfx::_C_monetary } #define _RWSTD_CAT_1(pfx) { 1,
LC_NUMERIC, pfx::_C_numeric } #define _RWSTD_CAT_2(pfx) { 2, LC_TIME,
pfx::_C_time } #define _RWSTD_CAT_5(pfx) { 5, LC_MESSAGES,
pfx::_C_messages } // #define _RWSTD_NO_SETLOCALE_ENVIRONMENT #define
_RWSTD_NO_CAT_NAMES #define _RWSTD_CAT_SEP / #define _RWSTD_NO_CAT_EQ //
#define _RWSTD_NO_INITIAL_CAT_SEP // #define _RWSTD_NO_CONDENSED_NAME

Martin


problem with older Standard Library

2005-12-16 Thread Jeremy Dean
I am working on RedHat 3.0 with the gcc 3.2.3 compiler and also the Rogue
Wave 6 standard librarby version.  
 
I get a memory fault with the following testcase:

#include map
#include string
#include set
class MyClass
{
 public:
  MyClass(const std::string value_) 
  : _value(value_) {}
  string _value;
};  
typedef std::setMyClass* MyClassSet;
typedef std::mapstd::string, MyClassSet MyMap;
static MyClassSet createSet()
{
  MyClassSet s;
  s.insert(new MyClass(test));
  return s;
}
int main()
{
  MyMap m;
  string key(key);
  m.insert(MyMap::value_type(key, createSet()));
  return 0; 
}

 
Any ideas what might be the problem?
 
Jeremy Dean 



Any ideas on these StdLib build errors?

2005-12-07 Thread Jeremy Dean
I am getting the following errors when trying to build the  Standard Library
on AIX 5.3 with the Visual Age 7.0 compiler:
 
 xlCcore_r -q64  -D_RWCONFIG=12s -I./../../../include
-I./../../../include/ansi -I./../../.. -I.. -I. -D_RWBUILD_std -O
-D_REENTRANT -qsuppress=1500-029 -qrtti=all
-qtemplateregistry=libstd12s.tempreg -qsuppress=1540-0183 -c
../ti_messages.cpp  
./../../../include/string, line 169.5: 1540-2910 (I) The template
std::basic_stringchar,std::char_traitschar,std::allocatorchar
::basic_string(const char *, unsigned long, const std::allocatorchar )
uses a file organization for tempinc, but tempinc is not being used.
./../../../include/string, line 76.7: 1540-0424 (I) template class
std::basic_string is declared on line 76 of ./../../../include/string.
./../../../include/string, line 173.5: 1540-2910 (I) The template
std::basic_stringchar,std::char_traitschar,std::allocatorchar
::basic_string(const char *, const std::allocatorchar ) uses a file
organization for tempinc, but tempinc is not being used.
./../../../include/string, line 76.7: 1540-0424 (I) template class
std::basic_string is declared on line 76 of ./../../../include/string.
./../../../include/string, line 547.5: 1540-2910 (I) The template
std::basic_stringchar,std::char_traitschar,std::allocatorchar 
std::basic_stringchar,std::char_traitschar,std::allocatorchar
::replace(unsigned long, unsigned long, const char *, unsigned long) uses
a file organization for tempinc, but tempinc is not being used.
./../../../include/string, line 76.7: 1540-0424 (I) template class
std::basic_string is declared on line 76 of ./../../../include/string.
./../../../include/string, line 557.5: 1540-2910 (I) The template
std::basic_stringchar,std::char_traitschar,std::allocatorchar 
std::basic_stringchar,std::char_traitschar,std::allocatorchar
::replace(unsigned long, unsigned long, unsigned long, char) uses a file
organization for tempinc, but tempinc is not being used.
./../../../include/string, line 76.7: 1540-0424 (I) template class
std::basic_string is declared on line 76 of ./../../../include/string.
./../../../include/string, line 860.26: 1540-2910 (I) The template
std::basic_stringchar,std::char_traitschar,std::allocatorchar
::_C_string_ref_type
*std::basic_stringchar,std::char_traitschar,std::allocatorchar
::_C_get_rep(unsigned long, unsigned long) uses a file organization for
tempinc, but tempinc is not being used.
./../../../include/string, line 76.7: 1540-0424 (I) template class
std::basic_string is declared on line 76 of ./../../../include/string.
 xlCcore_r -q64  -D_RWCONFIG=12s -I./../../../include
-I./../../../include/ansi -I./../../.. -I.. -I. -D_RWBUILD_std -O
-D_REENTRANT -qsuppress=1500-029 -qrtti=all
-qtemplateregistry=libstd12s.tempreg -qsuppress=1540-0183 -c
../ti_money_get.cpp  
./../../../include/streambuf, line 295.43: 1540-0062 (S) The incomplete
class _Traits must not be used as a qualifier.
./../../../include/rw/_ioiter.h, line 192.50: 1540-0700 (I) The previous
message was produced while processing class
std::basic_streambufchar,std::char_traitschar .
make: 1254-004 The error code from the last command is 1.
 
 
 
Jeremy Dean 


problem with map class and forward class declaration

2005-10-24 Thread Jeremy Dean
The following test case fails to compile:
 
#include map
 
class A;  //forward class declaration
 
std::mapint, A A_Map;
 
class A
{
int a;
};
 
int main() { return 0; }
 
The following error occurs:
 
./../../../include/rw/_pair.h, line 67: Error: The type A is incomplete.
./../../../include/rw/_tree.h, line 98: Where: While specializing
std::pa
irconst int, A.
./../../../include/rw/_tree.h, line 98: Where: Specialized in
__rw::__rw_r
b_tree_nodestd::allocatorstd::pairconst int, A, std::pairconst int,
A, in
t, __rw::__select1ststd::pairconst int, A, int.
./../../../include/rw/_tree.h, line 271: Where: Specialized in
__rw::__rb_
treeint, std::pairconst int, A, __rw::__select1ststd::pairconst int,
A, in
t, std::lessint, std::allocatorstd::pairconst int, A.
./../../../include/map, line 98: Where: Specialized in std::mapint,
A, st
d::lessint, std::allocatorstd::pairconst int, A.
../st1.cpp, line 5: Where: Specialized in non-template code.
1 Error(s) detected.
*** Error code 1
make: Fatal error: Command failed for target `st1.o'
 
 
 
Jeremy Dean