The error paths are not tested and are mostly for NULL allocations so it makes more sense to use runtime asserts for now for simplicity's sake.