r76938 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76937‎ | r76938 | r76939 >
Date:02:32, 18 November 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Reverting r76928, causes segfault
Modified paths:
  • /trunk/phase3/includes/IP.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/IP.php
@@ -42,7 +42,7 @@
4343 '|' . // has no "::"
4444 RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){7}' .
4545 '|' . // contains one "::" in the middle (awkward regex for PCRE 4.0+ compatibility)
46 - RE_IPV6_WORD . '(?::(?P<abn>(?!(?P=abn)):(?P<iabn>))?' . RE_IPV6_WORD . '){1,6}(?P=iabn)' .
 46+ RE_IPV6_WORD . '(?::(?!(?P=abn))(?P<abn>:(?P<iabn>))?' . RE_IPV6_WORD . '){1,6}(?P=iabn)' .
4747 // NOTE: (?!(?P=abn)) fails iff "::" used twice; (?P=iabn) passes iff a "::" was found.
4848
4949 // Better regexp (PCRE 7.2+ only), allows intuitive regex concatenation

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76928(bug 25920) Moved forward ref to a nested ref to really get v6 regex to compi...aaron00:25, 18 November 2010

Comments

#Comment by Aaron Schulz (talk | contribs)   02:48, 18 November 2010

That worked in 6.6, 7.9. I'd be curious where the PCRE regression lies and the simplest repro.

#Comment by Reedy (talk | contribs)   03:02, 18 November 2010

I'll note for anyone else looking at this, it's in 8.02 on PHP 5.3.3

#Comment by Aaron Schulz (talk | contribs)   04:42, 18 November 2010

A bug has been filed against PCRE: http://bugs.exim.org/show_bug.cgi?id=1035

#Comment by Reedy (talk | contribs)   10:58, 18 November 2010

Logged bug 25986 locally

Status & tagging log