develooper Front page | perl.perl5.porters | Postings from July 2008

Re: [perl #50856] Bug fix in malloc.c

Thread Previous
David Landgren
July 16, 2008 11:38
Re: [perl #50856] Bug fix in malloc.c
Message ID:
Noyes, Mark wrote:
> Bram, 
> I would like to be able to supply a test case, but this bug is not easy
> to replicate, as it depends on a bunch of enviornmental factors.  I will
> try to describe the scenario it which it occurs, in case that helps. 
> We would occasionally encounter cases when a customer would attempt to
> use our product and the perl code would crash with a SEGV or Bus Error
> repeatedly, until the shell environment was changed somewhat.  We
> eventually determined that the following sequence of events were
> occurring.
> During program initialization, the perl interpreter calls Perl_malloc
> for an SV which will later grow.  Next, a perl module is loaded that has
> a DLL with initialization code.  That initialization code calls the libc
> malloc() or other code which causes an sbrk() to occur where the brk
> increase is not a multiple of NEEDED_ALIGNMENT.

Mixing mallocs sounds like a recipe for disaster.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About