Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

stlport4 cout.setf(ios::fixed, ios::floatfield) causes SEGV on big values

807575Feb 2 2006 — edited Feb 2 2006
We are trying to compile & run the following simple program with Studio 11 using the stlport4 libraries. It works without the stlport4 libraries but we have performance problems with the other libraries.

The compiler patches 120760-01 and 121017-01 have been applied.

The Solaris 10 version is 01/06. All the free patches are applied to Solaris 10.

CC -library=stlport4 -obug bug.cc

--------------------
#include <iostream>
#include <values.h>
using namespace std;

int
main(int argc, char **argv)
{
        cout.setf(ios::fixed, ios::floatfield);
        cout << MAXDOUBLE << endl;
}
-----------------------
The problem also occurred on Solaris 9 with Studio 10.

$ ./bug
Segmentation Fault - core dumped

$ mdb bug core
Loading modules: [ libc.so.1 ld.so.1 ]
$C
ffbff828 libstlport.so.1`__1cDstdU__format_float_fixed6Fpcpkciibiib_v_+0xd8(c7cdcfc9, ffbff9b3, 35383633, 38323037, 31, 1048)
ffbff890 libstlport.so.1`__1cDstdO__format_float4Cd_6FpcpkciiTAiib_v_+0xec(ffbffa60, ffbff990, 35383633, 35383935, 7fefffff, 38323037)
ffbff908 libstlport.so.1`__1cDstdN__write_float6Fpciid_1_+0x170(ffbffa60, 1048,6, 7fefffff, ffffffff, 0)
ffbff9f0 libstlport.so.1`__1cDstdP_M_do_put_float4Ccn0ATostreambuf_iterator4Ccn0ALchar_traits4Cc____Cd_6FTBrn0AIios_base_TATC_1_+0x18(36383839, 34363431, 38323736,38343637, 35343637, 30333533)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2006
Added on Feb 2 2006
3 comments
309 views