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

* vm.c (Init_BareVM): check failure of malloc().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-08-01 12:30:25 +00:00
parent 143b3339e6
commit 893009f8b8
2 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,8 @@
Fri Aug 1 20:55:27 2008 NARUSE, Yui <naruse@ruby-lang.org>
Fri Aug 1 21:29:56 2008 Yusuke Endoh <mame@tsg.ne.jp>
* vm.c (Init_BareVM): check failure of malloc().
Fri Aug 1 20:55:27 2008 NARUSE, Yui <naruse@ruby-lang.org>
* enc/trans/japanese.c (to_SHIFT_JIS_EF_BF_offsets): add U+FFF3,
U+FFF4, U+FFF5.

4
vm.c
View file

@ -1851,6 +1851,10 @@ Init_BareVM(void)
/* VM bootstrap: phase 1 */
rb_vm_t * vm = malloc(sizeof(*vm));
rb_thread_t * th = malloc(sizeof(*th));
if (!vm || !th) {
fprintf(stderr, "[FATAL] failed to allocate memory\n");
exit(EXIT_FAILURE);
}
MEMZERO(th, rb_thread_t, 1);
rb_thread_set_current_raw(th);