diff --git a/ChangeLog b/ChangeLog index 8683bf333e..d6c278f3cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Mon Feb 17 01:12:57 2014 Yusuke Endoh + + * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. + [ruby-core:57599] [Bug #8978]. + +Mon Feb 17 01:12:57 2014 Aaron Patterson + + * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value. + [ruby-core:57599] [Bug #8978]. Thanks mame! + Mon Feb 17 01:09:52 2014 Eric Wong * benchmark/driver: avoid large alloc in driver process diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c index d064f11991..2788bce4c5 100644 --- a/ext/fiddle/closure.c +++ b/ext/fiddle/closure.c @@ -21,7 +21,7 @@ dealloc(void * ptr) #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,7 @@ initialize(int rbargc, VALUE argv[], VALUE self) #else result = ffi_prep_closure(pcl, cif, callback, (void *)self); cl->code = (void *)pcl; - i = mprotect(pcl, sizeof(pcl), PROT_READ | PROT_EXEC); + i = mprotect(pcl, sizeof(*pcl), PROT_READ | PROT_EXEC); if (i) { rb_sys_fail("mprotect"); } diff --git a/version.h b/version.h index 444adc3f21..e7c472d9bf 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2014-02-17" -#define RUBY_PATCHLEVEL 426 +#define RUBY_PATCHLEVEL 427 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2