there is a memory access check rui error in std::basic_ostream

hi,all

I use sunstudio 11 under Solaris 10 update 1.

The ouput of CC -V is :

CC: Sun C++ 5.8 Patch 121017-02 2006/04/19

My cpp file(try.cpp) is as following:

[code]

#include <iostream>

int

main(int argc,char *argv[] )

{

std::cout<< 5;

return 0;

}

[/code]

My compiling command line is as following :

CC -g try.cpp

I had turn on access check.

When i debugged a.out, I got the following error:

Access checking started for program /home/l12751/a.out

_ _

Read from uninitialized (rui):

Attempting to read 3 bytes at address 0xffbfef05

which is 3205 bytes above the current stack pointer

Location of error: (unknown OF), line 0, std::basic_ostream<char,std::char_traits><char> >::operator<<()

Is this a sunstudio 11 CC 5.8 bug or anything i did wrong?

How can i do access check for this program? or i can safely ignore the error?

thanks in advance.

[1041 byte] By [dtrace_primer] at [2007-11-26 7:32:23]
# 1
This looks like a bug in Sun Studio 11, I'll submit it. Thanks for a catch. FYI: bug id is 6431399Message was edited by: MaximKartashev
MaximKartashev at 2007-7-6 19:28:12 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
There is a workaround for this bug: use -library=stlport4
MaximKartashev at 2007-7-6 19:28:12 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
FWIW, I wouldn't call switching to a whole different implementation of the C++ standard library a workaround. I don't suppose you would consider switching from Sun C++ to gcc (or from Solaris to Windows) to avoid the RUI a workaround, either :)
sebor@roguewavecom at 2007-7-6 19:28:12 > top of Java-index,Development Tools,Solaris and Linux Development Tools...