On Mon, 03 Nov 2003 15:51:57 EST, Valdis.Kletnieks(a)vt.edu said:
Building xemacs hangswhen using -fpie: (in addition to exec-shield
non-executable stuff, this adds "randomize location in memory" support)
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.
Bingo.
I added a printf to check_memory_limits():
without -pie:
./xemacs -nd -no-packages -batch -l
/home/valdis/src/xemacs-21.5/src/../lisp/update-elc.el
cp=a163000 data_space_start=81d4394 data_size=1f8ec6c
cp=a184000 data_space_start=81d4394 data_size=1fafc6c
cp=a1a5000 data_space_start=81d4394 data_size=1fd0c6c
With it:
./xemacs -nd -no-packages -batch -l
/home/valdis/src/xemacs-21.5/src/../lisp/update-elc.el
cp=89c0000 data_space_start=443c50 data_size=857c3b0
<hang>
./xemacs -nd -no-packages -batch -l
/home/valdis/src/xemacs-21.5/src/../lisp/update-elc.el
cp=8c74000 data_space_start=ab2c50 data_size=81c13b0
<hang>
So the problem is that data_space_start has become *very* migratory.
Ideas?