This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Migration from RWTools to string - problems [newbie]


Hello, and thanks for the reply,
	I'm quite positive that I have not tried such a thing since c_str
returns const char* and modifying that would cause the compiler to react. I
have no idea about stack tracing, how is that done and by what tools? 

Greetings,
Krzysztof

-----Original Message-----
From: lrtaylor@micron.com [mailto:lrtaylor@micron.com] 
Sent: Monday, September 29, 2003 6:37 PM
To: Wisniowski, Krzysztof; gcc-help@gcc.gnu.org
Subject: RE: Migration from RWTools to string - problems [newbie]


Are you attempting to modify the strings using the pointer returned by
c_str()?  If so, DON'T!  Otherwise, normally, calling c_str() several
times should not cause a memory leak or cause your program to crash.
Have you tried looking at the stack trace to see where it is crashing?

Thanks,
Lyle Taylor


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]