Subject: | malloc overrun on struct PerlIOEncode bigger in perl 5.10 |
Date: | Sat, 23 Aug 2008 08:36:36 +1000 |
To: | bug-perlio-locale [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
In the debian packaged perl 5.10.0 and my build of PerlIO::local 0.05
the test suite 03utf8out.t gets an error
*** glibc detected *** perl: free(): invalid next size (fast): 0x0928a640 ***
Electric fence on just
perl -e "binmode(STDIN,':locale')"
claims the store
e->inEncodeCall = 0;
in PerlIOEncode_pushed() has gone past the end of a malloced block.
I suspect the struct PerlIOEncode in locale.xs may be too small for the
inEncodeCall field, which seems to be new in perl 5.10 (or some such).
Perhaps it's possible to copy the PerlIO_encode funcs/sizes table at
runtime, or check what's made at compile-time is then ok when running.