* vm.c (thread_free): th->vm may be NULL when pthread_create

failed for ENOMEM.  [ruby-dev:37095]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-11-21 11:46:14 +00:00
parent 29927214d4
commit 3cdd85813c
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Fri Nov 21 16:06:54 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* vm.c (thread_free): th->vm may be NULL when pthread_create
failed for ENOMEM. [ruby-dev:37095]
Thu Nov 20 07:33:15 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/logger.rb (Logger): should handle the case that cvs/svn do

2
vm.c
View File

@ -1486,7 +1486,7 @@ thread_free(void *ptr)
}
#endif
if (th->vm->main_thread == th) {
if (th->vm && th->vm->main_thread == th) {
RUBY_GC_INFO("main thread\n");
}
else {