atom feed19 messages in org.perl.perl5-portersRe: [perl #72704] Buggy fputs(f,s) vs...
FromSent OnAttachments
kmx via RTMar 3, 2010 1:47 am 
Steve HayMar 4, 2010 8:40 am 
Dave MitchellMar 4, 2010 12:17 pm 
Steve HayMar 4, 2010 4:17 pm 
Jan DuboisMar 4, 2010 6:53 pm 
Jan DuboisMar 4, 2010 7:07 pm 
kmx via RTMar 4, 2010 11:15 pm 
Jan DuboisMar 5, 2010 12:26 am 
Steve HayMar 5, 2010 1:18 am 
Jan DuboisMar 5, 2010 12:50 pm 
kmxMar 5, 2010 11:52 pm 
Tim BunceMar 6, 2010 1:37 pm 
kmx via RTApr 11, 2010 2:35 am 
Jan Dubois via RTApr 21, 2010 11:55 pm 
kmx via RTApr 22, 2010 10:46 am 
kmx via RTMay 5, 2010 4:30 am 
Jan DuboisMay 5, 2010 12:26 pm 
Tim BunceMay 6, 2010 4:05 am 
Craig A. BerryMay 6, 2010 6:21 am 
Subject:Re: [perl #72704] Buggy fputs(f,s) vs. fputs(s,f) on Win32 (maybe not only)
From:Tim Bunce (Tim.@pobox.com)
Date:Mar 6, 2010 1:37:47 pm
List:org.perl.perl5-porters

Could this be the cause of this NYTProf failure on Windows? https://rt.cpan.org/Ticket/Display.html?id=55049

Tim.

On Fri, Mar 05, 2010 at 12:50:34PM -0800, Jan Dubois wrote:

Dne čt 04.bře.2010 22:09:09, kmxx napsal(a):

Hi,

firts of all thaks for your effort you have invested into this issue.

So please test and report back if this fixes the problem for Math::Pari on Windows!

I will do, however my build env is slighly disorganised at the moment so it will take approx. a week.

But I have prepared a small failing test example - see attached TestFputs-0.01.tar.gz (just do perl Makefile.Pl + make test). If anybody is able to test your patch earlier.

Yes, the patch fixes the issue exhibited by your test example.

Given the current code freeze this fix will have to wait until after the 5.12 release, unless someone wants to convince Jesse that this should be a blocker bug. I could see it either way, but given that this bug has been in Perl since at least 5.8.0 it is hard to argue that it should be *blocking* a Perl release.

So assuming it won't make it into 5.12 I plan to add the attached simple fix to ActivePerl, and I would suggest Strawberry does the same. It does not sanitize the macros to be internally consistent, but it fixes the bug in a backward compatible manner (as long as XS code doesn't call PerlSIO_fputs() directly).

Cheers, -Jan

--- iperlsys.h~ 2010-02-09 12:34:54.000000000 -0800 +++ iperlsys.h 2010-03-05 12:24:17.674828900 -0800 @@ -226,9 +226,9 @@ #define PerlSIO_get_ptr(f) \ (*PL_StdIO->pGetPtr)(PL_StdIO, (f)) #define PerlSIO_fputc(f,c) \ - (*PL_StdIO->pPutc)(PL_StdIO, (f),(c)) + (*PL_StdIO->pPutc)(PL_StdIO, (c),(f)) #define PerlSIO_fputs(f,s) \ - (*PL_StdIO->pPuts)(PL_StdIO, (f),(s)) + (*PL_StdIO->pPuts)(PL_StdIO, (s),(f)) #define PerlSIO_fflush(f) \ (*PL_StdIO->pFlush)(PL_StdIO, (f)) #define PerlSIO_fgets(s, n, fp) \