Solaris10/Studio11 purify UMR error in std::string concat

SunOS taurus 5.10 Generic_118833-23 sun4v sparc SUNW,Sun-Fire-T1000 Solaris

CC: Sun C++ 5.8 Patch 121017-08 2006/12/06

purify Version 7.0 Solaris 2

libCstd is patched with patch 119963-08.

Is there anything to be done about the following purify error?

#include <string>

int main()

{

std::string horse = "horse";

std::string animals = horse + "cat";

return 0;

}

> CC -c -g -xarch=v9 concatTest.cpp -o concatTest.o

> purify CC -v -g -xarch=v9 concatTest.o -o concatTest_p

> ./concatTest_p

Finished concatTest_p (1 error, 0 leaked bytes)

Purify instrumented /work/jess/dev/trunk/marketbank/foundation/base/test/concatTest_p (pid 26319 at Thu Feb 1 11:04:37 2007)

Command-line: ./concatTest_p

UMR: Uninitialized memory read

This is occurring while in:

std::basic_string<char,std::char_traits><char>,std::allocator<ch ar> >std::basic_string<char,std::char_traits><char>,std::allocator&l t;char> >::__sun_concat(const char*)const [/usr/lib/sparcv9/libCstd.so.1]

std::basic_string<__type_0,__type_1,__type_2>std::operator+<char,std:: char_traits><char>,std::allocator<char> >(const std::basic_string<__type_0,__type_1,__type_2>&,const __type_0*) [/work/jess/dev/trunk/marketbank/foundation/base/test/concatTest.o]

main[/work/jess/dev/trunk/marketbank/foundation/base/test/concatTest.cpp:5]

_start [/packages/sunpro/prod/lib/v9/crt1.o]

Reading 8 bytes from 0xffffffff7fffedd0 on the stack.

Address 0xffffffff7fffedd0 is32 bytes below frame pointer in function std::basic_string<char,std::char_traits><char>,std::allocator<ch ar> >std::basic_string<char,std::char_traits><char>,std::allocator&l t;char> >::__sun_concat(const char*)const.

Current file descriptors in use: 15

Memory in-use: 0 bytes (0% of total allocated)

Memory leaked: 0 bytes (0%); potentially leaked: 0 bytes (0%)

Thread Summary : 1 thread(s) in existence

Program exited with status code 0.

[2177 byte] By [bouldera] at [2007-11-26 17:00:19]
# 1
This does not happen on Solaris 8 nor does it happen on Solaris 10 with a 32 it build.Is this more likely to be an error in the purify program or a problem with the 64-bit stdlib?
bouldera at 2007-7-8 23:28:05 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Sun provides a feature similar to Purify called Run-Time Checking. You can run the program under the dbx debugger and enable all checks, or you can run the "bcheck" script that does it automatically for you. Consult the dbx manual for details.

RTC does not report any errors, so I suspect you are seeing an artifact of Purify.

Purify makes deep assumptions about how the compiler generates code, assumptions that are not part of any stable compiler interface. Purify needs to be updated with each new Sun compiler release, and sometimes for compiler patches that affect details of code generation.

You should check with Purify (now IBM) tech support to find out if the version of Purity you have matches the version and patch level of the Sun compiler.

clamage45a at 2007-7-8 23:28:05 > top of Java-index,Development Tools,Solaris and Linux Development Tools...