develooper Front page | perl.perl5.porters | Postings from May 2016

Re: [perl #128196] ExtUtils::MakeMaker::FAQ on splliting XS files

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
May 21, 2016 22:38
Subject:
Re: [perl #128196] ExtUtils::MakeMaker::FAQ on splliting XS files
Message ID:
CA+vYcVzcQeMsOryf8cT4rsswXGS07JwCwO5ryH8wW4KHuVFJuw@mail.gmail.com
On Fri, May 20, 2016 at 9:26 PM, James E Keenan via RT
<perlbug-followup@perl.org> wrote:
> On Fri May 20 11:43:04 2016, jeffreykegler wrote:
>> As of Perl 5.22.0, under the question "How do I make two or more XS
>> files coexist in the same directory?", ExtUtils::MakeMaker::FAQ has 2
>> suggestions.  My issue is with the 2nd of these, which describe an
>> approach that uses statements of the form "boot_Cool__Bar(aTHX_ cv);"
>> in the "BOOT:" section of the XS file.
>>
>> According to http://babkin-cep.blogspot.com/2012/10/splitting-xs-
>> modules-into-multiple-files.html this approach can crash the system if
>> used with 3 or more files.  Sergey's post is carefully argued, and his
>> description of the situation AFAICT correct.
>>
>> Possible fixes:
>>
>> 1.)  Delete the 2nd suggestion, leaving only the suggestion to split
>> the XS file into multiple directories.
>>
>> 2.)  Incorporate Sergey's fix into the FAQ
>>
>> Thanks, jeffrey kegler
>
> Could we get some of our more XS-fluent contributors to study the Babkin blog post and consider Jeffrey's suggestion?

I'm not that XS-fluent but the blog post sounds plausible.  Note that
the blog post only claims that the Perl stack can be corrupted and
says nothing about crashing the system, which does not sound plausible
unless the OS has serious bugs in its memory protection.

I'll also note that MakeMaker is maintained upstream.  The current
version of its FAQ is at
<https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/blob/master/lib/ExtUtils/MakeMaker/FAQ.pod>
and changes would need to go there first.  That said, it seems
reasonable to me to leave the ticket here open for just a bit to
elicit comment from those who know the details of the Perl stack and
the boot_XXX mechanism.

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