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

[perl #118693] No warning for undef'd variables returned from XS under -w

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
August 20, 2013 20:01
Subject:
[perl #118693] No warning for undef'd variables returned from XS under -w
Message ID:
rt-3.6.HEAD-1873-1377028879-1720.118693-15-0@perl.org
On Sat Jun 29 18:52:15 2013, sprout wrote:
> On Sat Jun 29 17:23:31 2013, public@khwilliamson.com wrote:
> > 
> > This is a bug report for perl from khw@karl.(none),
> > generated with the help of perlbug 1.39 running under perl 5.19.2.
> > 
> > 
> > -----------------------------------------------------------------
> > This is fallout from
> > https://rt.perl.org/rt3/Ticket/Display.html?id=115808
> > 
> > Uupon error POSIX::setlocale is setting RETVAL to NULL.  According to
> > Leon Timmermans, the char* return should typemap that to undef, but
> > the
> > ticket indicates no undef warning is generated:
> > 
> > $ perl -wle 'use POSIX; print setlocale LC_ALL, "mtfnpy"'
> > 
> > If I change the setlocale code to instead do an XSRETURN_UNDEF, the
> > warning gets generated.
> > 
> > Leon did some digging and says that 91bba347 suppresses the warnings
> > for
> > PADTMP SVs
> 
> This is similar to the exception for read-only variables that I recently
> removed from sv_force_normal.  It was hiding several bugs.

Just like it in fact.  a1afd104, 1e21d011c and 25451ceff (the last one
just pushed) fix bugs resulting from this.

> I wonder whether we cannot remove the undef PADTMP exception.  It would
> just make everything a little more sane.

I yanked that exception in 4f62cd62ae.

-- 

Father Chrysostomos


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

Thread Previous | Thread Next


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