Project

General

Profile

« Previous | Next » 

Revision ad761ad2

Added by jeremyevans (Jeremy Evans) about 1 year ago

Release GVL for get{pwnam,pwuid,grgid,grnam}_r calls in process.c

Do not release GVL around get{pwuid,pwnam,grgid,grnam} calls,
as doing so is not thread-safe. Another C extension could have
a concurrent call, and derefencing the returned pointer from
these calls could result in a segfault.

Have rb_home_dir_of call rb_getpwdirnam_for_login if available,
so it can use getpwnam_r and release GVL in a thread-safe manner.

This is related to GVL releasing work in [Bug #20587].