Mail Archives: cygwin/2001/10/09/14:19:32
On Tue, Oct 09, 2001 at 09:42:03PM +0400, egor duda wrote:
>Hi!
>
>Tuesday, 09 October, 2001 John Peacock jpeacock AT rowman DOT 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/
- Raw text -