allocate_array: overflow checks Check if the array size calculation overflows using the OVERFLOW macros. This should be more correct and easier to reason about.