]> git.eshelyaron.com Git - emacs.git/commit
Fix crash backtraces on MS-Windows, broken by ASLR
authorEli Zaretskii <eliz@gnu.org>
Fri, 26 Jan 2024 13:01:51 +0000 (15:01 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 26 Jan 2024 19:03:37 +0000 (20:03 +0100)
commit292435752500f87989bb8f56f5d35127e3244b15
treed7c29b73fd2128df1115943739760530925c6438
parentf866db2e83d85ba6f7bcfca4f0910c7671b45b7d
Fix crash backtraces on MS-Windows, broken by ASLR

* src/w32fns.c (DEFAULT_IMAGE_BASE): Define for 64-bit and 32-bit
MinGW builds.
(emacs_abort): Correct the callstack addresses for potential
relocation of the image base due to ASLR.  This makes 'addr2line'
be able to interpret emacs_backtrace.txt when ASLR is in effect,
which it is on every modern version of MS-Windows.  (Bug#63365)

* configure.ac (LD_SWITCH_SYSTEM_TEMACS) [mingw32]: Add comment
about keeping the image-base values in sync with w32fns.c.

* etc/DEBUG (How to disable ASLR): New section.

(cherry picked from commit de020255a5cef4349d786fceb19481352c49557b)
configure.ac
etc/DEBUG
src/w32fns.c