This fixes the ruby 2.4 heap overflow reported by timo.my...@wickedbsd.net. The underlying cause was they renamed variables in gc.c but forgot to update the configure script.
Ruby bug report: https://bugs.ruby-lang.org/issues/13438 Tested briefly on amd64, I'll run more tests soon. Assuming no problems I'll be committing this weekend unless I hear objections. Thanks, Jeremy Index: Makefile =================================================================== RCS file: /cvs/ports/lang/ruby/2.4/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- Makefile 24 Mar 2017 14:39:05 -0000 1.3 +++ Makefile 14 Apr 2017 23:16:12 -0000 @@ -16,6 +16,8 @@ PKGNAME-ri_docs = ruby24-ri_docs-${VERSI PKG_ARCH-ri_docs = * WANTLIB-ri_docs = # empty +REVISION-main = 0 + NEXTVER = 2.5 PKGSPEC-main = ruby->=${RUBYLIBREV},<${NEXTVER} Index: patches/patch-configure =================================================================== RCS file: /cvs/ports/lang/ruby/2.4/patches/patch-configure,v retrieving revision 1.2 diff -u -p -r1.2 patch-configure --- patches/patch-configure 24 Mar 2017 14:39:05 -0000 1.2 +++ patches/patch-configure 14 Apr 2017 23:15:58 -0000 @@ -5,8 +5,10 @@ Fix so name, checking for DOT and DOXYGE Override the arch setting to remove OpenBSD version from it, so ports don't have to be bumped when OpenBSD version changes. +Rename HEAP_ALIGN_LOG to HEAP_PAGE_ALIGN_LOG to fix heap overflow. + --- configure.orig Tue Mar 21 22:56:10 2017 -+++ configure Wed Mar 22 08:33:15 2017 ++++ configure Fri Apr 14 16:15:30 2017 @@ -424,7 +424,7 @@ if test -z "$2"; then : else @@ -16,6 +18,21 @@ so ports don't have to be bumped when Op if test "$FOLD"; then : echo "$2" | fold -s -w50 | +@@ -19464,12 +19464,12 @@ fi + colorize_result "$rb_cv_page_size_log" ; } + if test $rb_cv_page_size_log != no; then + cat >>confdefs.h <<_ACEOF +-#define HEAP_ALIGN_LOG $rb_cv_page_size_log ++#define HEAP_PAGE_ALIGN_LOG $rb_cv_page_size_log + _ACEOF + + else + cat >>confdefs.h <<_ACEOF +-#define HEAP_ALIGN_LOG 12 ++#define HEAP_PAGE_ALIGN_LOG 12 + _ACEOF + + fi @@ -25601,7 +25601,7 @@ esac openbsd*|mirbsd*) :