[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: crash in c++ library (sstream)

> From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
> Behalf Of Hans-Peter Nilsson
> Sent: Tuesday, April 08, 2003 9:47 PM
> To: meier@xxxxxxx.ch
> Cc: hans-peter.nilsson@xxxxxxx.com
> Subject: Re: crash in c++ library (sstream)

> It seems you compiled the *program* with -fPIC?  In the normal
> case, that'd just needlessly result in a slower, larger program,
> but it mustn't crash.

Yes: the axis application is part of a project which runs different
applications on several platforms.
That project uses a common Makefile structure, part of it generates shared
libraries (this is why we used the -fPIC option).
I now separated the axis application to avoid the -fPIC.

> Indeed, compiling with:
> "g++-cris -pedantic -W -Wall -mlinux -O2 -fPIC /tmp/g.cc -o gg"
> gives me a working binary: I get the "hello" and no crash.

We avoided the -O2 compile option, because we had a bad behaviour (even
crashes) when we used it with an older cris-distribution.
It seems that this problem has been fixed now, but I didn't try it yet.

> Could you please quote the *exact* command you use to compile
> the file you sent?

g++-cris -mlinux -isystem
/usr/local/axis/devboard_lx/os/linux/include -Wall -Wno-ctor-dtor-privacy -p
ipe -g test.cpp -o test
-> OK :-)

g++-cris -mlinux -isystem
/usr/local/axis/devboard_lx/os/linux/include -Wall -Wno-ctor-dtor-privacy -p
ipe -g -fPIC test.cpp -o test
-> crash :-(

> ...
> With the command lines above, I get the warnings below.  If this
> is what you refer to, the sstream warnings will be fixed in a
> future release.

Yes, I was referring to those warnings

Thank you and best regards