Re: Compiler Bug or what I'm doing wrong?



M E Leypold wrote:


"Ludovic Brenta" <ludovic@xxxxxxxxxxxxxxxxxx> writes:

M E Leypold writes :
I've generated a core and also can reproduce the SIGSEGV in this
configuration 100% of the time. Don't hesitate to ask for more
debugger output or more code.

I'd ask for *less* code :-)

It would be nice if you could write a minimal test case that reproduces
the problem. Yes, it takes time. I cannot do that for you, for various

I've already done that (it took me 10 hours so far to isolate the
problem from a larger program): The original program was much
larger. I'll be trying to even strip the example furter, but the
problem with the bug seems to be that it's a Heisenbug which vanishes
when you delete some fields in the datastructure, then turns up again
if you delete more fields and so on. The malloc() implementation of
libc which the GNAt runtime uses is unchecked so obviously one gets
sometimes away when freeing unvalid pointers and (as we know from C
programming).

Indeed, for me the most frustrating part of bug reporting is obtaining a
sufficiently small test case. I usually hit bugs in a large project I'm
involved. Once you start to chop off, you know that the bug will disappear
along the way. When you're not even sure if you're the culprit and not the
compiler, the frustration is even bigger.

I'm now, for example, facing a spurious exception case when switching from
GNAT GPL'05 to GPL'06, only when certain compiler switches are used. I have
already found a workaround, and I even know that the problem is related
with interfaces, but I fear that the effort to isolate it will be a waste
of time. So the temptation to move on is big...

This post is really just to show my "condolences" and support. Best luck,

A. Mosteo.
.