ExtUtils::Typemaps::STL::Vector versions before 1.05 for Perl allocate a 32 GiB array on an empty list. The OUTPUT typemaps call av_extend( av, len-1 ). On an empty list, this undeflows, and av_extend will allocate an array with 2^32 slots, leading to memory exhaustion.
https://rt.cpan.org/Public/Bug/Display.html?id=91213
https://metacpan.org/release/SMUELLER/ExtUtils-Typemaps-Default-1.05/changes