summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-03-06 21:32:42 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-03-06 21:41:34 +0900
commit0256e4f0f5e10f0a15cbba2cd64e252dfa864e4a (patch)
tree09f9e3f9247456d089c5d26102cbe9793938db36 /ruby.c
parentbaaf6815704ef36160e45244b844b633ed51c3b4 (diff)
downloadruby-0256e4f0f5e10f0a15cbba2cd64e252dfa864e4a.tar.gz
thread_pthread.c: allocate sigaltstack before pthread_create
A new (not-initialized-yet) pthread attempts to allocate sigaltstack by using xmalloc. It may cause GC, but because the thread is not initialized yet, ruby_native_thread_p() returns false, which leads to "[FATAL] failed to allocate memory" and exit. In fact, we can observe the error message in the log of OpenBSD CI: https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20200306T083005Z.log.html.gz This changeset allocates sigaltstack before pthread is created.
Diffstat (limited to 'ruby.c')
0 files changed, 0 insertions, 0 deletions