[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: g++ and -fstack-check
From: |
mathieu |
Subject: |
Re: g++ and -fstack-check |
Date: |
Fri, 13 Jul 2007 14:51:06 -0000 |
User-agent: |
G2/1.0 |
On Jul 13, 3:44 pm, Paul Pluzhnikov <ppluzhnikov-...@charter.net>
wrote:
> I think you mis-understood what that option does.
> It does *not* help find stack corruption errors, and you probably
> do not want it.
ok
> You could try '-fmudflap' option available with gcc-4.x.
> However, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19319
1. Ok switching to g++-4.2 (GCC) 4.2.1 20070528 (prerelease) (Debian
4.2-20070528-1) made the issue go away.
2. But using -fmudflap and -fmudflap -lmudflap at link time create a
seg fault:
$ export MUDFLAP_OPTIONS='-mode-nop'
$ ./bin/test
terminate called after throwing an instance of 'St9bad_alloc'
what(): std::bad_alloc
[1] 10615 abort ./bin/test
The documentation is not clear whether I should recompile every single
library I am linking to using the mudflap lib too ?
I'll keep investigating as I can't switch to g++-4.x yet.
> Because it affects the code gcc generates?
:)
thanks !
-Mathieu