From: Wolfgang (Blub) Bumiller Date: Sun, 19 Aug 2012 17:54:15 +0000 (+0200) Subject: functions which have no living values but store_return values may cause the allocator... X-Git-Tag: 0.1-rc1~149 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=14210a62ef7ff1529f93b5c050553049e1bedd4a;p=xonotic%2Fgmqcc.git functions which have no living values but store_return values may cause the allocator to be run with no allocations being made - in this case we shouldn't try accessing the empty array and simply exit the allocator --- diff --git a/ir.c b/ir.c index 158e207..0a6a8da 100644 --- a/ir.c +++ b/ir.c @@ -1894,6 +1894,10 @@ bool ir_function_allocate_locals(ir_function *self) } } + if (!alloc.sizes) { + goto cleanup; + } + /* Adjust slot positions based on sizes */ if (!function_allocator_positions_add(&alloc, 0)) goto error;