develooper Front page | perl.perl5.porters | Postings from November 2013

[perl #120547] [PATCH] remove almost unreachable NULL sv arg code from sv_2*n_flags

From:
Tony Cook via RT
Date:
November 28, 2013 04:20
Subject:
[perl #120547] [PATCH] remove almost unreachable NULL sv arg code from sv_2*n_flags
Message ID:
rt-4.0.18-32213-1385612402-1481.120547-15-0@perl.org
On Fri Nov 15 05:47:07 2013, bulk88 wrote:
> This is a bug report for perl from bulk88@hotmail.com,
> generated with the help of perlbug 1.39 running under perl 5.19.6.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> See attached patch. This will break (null segv) XS code that relies on
> the undocumented null-ok feature. perldelta entry added since this
> could
> in theory affect DarkPAN code. I didn't find any examples in the first
> couple pages using CPAN grep of anything but ppport.h type stuff using
> sv_2pv. "make test" passes with DEBUGGING and PERL_POISON for me. The
> code being removed was cargo culted from Perl 4.0 to 5.0 from STR api
> to
> SV api, and originates in 1.0. Core never uses the null branch. Its
> not
> sane for XS code that write their own sv flag checkers to use it
> either
> if SvFLAGS segved a couple instructions ago earlier in the caller func
> in typical XS/Perl C code. Since these 4 functions form the basics of
> all SV usage, slimming them is beneficial where possible. A very tiny,
> maybe noise, improvement is found in perlbench speed. There were no
> responses to null check removal idea in
> http://www.nntp.perl.org/group/perl.perl5.porters/2013/11/msg209687.html
> so this is the patch to do it.

Thanks, applied as 1061065f7a09399eefb50e9a035502621722bcc0.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=120547



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About