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

ruby-changes:28238

From: nagachika <ko1@a...>
Date: Sun, 14 Apr 2013 23:47:26 +0900 (JST)
Subject: [ruby-changes:28238] nagachika:r40290 (ruby_2_0_0): merge revision(s) 40216: [Backport #8266]

nagachika	2013-04-14 23:47:14 +0900 (Sun, 14 Apr 2013)

  New Revision: 40290

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40290

  Log:
    merge revision(s) 40216: [Backport #8266]
    
    * ext/fiddle/closure.c (initialize): check mprotect's return value.
      If mprotect is failed because of PaX or something, its function call
      will cause SEGV.
      http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130401T210301Z.diff.html.gz

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/ext/fiddle/closure.c
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 40289)
+++ ruby_2_0_0/ChangeLog	(revision 40290)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sun Apr 14 23:43:06 2013  NARUSE, Yui  <naruse@r...>
+
+	* ext/fiddle/closure.c (initialize): check mprotect's return value.
+	  If mprotect is failed because of PaX or something, its function call
+	  will cause SEGV.
+	  http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130401T210301Z.diff.html.gz
+
 Sun Apr 14 23:19:55 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/mkmf.rb (MAIN_DOES_NOTHING): ensure symbols for tests to be
Index: ruby_2_0_0/ext/fiddle/closure.c
===================================================================
--- ruby_2_0_0/ext/fiddle/closure.c	(revision 40289)
+++ ruby_2_0_0/ext/fiddle/closure.c	(revision 40290)
@@ -228,7 +228,10 @@ initialize(int rbargc, VALUE argv[], VAL https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ext/fiddle/closure.c#L228
 #else
     result = ffi_prep_closure(pcl, cif, callback, (void *)self);
     cl->code = (void *)pcl;
-    mprotect(pcl, sizeof(pcl), PROT_READ | PROT_EXEC);
+    i = mprotect(pcl, sizeof(pcl), PROT_READ | PROT_EXEC);
+    if (i) {
+	rb_sys_fail("mprotect");
+    }
 #endif
 
     if (FFI_OK != result)
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 40289)
+++ ruby_2_0_0/version.h	(revision 40290)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-04-14"
-#define RUBY_PATCHLEVEL 125
+#define RUBY_PATCHLEVEL 126
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 4

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r40216


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

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