The stack trace is:
#0 0x0feb0ca8 in raise () from /lib/tls/libc.so.6
#1 0x0feb26c4 in abort () from /lib/tls/libc.so.6
#2 0x1000eaa4 in find_block (ptr=0x77e00d48, check_heap=true,
caller=0x0)
at ../new.cpp:142
#3 0x1000ff04 in operator_new (nbytes=2147483648, array=false)
at ../new.cpp:487
#4 0x1000c3bc in operator new (n=2147483648) at
../../include/mynew.h:161
#5 0x10057690 in __rw::__rw_allocate (nbytes=2147483648) at
../memory.cpp:46
#6 0x10061780 in __rw_tmpbuf (pptr=0xffffe380, nelems=268435456,
size=8)
at ../tmpbuf.cpp:108
#7 0x100027c0 in std::get_temporary_buffer<long double, int> (
__nelems=268435456) at ./../../../../include/rw/_rawiter.h:125
#8 0x10003018 in std::get_temporary_buffer<long double> (__n=268435456)
at ./../../../../include/rw/_rawiter.h:139
#9 0x10009698 in test_failure<long double> ([EMAIL PROTECTED])
at ../temp_buffer.cpp:278
#10 0x1000bde4 in test_get_temporary_buffer<long double> ([EMAIL PROTECTED],
dummy=0x0) at ../temp_buffer.cpp:401
#11 0x1000bf78 in Test::runTest (this=0xffffe620) at
../temp_buffer.cpp:424
#12 0x10031d40 in RWQETest::go (this=0xffffe620) at ../rwtest.cpp:857
#13 0x1000bc84 in main (argc=1, argv=0xffffe914) at
../temp_buffer.cpp:468
The symptoms are that it aborts when running test_failure on a long
double. I am running on RHAS4 using VisualAge 8 on a ppc64 system. The
problem only shows up in 32 bit builds - specifically 11s which is a
single-threaded, static, debug build
-----Original Message-----
From: Martin Sebor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 25, 2006 12:10 PM
To: [email protected]
Subject: Re: problem in temp_buffer
Nicole Willson wrote:
> Well, I just ran the testcase in the bug without issue - so that's not
> the exact problem.
What is then? (I.e., what are the symptoms, what is the stack trace if
you get a core dump, what is the OS, compiler, build type, ...)
Details, Nicole, we need details :)
Martin
>
>
> -----Original Message-----
> From: Martin Sebor [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 25, 2006 11:38 AM
> To: [email protected]
> Subject: Re: problem in temp_buffer
>
> Nicole Willson wrote:
>
>>I just noticed that it isn't ignored, but I still don't understand the
>
>
>>purpose.
>
>
> _RWSTD_TMPBUF_SIZE is #defined to the size of the static temporary
> buffer. When get_temporary_buffer() is invoked to request a buffer
> whose size in bytes is less than or equal to _RWSTD_TMPBUF_SIZE and
> the static buffer is not in use yet the function returns the address
> of the buffer to the caller. Otherwise it tries to allocate the buffer
> dynamically on the heap. If the allocation fails,
> get_temporary_buffer() fails by returning pair(0, 0).
>
>
>
>>If the check fails, it simply procedes to __rw_allocate.
>>Since the code I am tracking has sent in a block so large that the
>>code will not be able to address it all, I would think it would stop
>
> here.
>
>>Is __rw_allocate supposed to handle this?
>
>
> __rw_allocate() is just a wrapper around operator new. It throws an
> exception on failure. __rw_tmpbuf() catches it and returns pair(0, 0)
> instead.
>
> What exactly is the issue you are tracking down? Some compilers are
> known to fail the test (with various symptoms) due to a bug.
> See, for example
> http://bugzilla.cvo.roguewave.com/show_bug.cgi?id=1605
>
> Martin
>
>
>>-----Original Message-----
>>From: Nicole Willson [mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, July 25, 2006 11:15 AM
>>To: Stdcxx
>>Subject: RE: problem in temp_buffer
>>
>>I'm tracking down an issue with temp_buffer in stdlib/utilities. I'm
>>confused by a piece of code in source/stdlib/tmpbuf.cpp:
>>
>>if (nbytes <= _RWSTD_TMPBUF_SIZE) {
>>
>> if (1 == _RWSTD_THREAD_PREINCREMENT (__rw_buffer_busy, false))
>
>
>>{
>>
>> *pptr = buffer;
>>
>> // static buffer used, its usage counter stays non-zero
>> return _RWSTD_TMPBUF_SIZE / size;
>> }
>>
>> // static buffer not used, decrement its usage counter
>> _RWSTD_THREAD_PREDECREMENT (__rw_buffer_busy, false);
>> }
>>
>> _TRY {
>> *pptr = __rw_allocate (nbytes, 0);
>> }
>> _CATCH (...) {
>> *pptr = 0;
>> nbytes = 0;
>> }
>>
>> return nbytes / size;
>>
>>
>>What is the purpose of the check against _RWSTD_TMPBUF_SIZE if it is
>>ignored?
>>
>>Nicole Willson
>>
>>Consulting Engineer
>>
>>Rogue Wave Software, Inc.
>>
>>A Division of Quovadx
>>
>>303-545-3210
>>
>>
>
>
>