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

[perl #115910] New copy-on-write breaks CPAN

Father Chrysostomos via RT
December 19, 2012 13:55
[perl #115910] New copy-on-write breaks CPAN
Message ID:
On Wed Dec 19 05:13:09 2012, LeonT wrote:
> On Wed, Dec 19, 2012 at 7:19 AM, Andreas Koenig
> <> wrote:
> >> That isn't making any sense. I'd say either the bisect is wrong or the
> >> refactoring FC did is strangely broken, I suspect the former. Do you
> >> have a test report at hand? FC: can you take a look at this?
> >
> >
> >
> Thank you, that clarifies everything. I'm somewhat horrified I didn't
> have an explicit test for this, if it wasn't for Test::NoWarnings we
> wouldn't have noticed something was broken bad.
> My module makes the assumption that s/a/b/g does not reallocate the
> buffer that is substituted. It seems the COW logic on s/// breaks that
> assumption. This reallocation breaks writing to memory mappings in
> general (and probably other modules that own their own buffers too).

That logic probably needs to be revisited then.  Is the s/// target a
COW before the substitution?  (You don’t need to CC me.)


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