1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/a3aa49cd5d75/
Changeset: a3aa49cd5d75
User: kehoea
Date: 2017-11-23 18:48:06+00:00
Summary: Don't just take the first -no-pie option that links, ASLR checking
ChangeLog addition:
2017-11-23 Aidan Kehoe <kehoea(a)parhasard.net>
* configure.ac:
Don't just take the first link-time option to disable ASLR that
links, check that it actually disables ASLR (in the same way we
checked for ASLR in the first place) before choosing it. Thank
you for the bug report, Stephen Turnbull.
* configure: Regenerate.
Affected #: 3 files
diff -r 0ea0f070cae29307b29f520c32087256496e5ad5 -r
a3aa49cd5d7559d6947d815a6aa78413e0010c30 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-11-23 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * configure.ac:
+ Don't just take the first link-time option to disable ASLR that
+ links, check that it actually disables ASLR (in the same way we
+ checked for ASLR in the first place) before choosing it. Thank
+ you for the bug report, Stephen Turnbull.
+ * configure: Regenerate.
+
2017-11-23 Stephen J. Turnbull <stephen(a)xemacs.org>
* configure.ac (Disable ASLR): Output $no_pie in AC_MSG_RESULT.
diff -r 0ea0f070cae29307b29f520c32087256496e5ad5 -r
a3aa49cd5d7559d6947d815a6aa78413e0010c30 configure
--- a/configure
+++ b/configure
@@ -12231,11 +12231,31 @@
else
for try_no_pie in "-no-pie" "-Wl,-no_pie" "-nopie"; do
xe_check_libs="${try_no_pie}"
- if ac_fn_c_try_link "$LINENO"; then :
- no_pie="${try_no_pie}"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':"
>&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+static int test_func(void) { return 42; }
+int main (int c, char **v) { if (--c) { printf ("%p", &test_func); } return
0; }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ test_func_address=`./conftest t`
+ if test "$test_func_address" = `./conftest t` \
+ -a "$test_func_address" = `./conftest t` \
+ -a "$test_func_address" = `./conftest t` \
+ -a "$test_func_address" = `./conftest t`; then
+ no_pie="${try_no_pie}"
+ fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
xe_check_libs=""
if test -n "$no_pie"; then
start_flags="$start_flags $no_pie" && if
test "$verbose" = "yes"; then echo " Appending
\"$no_pie\" to \$start_flags"; fi
diff -r 0ea0f070cae29307b29f520c32087256496e5ad5 -r
a3aa49cd5d7559d6947d815a6aa78413e0010c30 configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -2817,7 +2817,16 @@
else
for try_no_pie in "-no-pie" "-Wl,-no_pie" "-nopie"; do
xe_check_libs="${try_no_pie}"
- AC_LINK_IFELSE([], no_pie="${try_no_pie}")
+ AC_RUN_IFELSE([AC_LANG_SOURCE([#include <stdio.h>
+static int test_func(void) { return 42; }
+int main (int c, char **v) { if (--c) { printf ("%p", &test_func); } return
0; }])],
+ [test_func_address=`./conftest t`
+ if test "$test_func_address" = `./conftest t` \
+ -a "$test_func_address" = `./conftest t` \
+ -a "$test_func_address" = `./conftest t` \
+ -a "$test_func_address" = `./conftest t`; then
+ no_pie="${try_no_pie}"
+ fi])
xe_check_libs=""
if test -n "$no_pie"; then
dnl Don't be tempted to apply XE_PROTECT_LINKER_FLAGS() to this.
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.