bug-gnu-emacs
[Top][All Lists]
Advanced

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

DOUG_LEA_MALLOC + REL_ALLOC leads to binary incompatibility across libc


From: Marcus Brinkmann
Subject: DOUG_LEA_MALLOC + REL_ALLOC leads to binary incompatibility across libc updates
Date: Mon, 29 Apr 2002 16:01:37 -0400
User-agent: Mutt/1.3.25i

Hi,

when compiling emacs21 on the GNU/Hurd system, it will be compiled
with DOUG_LEA_MALLOC and REL_ALLOC (because the src/s/gnu.h file
does not undefine it like it is done on src/s/gnu-linux.h for
the GNU/Linux platform).

This leads to a binary incompatibility across libc updates,
because the symbol real_morecore will have the address of
__default_morecore compiled into the binary with a fixed value,
and it will not be relocated.  I was able to reproduce this on
GNU/Linux by removing the #undef REL_ALLOC in src/s/gnu-linux.h:

address@hidden:~/emacs-test/emacs-21.1.95/src$ 
LD_LIBRARY_PATH=~marcus/emacs-test/usr/lib/debug ./emacs-21.1.95.1
Fatal error (11).Segmentation fault

(Feel free to play with the files on fencepost if you have an account).

So, maybe adding the same #undef REL_ALLOC in src/s/gnu.h is a good work
around, I don't know.  Maybe this should really work and we want
REL_ALLOC, I don't know either.  However, I positively tested that
#undef REL_ALLOC in src/s/gnu.h fixes this incompatibility, so at least
I could verify that the behaviour is the same on both GNU systems.

Thanks,
Marcus




reply via email to

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