diff options
author | Eli Zaretskii <eliz@gnu.org> | 2024-01-26 15:01:51 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2024-01-26 15:01:51 +0200 |
commit | de020255a5cef4349d786fceb19481352c49557b (patch) | |
tree | 983b2f255dbdeeb4c3c302adcf7f92ea77c6b75b /configure.ac | |
parent | 723b0973512c0e6e9fb0f07678124347ccd44b54 (diff) |
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 55f742ba8ef..fa8b04ec685 100644 --- a/configure.ac +++ b/configure.ac @@ -7463,6 +7463,8 @@ case "$opsys" in mingw32) ## Is it any better under MinGW64 to relocate emacs into higher addresses? + ## If the values of -image-base are modified, the corresponding + ## values of DEFAULT_IMAGE_BASE in w32fns.c should be kept in sync. case "$canonical" in x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x400000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; |