develooper Front page | perl.perl5.porters | Postings from December 2017

Re: [perl #115814] open ${\$x} leaks

Thread Previous | Thread Next
Father Chrysostomos
December 11, 2017 16:26
Re: [perl #115814] open ${\$x} leaks
Message ID:

On Dec 11, 2017, at 3:54 AM, "Dave Mitchell via RT" <> wrote:

> On Sun, Dec 10, 2017 at 08:27:42PM -0800, Father Chrysostomos wrote:
>> Well this one is my fault.  It’s a good thing I added a test!  Fixed in d269f58.
> With v5.27.6-189-gd269f58, t/op/svleak.t is SEGVing on my system.
> Reducing it to just the final test,
>    leak 2,1,sub{XS::APItest::PerlIO_exportFILE(*STDIN,"");0},
>                                      'T_STDIO in default typemap';
> valgrind is giving me a whole bunch of:

Does the problem go away if you remove this line from APItest.xs:

#include "fakesdio.h"   /* Causes us to use PerlIO below */

Does the crash go away if you change

PerlIO_exportFILE(PerlIO *f, const char *mode)

in APItest.xs to

PerlIO_findFILE(PerlIO *f)

and change the test in svleak.t to:

leak 2,1,sub{XS::APItest::PerlIO_findFILE(*STDIN);0},
                                      'T_STDIO in default typemap';

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