http://qs1969.pair.com?node_id=1217469


in reply to Threaded 5.10.0 + ?PATTERN? = Modification of a read-only value attempted

Apparently, the patch you need to apply to fix this is 9cddf794fc5 (included in 5.10.1). (Update: Not really an answer to your "why" question, though, sorry.)

$ git checkout -f v5.10.0 $ git clean -dxf $ patchperl $ git show 9cddf794fc5 | git apply $ sh Configure -des -Dusethreads $ make # etc.

I'm not an expert on the internals, so don't ask me why :-/

$ Porting/bisect.pl -Dusethreads --target=miniperl --expect-fail \ --start=v5.10.0 --end=v5.26.0 -e 'eval q("x"=~?x?)' ... 9cddf794fc52f08a145668164b1e3c15c91a713f is the first bad commit commit 9cddf794fc52f08a145668164b1e3c15c91a713f Author: Nicholas Clark <nick@ccl4.org> Date: Sun Jan 6 13:35:38 2008 +0000 Clarify the intent of the code in Perl_op_clear. Under ithreads, a +void calling sv_ivset twice. As a side effect, eliminate PM_GETRE_SAFE and PM_SETRE_SAFE, as we're doing "safe" explicitly in Perl_op_cle +ar(). p4raw-id: //depot/perl@32867 :100644 100644 c07a1a790672e577a6fdbabb140ef2a93dd27038 569a15910691ee +2da5a6e75e70bad3e73c274cd6 M op.c :100644 100644 14b8e6ef246b958dae153c034d93ca1319af415f 264dd52ab8ebf0 +184c1d5a13743aaf2d2e9ab62e M op.h bisect run success $ git bisect reset $ cpanm Devel::PatchPerl $ git checkout -f v5.10.0 $ git clean -dxf $ patchperl $ sh Configure -des -Dusethreads $ make miniperl $ ./miniperl -e 'eval q( "x" =~ ?x? ) and print "OK!\n"' Modification of a read-only value attempted at -e line 1. $ git show 9cddf794fc5 | git apply $ make miniperl $ ./miniperl -e 'eval q( "x" =~ ?x? ) and print "OK!\n"' OK! $ git tag --contains 9cddf794fc5 ... perl-5.10.1 ...

A few minor updates.