This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: chars and bools
- To: kip at lyris dot com
- Subject: Re: chars and bools
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sun, 1 Aug 1999 09:44:23 +0200
- CC: egcs-bugs at egcs dot cygnus dot com
- References: <Pine.SOL.4.05.9907310826430.10489-100000@luna>
> I have been having a problem with chars and bools changing their value on
> their own. This only happens with egcs and it only happens after many
> iterations through the code typically, and where it happens seems to vary
> by adding or taking away code. It is a somewhat large program, ~100k lines
> of code so it is hard to trace the behaviour. Even when I place a
> watchpoint on the variable in gdb the watchpoint does not get triggered
> before an assertion does. Could this be an alignment problem? Any idea
> what this could be attributed to?
Most likely, this is a bug in your application of some kind. Perhaps
memory management, when you access memory that has been returned to
the operating system. Or range errors, when you iterate past the end
of an array, overwriting unrelated objects.
In such cases, Rational's Purify has been a big help; there is a
number of tools out their with similar functionality - perhaps you
need to use one of those.
Regards,
Martin