Building xemacs hangswhen using -fpie: (in addition to exec-shield
non-executable stuff, this adds "randomize location in memory" support)
./xemacs -nd -no-packages -batch -l
/home/valdis/src/xemacs-21.5/src/../lisp/update-elc.el
#0 0x080c1d4b in grow_specpdl (reserved=1) at eval.c:5723
#1 0x080c20d4 in record_unwind_protect (function=0, arg=0) at eval.c:5856
#2 0x080c2252 in record_unwind_protect_restoring_int (addr=0x81fe174, val=0) at
eval.c:5937
#3 0x080c227e in internal_bind_int (addr=0x81fe174, newval=0) at eval.c:5950
#4 0x0808ffd3 in begin_gc_forbidden () at alloc.c:4335
#5 0x080b0b34 in emacs_vsprintf_string (
format=0x81c6460 "%s\nKilling some buffers may delay running out of
memory.\nHowever, certainly by the time you receive the 95%% warning,\nyou should clean
up, kill this Emacs, and start a new one.",
vargs=0xbff16858 "�\215\036\b��\037\b|h���i\e\b�\215\036\b\225�\025") at
doprnt.c:822
#6 0x080c2ba8 in warn_when_safe (class_=0, level=0,
fmt=0x81c6460 "%s\nKilling some buffers may delay running out of
memory.\nHowever, certainly by the time you receive the 95%% warning,\nyou should clean
up, kill this Emacs, and start a new one.") at eval.c:6402
#7 0x0808c660 in malloc_warning (str=0x81e8da0 "Warning: past 75% of memory
limit") at alloc.c:266
#8 0x081b69a8 in check_memory_limits () at vm-limit.c:105
#9 0x00430344 in sYSMALLOc () from /lib/tls/libc.so.6
#10 0x0042d10d in malloc () from /lib/tls/libc.so.6
#11 0x0808c72a in xmalloc (size=1) at alloc.c:331
#12 0x0808df84 in allocate_string_chars_struct (string_it_goes_with=0, fullsize=24) at
alloc.c:2076
#13 0x0808e0e2 in make_uninit_string (length=17) at alloc.c:2130
#14 0x0808e724 in make_string (contents=0x81cffe3 "extent-mouse-face",
length=17) at alloc.c:2428
#15 0x08177280 in intern_int (str=0x81cffe3 "extent-mouse-face") at
symbols.c:191
#16 0x0817729b in intern (str=0x81cffe3 "extent-mouse-face") at symbols.c:197
#17 0x0817a2ec in defsubr (subr=0x81f0128) at symbols.c:3507
#18 0x080e1536 in syms_of_extents () at extents.c:7339
#19 0x080b854c in xemacs_21_5_b16_i686_pc_linux (argc=6, argv=0xbff16ac4, envp=0xbff16ae0,
restart=0)
at emacs.c:1268
#20 0x080b9578 in main (argc=0, argv=0x0, envp=0x0) at emacs.c:2865
#21 0x003d3750 in __libc_start_main () from /lib/tls/libc.so.6
#22 0x0808aed1 in _start ()
Immediate cause of the problem:
while (specpdl_size < size_needed)
{
specpdl_size *= 2;
if (specpdl_size > max_specpdl_size)
specpdl_size = max_specpdl_size;
}
We go into here with specpdl_size=0 and size_needed=1. Infloop.
Not sure yet why -fpie causes this state of affairs. Probably has
to do with the check in vm-limit.c:check_memory_limits - I suspect
that the calculation of 'cp' and 'data_size' is getting b0rked when
we're using address space randomization.