develooper Front page | perl.perl5.porters | Postings from January 2008

Re: This Week on perl5-porters - 20-26 January 2008

Thread Previous | Thread Next
Yitzchak Scott-Thoennes
January 31, 2008 15:58
Re: This Week on perl5-porters - 20-26 January 2008
Message ID:
On Thu, January 31, 2008 2:14 pm, David Landgren wrote:
> This Week on perl5-porters - 20-26 January 2008
> Floats to strings issue
> Jerry D. Hedden asked why "Configure" probes for alternatives to
> "sprintf" that produce identical behaviour to "sprint("%g")", and why
> not just use "sprintf" and be done with it. Andy Dougherty explained that
> some platforms, such as Solaris, have alternate functions available in the
> system C library that offer much better performance. In such cases,
> "Configure" favours them over "sprintf".
> only the best

I believe Jerry was suggesting making Configure *not* use sprintf
in cases where it tries other things and rejects them for seemingly
trivial (but actually important) reasons.

> panic: attempt to copy freed scalar (#50142)
> Johan Vromans posted the nth bug report concerning a problem with an
> explicit shift of @ARGV within a subroutine. Dave Mitchell explained that
> it was a long-standing bug due to the fact that items weren't reference
> counted on the stack, and that perl really ought to start doing the right
> thing.

Not quite; @ARGV was just an example; any array would do the same.  The
core bug is passing a scalar to a subroutine (putting it on the stack,
aka @_), then in the sub doing something to a variable outside the sub
that results in the scalar being freed, then trying to access the freed
scalar (which @_ doesn't know is freed).

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About