473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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

Apr 11 '06 #1
2 4831
av*******@gmail.com wrote:
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::ostringstream with no initializer in the same way?

Cheers! --M

Apr 11 '06 #2
>
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::ostringstream with no initializer in the same way?

It still fails
Cheers! --M


Apr 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: roni | last post by:
hi. i have application written in vb.net + managed c++ dll that call also to unmanaged c++ function. the application crash. i open the dump file of the crash with WinDbg and that's is the...
7
by: bryan | last post by:
I think I'm missing something fundamental here. I'm trying to set an unsigned long value via a u_long pointer, however it coredumps everytime I get to that instruction. Here is a sample program...
1
by: tony | last post by:
hi. my NET application is using mixed c++ dll ( managed and unmanaged) in that dll , im calling api's of unamanged dll. my application crash with no exception or warning. its hard to...
3
by: bussiere maillist | last post by:
i've got a very long string and i wanted to convert it in binary like string = """Monty Python, or The Pythons, is the collective name of the creators of Monty Python's Flying Circus, a British...
21
by: Aman JIANG | last post by:
hi I need to do this (convert double to string) fast, safe and portable. Is there any way to do this ? Except the ways following: 1. C++ I/O stream, stringstream (and boost::lexical_cast) 2....
7
by: dan w01 | last post by:
Hi, I'm reading in a string of about 420 characters, the string is in binary. How do I either: - convert a string of this length into an integer variable without getting a runtime error 6...
4
by: mthread | last post by:
Hi, I would like to know the method to convert integer to string. Thanx in advance.
2
by: yogi_bear_79 | last post by:
I have a double of unknown length that I need to split at the decimal. I thought I would convert it either to a string or a char. char seems to be the best since it easily lends itself to...
1
by: Dan Lyles | last post by:
After a message is entered by the user, I must either encode it or decode it. In order to do so, I am supposed to input two strings to represent my table, but am unsure how to convert them to an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.