size overflow detected in function resource_size