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

[perl #114878] Regular Expression matching in signal handler causes side-effects

From:
Mark Phillips via RT
Date:
September 25, 2012 07:57
Subject:
[perl #114878] Regular Expression matching in signal handler causes side-effects
Message ID:
rt-3.6.HEAD-11172-1348574567-960.114878-14-0@perl.org
Unfortunately simply backporting the fix from 5.17 chagelist
b93070ed2e35b0430327cc866a4fcf4042014513 breaks binary compatibility
with plugins.

In particular after re-compiling and installing the Fedora 17 perl RPM
(perl-5.14.2-212.fc17.src.rpm), the automake package started crashing.
The regression tests were all ok.

I have tweaked the back-port to maintain compatibility in three areas (I
am not sure which are important) and now it maintains compatibility and
works with other pre-compiled perl 5.14.2 packages.

The areas I tweaked were:-
1) Modified regcppush/regcppop to push/pop the same values as before the
patch (in particular to still push/pop PL_regoffs, even though it is no
longer used).

2) Modified regcppush/regcppop to have the same prototype as before the
patch, except to make the argument to regcppop non-const. The pop code
writes to both rex and the (unused) PL_* variables.

3) Left the deprecrated PL variables in re_save_state so that the
interpretor object is unchanged - I suspect this is the critical change.

4) The PL_regoffs/PL_reglastparen/PL_reglastcloseparen variables are now
only used by regcppush. I have modified everywere regcppush is called to
set them correctly before regcppush...

I have attached the working patch which appears to pass regression
testing and allows a pre-compiled automake to work when using other
pre-compiled 5.14.2 libs.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About