Re: lidstdc++ string problems
From: Franz Sirl <hidden>
Date: 2000-02-03 11:50:43
At 11:10 03.02.00 , Patrik Jonsson wrote:
Hi everyone, I wonder if there is a known problem with the c++ string class? (I just upgraded to gcc 2.95.2, but it didn't help.) What happens is that I read into a string from a char* using a strstream as " strstream >> string". This works on other machines, but on linuxppc the resulting string contains junk at the end that is in another string object defined earlier. It's like it doesn't properly define what the length is. If I look at it in gdb, the "dat" field contains the right char*, but when reading it more stuff appears at the end. It's HIGHLY annoying, it's plain impossible to make anything work! Is this known / is there a fix or something? It seems bad if we can't trust the standard library... :(
Can you send me a small testcase that abort()'s if the bug is hit and does exit(0) otherwise? Which gcc-2.95.2 RPM did you use? 1g? Which compiler options? Does -W -Wall warn about anything? Franz. ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/