OBS User unknown 2008-02-25 16:35:30 +00:00 committed by Git OBS Bridge
parent 55f4ef95db
commit 5395bffe6d
3 changed files with 83 additions and 3 deletions

70
perl-5.10.0-regexp.diff Normal file
View File

@ -0,0 +1,70 @@
Change 33324 by demerphq@demerphq-gemini on 2008/02/17 15:39:22
Fix perlbug 50114 and document what the code does a bit better
Affected files ...
... //depot/perl/regcomp.c#650 edit
... //depot/perl/t/op/re_tests#129 edit
Differences ...
==== //depot/perl/regcomp.c#650 (text) ====
--- regcomp.c.orig
+++ regcomp.c
@@ -4462,7 +4462,17 @@
regnode *first= scan;
regnode *first_next= regnext(first);
- /* Skip introductions and multiplicators >= 1. */
+ /*
+ * Skip introductions and multiplicators >= 1
+ * so that we can extract the 'meat' of the pattern that must
+ * match in the large if() sequence following.
+ * NOTE that EXACT is NOT covered here, as it is normally
+ * picked up by the optimiser separately.
+ *
+ * This is unfortunate as the optimiser isnt handling lookahead
+ * properly currently.
+ *
+ */
while ((OP(first) == OPEN && (sawopen = 1)) ||
/* An OR of *one* alternative - should not happen now. */
(OP(first) == BRANCH && OP(first_next) != BRANCH) ||
@@ -4474,16 +4484,17 @@
(PL_regkind[OP(first)] == CURLY && ARG1(first) > 0) ||
(OP(first) == NOTHING && PL_regkind[OP(first_next)] != END ))
{
-
+ /*
+ * the only op that could be a regnode is PLUS, all the rest
+ * will be regnode_1 or regnode_2.
+ *
+ */
if (OP(first) == PLUS)
sawplus = 1;
else
first += regarglen[OP(first)];
- if (OP(first) == IFMATCH) {
- first = NEXTOPER(first);
- first += EXTRA_STEP_2ARGS;
- } else /* XXX possible optimisation for /(?=)/ */
- first = NEXTOPER(first);
+
+ first = NEXTOPER(first);
first_next= regnext(first);
}
==== //depot/perl/t/op/re_tests#129 (text) ====
--- t/op/re_tests.orig
+++ t/op/re_tests
@@ -1341,3 +1341,6 @@
.*\z foo\n y - -
^(?:(\d)x)?\d$ 1 y ${\(defined($1)?1:0)} 0
.*?(?:(\w)|(\w))x abx y $1-$2 b-
+
+0{50} 000000000000000000000000000000000000000000000000000 y - -
+

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 19 15:31:36 CET 2008 - mls@suse.de
- fix bug in regexp engine [bnc#355233]
-------------------------------------------------------------------
Fri Jan 18 15:29:06 CET 2008 - mls@suse.de

View File

@ -11,11 +11,12 @@
# norootforbuild
# icecream 0
Name: perl
Url: http://www.perl.org/
BuildRequires: db-devel gdbm-devel ncurses-devel zlib-devel
Version: 5.10.0
Release: 5
Release: 14
Summary: The Perl interpreter
License: Artistic License; GPL v2 or later
Group: Development/Languages/Perl
@ -34,6 +35,7 @@ Source: perl-%{version}.tar.bz2
Source1: %name-rpmlintrc
Patch: perl-%{version}.dif
Patch1: perl-gracefull-net-ftp.diff
Patch2: perl-5.10.0-regexp.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -82,6 +84,7 @@ Authors:
%setup -q -n perl-5.10.0
%patch
%patch1
%patch2
%build
options="-Doptimize='$RPM_OPT_FLAGS -Wall -pipe'"
@ -281,6 +284,8 @@ cat perl-base-filelist | sed -e 's/^/%exclude /g' > perl-base-excludes
#%ghost %doc /usr/share/man/man3/perllocal.3pm.gz
%changelog
* Tue Feb 19 2008 mls@suse.de
- fix bug in regexp engine [bnc#355233]
* Fri Jan 18 2008 mls@suse.de
- obsolete more packages
- fix bug in enc2xs [#354424]
@ -298,7 +303,7 @@ cat perl-base-filelist | sed -e 's/^/%exclude /g' > perl-base-excludes
- fix buffer overflow in regex engine CVE-2007-5116 (#332199)
* Wed Oct 31 2007 dmueller@suse.de
- update rpmlintrc
* Fri May 25 2007 ro@suse.de
* Sat May 26 2007 ro@suse.de
- added rpmlintrc: ignore some devel files in perl package
* Mon May 21 2007 rguenther@suse.de
- Include Config_heavy.pl in perl-base.
@ -520,7 +525,7 @@ cat perl-base-filelist | sed -e 's/^/%exclude /g' > perl-base-excludes
- Add license information and group tag (Bug #3454)
* Tue Jul 11 2000 ro@suse.de
- make perllocal.SuSE script more flexible
* Sat Apr 01 2000 bk@suse.de
* Sun Apr 02 2000 bk@suse.de
- some tests don't pass on s390 too, known.
* Fri Mar 03 2000 schwab@suse.de
- Add support for ia64.