Tru64: Using stringstream to convert inbt/long to string causes application to crash

A

avidamani

Hi,

I have a c++ application compiled using

Compaq C++ V6.5-014 for Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.5-014 (cxx) cxx Driver

The problem is that the application is having unaligned access error
and is core dumping whenever I use stringstream to convert integer or
long to string.

std::stringstream x;
int y = 1234;
x << y;

But if I use the following code, i.e. initialize the stringstream
object using the constructor, i do not face the coree dump:

std::stringstream x("");
int y = 1234;
x << y;

Can someone help me out in resolving theissue in the first code.

Thanks in advance.

- Avinash
 
M

mlimber

Hi,

I have a c++ application compiled using

Compaq C++ V6.5-014 for Compaq Tru64 UNIX V5.1A (Rev. 1885)
Compiler Driver V6.5-014 (cxx) cxx Driver

The problem is that the application is having unaligned access error
and is core dumping whenever I use stringstream to convert integer or
long to string.

std::stringstream x;
int y = 1234;
x << y;

But if I use the following code, i.e. initialize the stringstream
object using the constructor, i do not face the coree dump:

std::stringstream x("");
int y = 1234;
x << y;

Can someone help me out in resolving theissue in the first code.

Thanks in advance.

- Avinash

This sounds like a bug in your standard library implementation. Who is
your standard library vendor? Have you tried another implementation
(e.g., STL-port, Dinkumware, etc.)? What happens when you use
std::eek:stringstream with no initializer in the same way?

Cheers! --M
 
A

avidamani

This sounds like a bug in your standard library implementation. Who is
your standard library vendor?

How do I check that
Have you tried another implementation
(e.g., STL-port, Dinkumware, etc.)? What happens when you use
std::eek:stringstream with no initializer in the same way?

It still fails
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top