[前][次][番号順一覧][スレッド一覧]

ruby-changes:53599

From: k0kubun <ko1@a...>
Date: Tue, 20 Nov 2018 08:05:16 +0900 (JST)
Subject: [ruby-changes:53599] k0kubun:r65815 (trunk): configure.ac: avoid crashing MJIT with -fcf-protection

k0kubun	2018-11-20 08:05:11 +0900 (Tue, 20 Nov 2018)

  New Revision: 65815

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65815

  Log:
    configure.ac: avoid crashing MJIT with -fcf-protection
    
    by avoiding using __builtin_longjmp, like r64983.
    
    [Bug #15307]

  Modified files:
    trunk/configure.ac
Index: configure.ac
===================================================================
--- configure.ac	(revision 65814)
+++ configure.ac	(revision 65815)
@@ -1001,6 +1001,12 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L1001
 		AS_CASE(["$target_cpu"], [powerpc64*], [
 			ac_cv_func___builtin_setjmp=no
 		])
+		# With gcc-8's -fcf-protection, MJIT's __builtin_longjmp fails.
+		# TODO: Check if CFLAGS actually includes -fcf-protection instead of using RUBY_TRY_CFLAGS
+		RUBY_TRY_CFLAGS(-fcf-protection, [cf_protection=yes], [cf_protection=no])
+		AS_IF([test "$cf_protection" = yes], [
+			ac_cv_func___builtin_setjmp=no
+		])
 		],
 [	LIBS="-lm $LIBS"])
 : ${ORIG_LIBS=$LIBS}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]