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.
Upgrade to ExtUtils::Typemaps::Default version 1.07 or later. (Note that while this issue was fixed in version 1.05, a related issue was fixied in 1.07.)
Rebuild any modules that use ExtUtils::Typemaps::Default as part of their build process.