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

[perl #119897] glob in threads is broken in perl5.18

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
September 21, 2013 13:56
Subject:
[perl #119897] glob in threads is broken in perl5.18
Message ID:
rt-3.6.HEAD-1873-1379771773-1903.119897-15-0@perl.org
On Fri Sep 20 23:45:43 2013, Hugmeir wrote:
> On Sat, Sep 21, 2013 at 12:19 AM, Father Chrysostomos via RT <
> perlbug-followup@perl.org> wrote:
> 
> > On Fri Sep 20 18:05:44 2013, Hugmeir wrote:
> > > meanwhile, the paradigm in the few CPAN modules that do this[*] is
> "grab
> > > the interpreter during BOOT, use that to construct a fake
> > CLONE_PARAMS, and
> > > then replace the interpreter with aTHX after MY_CXT_CLONE"
> > > Which, on top of the previous patch, becomes this:
> >
> > It has often bothered me that a CLONE method in pure Perl can’t
> really
> > access both interpreters.  I have known about CLONE for a long time,
> but
> > had never actually seen it used (or bothered looking).
> >
> > If what you have below works, and works reliably (it looks fine to
> me),
> > I say go for it.
> >
> 
> I wasn't sure if the new tests would work on VMS -- most of the other
> glob
> test files have special cases for it -- so I've pushed this as
> smoke-me/hugmeir/dup_glob_state

Your test assumes that the output will be sorted, but does not even use
File::Glob on VMS.  I don’t know whether the default glob on VMS
produces sorted output, and whether you need to sort it.  Alternatively,
just ‘use File::Glob "glob"’ explicitly, and bypass the globhook
mechanism (which VMS ignores) altogether.

Concerning your earlier Test::More comment and my response, I don’t
think we actually need to load threads before Test::More if all the
tests will be coming from one thread.

> 
> 
> >
> > Is it possible to write this in a way that is binary-compatible (for
> > 5.16 and 5.18)?  I believe the fact that the struct below is not
> public
> > makes it safe to change it like that.
> >
> 
> This I do not know.
> (I can't find a definition of binary (in)?compatibility perlpolicy or
> other
> pods)

As long as XS extensions compiled with 5.18.[10] continue to work with
5.18.2, we preserve binary compatibility.  With File::Glob, I don’t
think we actually have anything to worry about.  I just brought it up
because I want to backport the change.

BTW, we should probably add a new API to perl for registering clone
handlers.

-- 

Father Chrysostomos


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

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