help-gplusplus
[Top][All Lists]
Advanced

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

Re: g++ and -fstack-check


From: Paul Pluzhnikov
Subject: Re: g++ and -fstack-check
Date: Fri, 13 Jul 2007 06:44:05 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

mathieu <mathieu.malaterre@gmail.com> writes:

>   I am looking for some help on using -fstack-check.

I think you mis-understood what that option does.
It does *not* help find stack corruption errors, and you probably
do not want it.

> I am experiencing a very bizarre
> stack corruption that I reproduce by setting a hardware breakpoint on
> an int within gdb. At first I tought this was simply a miscompilation
> and recompile everything. But then recompiling the code with -fstack-
> check made the issue go away...
>
>   My program is not threaded, I do not see anything reported by
> valgrind at all. So I am stuck here in not knowing what to do.

You could try '-fmudflap' option available with gcc-4.x. 
However, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19319

Other (non-free) alternatives: Insure++ (www.parasoft.com) and
Coverity (www.coverity.com).

>   Why would my issue go away when recompiling simply with -fstack-check ?

Because it affects the code gcc generates?

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]