develooper Front page | perl.perl5.porters | Postings from March 2021

Re: Perl 7: Fix string leaks?

Thread Previous | Thread Next
From:
Felipe Gasper
Date:
March 29, 2021 10:30
Subject:
Re: Perl 7: Fix string leaks?
Message ID:
578CE16D-50E7-4583-A750-82641D6FC4EC@felipegasper.com


> On Mar 28, 2021, at 8:24 PM, Dan Book <grinnz@gmail.com> wrote:
> 
> I would love if this was possible as the current behavior is certainly broken. However, it's also relied upon, and as you know, difficult to determine whether it's being relied upon incorrectly. So I cannot support this breakage, major version or not.
> 
> I can only see this being feasible via a feature flag, for the moment.

A feature flag/pragma would be reasonable for the built-ins. (NB: Sys::Binmode started as a pragma; I moved it to CPAN per suggestion.) It would be another “use strict”, of course: a non-default that everyone is supposed to use.

For the typemap, though, if breaking existing distributions is unacceptable then some versioned syntax would be needed; i.e., XS modules would have to opt-in to the fix.

Short of that, though, maybe xsubpp should warn if people use the default char * or const char * mappings.

All of the above can happen with Perl 5, of course.

-F
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