bugGNU Octave - Bugs: bug #34101, regexp 'match' problem with empty...

 
 

bug #34101: regexp 'match' problem with empty string

Submitted by:  Mikael <mandolin>
Submitted on:  Tue 23 Aug 2011 07:21:54 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.4.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 27 Oct 2011 04:16:46 PM UTC, comment #2:

I believe I've fixed the problem with null patterns in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/c4b6ea833fa5). You will need to build from development sources or wait until the 3.6 release scheduled for December 2011 to see the change.

Rik <rik5>
Project Administrator
Sat 03 Sep 2011 04:23:02 AM UTC, comment #1:

There is something wrong with the handling of empty patterns in regexp. I have not determined whether it is with Octave or with the PCRE libraries themselves.

Here is a simple test case which puts Octave into an infinite loop that one must use Ctrl-C to abort from.

Perl itself correctly matches a null pattern at every opportunity which means every single character as this command line example demonstrates.

Rik <rik5>
Project Administrator
Tue 23 Aug 2011 07:21:54 AM UTC, original submission:

Hello.

I have read of some similar errors in "bug #33258: regexprep with empty replacement gives an error (not sure what cases)". It gives the same error message anyway "internal error calling pcre_exec; error code from pcre_exec is -24"

I'm not sure that if there is the same problem or a different one. In that case I'm sorry for spaming.

the code used is

string = 'this is a textstring with / to test to find it.';
stcomp = ['' '|' '/'];
regexp(string,stcomp,'match');

//Mandolin

Mikael <mandolin>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mandolin (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 27 Oct 2011 04:16:46 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Tue 20 Sep 2011 12:25:14 AM UTCrik5StatusNone=>Confirmed
    Sat 03 Sep 2011 04:23:02 AM UTCrik5Item GroupPerformance=>Segfault, Bus Error, etc.

    Back to the top


    Powered by Savane 3.1-cleanup1