C++ :: Stack array bounds write purify error with exceptions
Joe Buck
Joe.Buck@synopsys.COM
Wed Jan 5 20:04:00 GMT 2005
On Wed, Jan 05, 2005 at 01:34:19PM -0500, Andrew Pinski wrote:
>
> On Jan 5, 2005, at 12:48 PM, Joe Buck wrote:
>
> > On Wed, Jan 05, 2005 at 08:23:50AM -0500, Frank Ch. Eigler wrote:
> >> Raghu Annaluru <raghu_annaluru@yahoo.com> writes:
> >>
> >>> We are facing a purify "Stack array bounds write"
> >>> error with exceptions. [...]
> >>
> >> As far as I know, Purify has always needed some adjustments to work
> >> with different versions of gcc. Since purify is proprietary software,
> >> it is difficult to give any useful advice, except that you could
> >> contact its author.
> >
> > Purify operates directly on the assembly code, so if it detects a stack
> > array bounds write, it is quite likely to be a bug in gcc (though it
> > might
> > be the type of bug that matters only in embedded systems, where a
> > seperate
> > stack is not used for interrupts). I recall that the author of
> > valgrind
> > has found very similar bugs in several versions of gcc, though I don't
> > know if this one is among them.
>
> No this is not a GCC bug, purify does not work well with dwarf
> exceptions.
>
> See <http://gcc.gnu.org/ml/gcc-bugs/1999-01/msg00240.html> which
> explains clearly this is not a bug in GCC but a bug in purify.
Not necessarily. That message is from 1999 (Purify has had several new
releases since then), and describes completely different symptoms; on the
other hand, Julian Seward (author of valgrind) has repeatedly pointed out
stack bounds violations in code generated by various g++ 3.x, that are real
bugs (though I know of none in recent releases). The current report is
a stack bound violation, not a core dump; if Purify were still failing to
save a register, I can't imagine that the program would survive.
You should not be so certain that you understand the issue.
More information about the Gcc
mailing list