When compiled with Perl Version 5.8.8 eperl coredumps when used as a CGI handler. Fix: In "eperl_perl5.h" the function "fwrite" is redefined iby a macro to use "PerlIO_write". "FILE *" parameter (fwrite) ist used as "PerlIO *" parameter (PerlIO_write). This does not work. It may have worked with older Perl versions. Using the original fwrite works with Perl 5.8.8 (tested) and schould work with older Versions of Perl (not tested). patch follows How-To-Repeat: Build and Install Perl Version 5.8.8 from ports Build and install ePerl from ports do the following echo '<? print "hello"; !>' >test.epl eperl -mc test.epl
On Wed, Mar 01, 2006 at 03:24:03PM +0100, Matthias Meyser wrote: > In "eperl_perl5.h" the function "fwrite" is redefined iby a macro to use "PerlIO_write". > "FILE *" parameter (fwrite) ist used as "PerlIO *" parameter (PerlIO_write). > This does not work. It may have worked with older Perl versions. > > Using the original fwrite works with Perl 5.8.8 (tested) and schould work with older > Versions of Perl (not tested). I am not sure that using the stdio's fwrite is safe, when the rest of embedded perl (any perl code, basically) is using PerlIO. There might be some interesting effects with regard to buffering. \Anton. -- An undefined problem has an infinite number of solutions. -- Robert A. Humphrey
On Wed, Mar 01, 2006 at 05:05:33PM +0100, Anton Berezin wrote: > On Wed, Mar 01, 2006 at 03:24:03PM +0100, Matthias Meyser wrote: > > > In "eperl_perl5.h" the function "fwrite" is redefined iby a macro to use "PerlIO_write". > > "FILE *" parameter (fwrite) ist used as "PerlIO *" parameter (PerlIO_write). > > This does not work. It may have worked with older Perl versions. > > > > Using the original fwrite works with Perl 5.8.8 (tested) and schould work with older > > Versions of Perl (not tested). > > I am not sure that using the stdio's fwrite is safe, when the rest of > embedded perl (any perl code, basically) is using PerlIO. There might > be some interesting effects with regard to buffering. Thats right. But the whole thing uses stdio and only the fwrite function ist redefined to use PerlIO. Using stdio handles in PerlIO is definitivly broken. I agree that this fix may cause problems in other places. (threading) But its less "worse" than the original code and makes eperl work again. :) Best thing would be to rewrite the code to use PerlIO in all places. CU matthias -- Matthias Meyser | XeNET Gesellschaft fuer Informations- und Telefon: +49-5323-94018 | Kommunikationssysteme mbH Fax: +49-5323-94014 | Burgstaetter Strasse 6 Email: Meyser@xenet.de | 38678 Clausthal-Zellerfeld
State Changed From-To: open->closed The fix has been committed. Thank you for your submission.