When using the PIE extension to GCC (like Gentoo's Hardened profile does)
XEmacs 21.4 has a variety of ways in which it can fail or crash. Several
of these are listed in https://bugs.gentoo.org/show_bug.cgi?id=75028
Of particular interest might be comment #13 (bottom of the page) which
explains what is causing this. It seems that GNU Emacs had a similar
problem that got resolved, so perhaps the relevant code can also be
updated in XEmacs.
XEmacs-Beta mailing list