From: normalperson@... Date: 2014-05-20T02:17:39+00:00 Subject: [ruby-core:62694] [ruby-trunk - Bug #9856] [Open] [PATCH] process.c (proc_getgroups, proc_setgroups): use ALLOCV_N Issue #9856 has been reported by Eric Wong. ---------------------------------------- Bug #9856: [PATCH] process.c (proc_getgroups, proc_setgroups): use ALLOCV_N https://bugs.ruby-lang.org/issues/9856 * Author: Eric Wong * Status: Open * Priority: Normal * Assignee: Eric Wong * Category: core * Target version: current: 2.2.0 * ruby -v: ruby 2.2.0dev (2014-05-19 trunk 46010) [x86_64-linux] * Backport: 2.0.0: REQUIRED, 2.1: REQUIRED ---------------------------------------- On my Linux system, these may return up to 64K rb_gid_t entries for a total of 256K stack usage, potentially triggering SystemStackError or just a segfault. Use ALLOCV_N for stack safety, especially since these are not performance-critical methods. Will commit in a day or two. http://bogomips.org/ruby.git/patch?id=9074e3808d ---Files-------------------------------- process-allocv_n.patch (1.92 KB) -- https://bugs.ruby-lang.org/