tech-pkg archive


emacs segfaulting during temacs load phase

So, this behavior (which has been plaguing all the emacs packages on
and off) popped up in emacs20 on current with gcc 4.5, and last night
I traced it to the compiler optimizing out the changes to
__malloc_hook in alloc.c. Adding [the expansion of] __insn_barrier()
in between the assignments made the crash go away.

A casual inspection suggests that this problem should also affect
emacs21 and emacs22 -- that is, the somewhat regrettable structure of
malloc calls is unchanged and there's nothing I can see that would
lead the compiler to make a different decision from what it did on

(I didn't look at emacs23 or emacs24 last night, but they're probably
either similar or have an overt fix or have completely different

Is the behavior we've been seeing actually consistent with it being a
gcc 4.5 issue? (What I've seen myself has been. But of course there
might be multiple problems with the same symptom.)

Can someone(s) who's been seeing this problem building other emacs
versions (I haven't been so far) try merging my emacs20 changes and
seeing if it helps? The changes are the bottom three hunks of
emacs20's patch-bm.

David A. Holland

Home | Main Index | Thread Index | Old Index