ruby-changes:32862
From: usa <ko1@a...>
Date: Fri, 14 Feb 2014 15:19:32 +0900 (JST)
Subject: [ruby-changes:32862] usa:r44941 (ruby_1_9_3): merge revision(s) 44731, 44751: [Backport #8978]
usa 2014-02-14 15:19:25 +0900 (Fri, 14 Feb 2014) New Revision: 44941 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44941 Log: merge revision(s) 44731,44751: [Backport #8978] * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. [ruby-core:57599] [Bug #8978]. Thanks mame! * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. [ruby-core:57599] [Bug #8978]. Modified directories: branches/ruby_1_9_3/ Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/ext/fiddle/closure.c branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 44940) +++ ruby_1_9_3/ChangeLog (revision 44941) @@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1 +Fri Feb 14 15:17:17 2014 Yusuke Endoh <mame@t...> + + * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. + [ruby-core:57599] [Bug #8978]. + +Fri Feb 14 15:17:17 2014 Aaron Patterson <aaron@t...> + + * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. + [ruby-core:57599] [Bug #8978]. Thanks mame! + Fri Feb 14 15:04:36 2014 Nobuyoshi Nakada <nobu@r...> * thread_pthread.c (rb_thread_create_timer_thread): fix for platforms Index: ruby_1_9_3/ext/fiddle/closure.c =================================================================== --- ruby_1_9_3/ext/fiddle/closure.c (revision 44940) +++ ruby_1_9_3/ext/fiddle/closure.c (revision 44941) @@ -21,7 +21,7 @@ dealloc(void * ptr) https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ext/fiddle/closure.c#L21 #ifndef DONT_USE_FFI_CLOSURE_ALLOC ffi_closure_free(cls->pcl); #else - munmap(cls->pcl, sizeof(cls->pcl)); + munmap(cls->pcl, sizeof(*cls->pcl)); #endif if (cls->argv) xfree(cls->argv); xfree(cls); @@ -228,7 +228,10 @@ initialize(int rbargc, VALUE argv[], VAL https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/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_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 44940) +++ ruby_1_9_3/version.h (revision 44941) @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1 #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 522 +#define RUBY_PATCHLEVEL 523 #define RUBY_RELEASE_DATE "2014-02-14" #define RUBY_RELEASE_YEAR 2014 Property changes on: ruby_1_9_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44731,44751 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/