1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm.c (thread_free): free altstack to prevent memory leak. a patch

from Tomoyuki Chikanaga in [ruby-dev:41815]. [Bug #3537]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2010-07-05 15:57:20 +00:00
parent 0fa3c65b66
commit 68ab3ede30
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Tue Jul 6 00:34:50 2010 Yusuke Endoh <mame@tsg.ne.jp>
* vm.c (thread_free): free altstack to prevent memory leak. a patch
from Tomoyuki Chikanaga in [ruby-dev:41815]. [Bug #3537]
Tue Jul 6 00:29:27 2010 Yusuke Endoh <mame@tsg.ne.jp>
* string.c (NONASCII_MASK): NONASCII_MASK must be unsigned.

5
vm.c
View file

@ -1726,6 +1726,11 @@ thread_free(void *ptr)
RUBY_GC_INFO("main thread\n");
}
else {
#ifdef USE_SIGALTSTACK
if (th->altstack) {
free(th->altstack);
}
#endif
ruby_xfree(ptr);
}
}