Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Tue, 9 Oct 2001 14:20:05 -0400
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: Perl 5.7.2
Message-ID: <20011009142005.D25375@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <3BC30401.2D09A965@rowman.com> <3BC341F5.12093.C1DD7@localhost> <20011009125532.A24952@redhat.com> <3BC333FF.23E05C83@rowman.com> <8122066680.20011009214203@logos-m.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8122066680.20011009214203@logos-m.ru>
User-Agent: Mutt/1.3.21i

On Tue, Oct 09, 2001 at 09:42:03PM +0400, egor duda wrote:
>Hi!
>
>Tuesday, 09 October, 2001 John Peacock jpeacock@rowman.com wrote:
>
>>> I suspect that there might be some problem with a misconfigured perl,
>>> maybe?  I know that perl can use its own version of malloc.  I wonder
>>> if some memory that is allocated by perl's malloc has been passed to
>>> cygwin's malloc for freeing.  If so, then *boom*.
>
>JP> That is a distinct possibility.  I could see that Perl_safesysfree was 
>JP> being called, but all of those things should have been created with 
>JP> Perl_safemalloc.  These are both wrappers around the system malloc()
>JP> and free() so it is an avenue of investigation at least.  I'll look at
>JP> the wrapper code and see if there is anything that has changed recently.
>
>JP> But, would this mean that if miniperl is being run under gdb, there 
>JP> would be no core dump?  Because that is the behavior I am seeing
>JP> (once I downgraded to CygWin 1.3.2-2).
>
>free() does not necessarily crash on wrong pointer. whether it crashes
>or not depends heavily on heap layout, which certainly changes between
>different dll versions.

Right.  It is *possible* to pass an invalid pointer to free() and not
get a core dump.  You'll probably end up corrupting the heap, though,
regardless.  So, subsequent heap operations could be fouled up.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

