[#62904] [ruby-trunk - Feature #9894] [Open] [RFC] README.EXT: document rb_gc_register_mark_object — normalperson@...
Issue #9894 has been reported by Eric Wong.
3 messages
2014/06/02
[#63321] [ANN] ElixirConf 2014 - Don't Miss Jos辿 Valim and Dave Thomas — Jim Freeze <jimfreeze@...>
Just a few more weeks until ElixirConf 2014!
6 messages
2014/06/24
[ruby-core:63191] [ruby-trunk - Bug #9600] sysconf(_SC_GETGR_R_SIZE_MAX) is just a hint for getgrnam_r()
From:
nagachika00@...
Date:
2014-06-16 15:34:31 UTC
List:
ruby-core #63191
Issue #9600 has been updated by Tomoyuki Chikanaga.
Backport changed from 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED to 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: DONE
r45287, r45288, r45289 and r45290 were backported into `ruby_2_1` branch at r46449.
----------------------------------------
Bug #9600: sysconf(_SC_GETGR_R_SIZE_MAX) is just a hint for getgrnam_r()
https://bugs.ruby-lang.org/issues/9600#change-47242
* Author: Rei Odaira
* Status: Closed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: ruby 2.2.0dev (2014-03-05) [powerpc64-linux]
* Backport: 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: DONE
----------------------------------------
When there is a group that has a lot of members, TestProcess#test_execopts_gid fails. Following is a more simple example:
$ ruby -e 'system("true", gid: "largegroup")'
-e:1:in `system': Numerical result out of range - getgrnam_r (Errno::ERANGE)
from -e:1:in `<main>'
This wrong exception happens because obj2gid() in process.c calls getgrnam_r() with a buffer that was allocated based on the size returned by sysconf(_SC_GETGR_R_SIZE_MAX). In Linux, sysconf(_SC_GETGR_R_SIZE_MAX) returns 1024, but actually this value is just a hint, so obj2gid() should gradually extend the buffer until getgrnam_r() no longer throws ERANGE.
The same issue was reported in the following page:
http://tomlee.co/2012/10/problems-with-large-linux-unix-groups-and-getgrgid_r-getgrnam_r/
--
https://bugs.ruby-lang.org/