diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-11 14:34:05 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-11 14:34:05 +0000 |
commit | 5cd84d247f4fc7c4aeb28d2b7a846f03337e6db7 (patch) | |
tree | 0f9abed0a38de3a8ffe8ef6084b12934cab1004a /mjit.c | |
parent | 3c1f1c33488f79a1c4cb95eb67d3f1832ab51078 (diff) | |
download | ruby-5cd84d247f4fc7c4aeb28d2b7a846f03337e6db7.tar.gz |
mjit_worker.c: handle calloc failure
Unlike ZALLOC, it's not automatically handled.
mjit.c: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -291,6 +291,11 @@ mjit_add_iseq_to_process(const rb_iseq_t *iseq) return; node = create_list_node(iseq->body->jit_unit); + if (node == NULL) { + mjit_warning("failed to allocate a node to be added to unit_queue"); + return; + } + CRITICAL_SECTION_START(3, "in add_iseq_to_process"); add_to_list(node, &unit_queue); if (active_units.length >= mjit_opts.max_cache_size) { |