delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/10/14:01:16

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <41B9F259.4000903@kleckner.net>
Date: Fri, 10 Dec 2004 11:00:41 -0800
From: Jim Kleckner <jek-cygwin1 AT kleckner DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygwin-gcc-fopen bug? (Purify)
References: <NUTMEGf0MjkatwD43oF0000060e AT NUTMEG DOT CAM DOT ARTIMI DOT COM>
In-Reply-To: <NUTMEGf0MjkatwD43oF0000060e@NUTMEG.CAM.ARTIMI.COM>
X-IsSubscribed: yes

Dave Korn wrote:
>>-----Original Message-----
>>From: cygwin-owner On Behalf Of Lester Ingber
>>Sent: 10 December 2004 16:14
...
>   Your code has a bug: a stray pointer or array overwrite that is trashing some
> memory.  The only reason you get away with it on Solaris is by sheer luck;
> either the stack or heap layout is different, or the random uninitialised
> contents of a variable point somewhere harmless or something like that.
> 
>   Since you can see a NUL (heh, NULL != NUL you know!) appearing in the middle
> of the name string, you could always set a gdb watchpoint on it to see exactly
> when it gets stomped and what instruction is doing it.

We used to use Purify to find these sorts of problems
often just by running the program once.  Unfortunately
for us using cygwin, Purify appears to have moved toward
a firm dependence on VC.  Also, it is quite expensive.

However, since you say that you use Solaris you
may be able to use it on that platform.  Often,
the trial period is all you need to find that
pesky problem (and probably a host of others
in the process...).

  Info: http://tinyurl.com/54fg6
  Trial for Unix: http://tinyurl.com/6vle6
  Trial for Win: http://tinyurl.com/4t8mf

One concern is that I recall that they
may not be using their very strong
"object code insertion" technique on Unix
any longer and, without that, Purify becomes
fairly similar to BoundsChecker.

Has anyone out there gotten either Purify
or BoundsChecker to work with Cygwin?
I'll wager that if you could, Purify would
pinpoint a lot of tricky issues extremely
quickly.  Maybe a tool to munge the symbol
table into VC-compatible form?

Jim

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019