From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fb264cdd67c2f20f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!peer01.cox.net!cox.net!p01!fed1read11.POSTED!53ab2750!not-for-mail From: James Dennett User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060516) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Compiler Bug or what I'm doing wrong? References: <05lkrrojfd.fsf@hod.lan.m-e-leypold.de> <1150875880.103859.95200@p79g2000cwp.googlegroups.com> <4fstb4F1kgmekU1@individual.net> In-Reply-To: <4fstb4F1kgmekU1@individual.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Wed, 21 Jun 2006 19:07:31 -0700 NNTP-Posting-Host: 68.7.248.4 X-Complaints-To: abuse@cox.net X-Trace: fed1read11 1150942052 68.7.248.4 (Wed, 21 Jun 2006 22:07:32 EDT) NNTP-Posting-Date: Wed, 21 Jun 2006 22:07:32 EDT Organization: Cox Communications Xref: g2news2.google.com comp.lang.ada:4892 Date: 2006-06-21T19:07:31-07:00 List-Id: Alex R. Mosteo wrote: > M E Leypold wrote: > >> "Ludovic Brenta" 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. The "delta" tool can largely automate the task of reducing a test case to something closer to minimal, though some manual intervention helps: http://gcc.gnu.org/wiki/A%20guide%20to%20testcase%20reduction I've used it only a couple of times, but it saved me a *lot* of effort. (On the other hand, it might need tweaking to support Ada; I don't know, I used it on C++ code.) -- James