[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ltdl.c thinks it's psychic (another SEGFAULT bug).

From: Rob Browning
Subject: ltdl.c thinks it's psychic (another SEGFAULT bug).
Date: Tue, 06 Nov 2001 20:30:15 -0600
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1

I finally found one of the gnucash segfaults I've been chasing for a
long time :<   I turned my attention fully to libtool after seeing
stefan's last segfault warning.

The simple summary: you can't trivially replace realloc unless you
also control malloc.  Without controlling malloc, how could realloc
possibly know how much data to copy from the source?

To fix this, ltdl.c needs to quit providing its own replacement for
realloc, or it needs to also provide a replacement malloc so that it
will know the size of the srcptr.

The current ltdl code uses the size of the destination (i.e. the
realloc size arg) to determine how much data to copy.  This means that
it's often copying random parts of the heap -- and sometimes the OS is

Rob Browning
rlb,, and
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD

reply via email to

[Prev in Thread] Current Thread [Next in Thread]