bugGNU Octave - Bugs: bug #31056, regexpi gets stuck into infintite...

 
 

bug #31056: regexpi gets stuck into infintite loop?

Submitted by:  None
Submitted on:  Fri 17 Sep 2010 10:03:16 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Vlatko BecanovicOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.4
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

 Spam posted by an anonymous
Mon 20 Sep 2010 03:23:06 PM UTC, comment #6:

I checked in the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/2538d03489cc

John W. Eaton <jwe>
Project Administrator
Sat 18 Sep 2010 11:49:26 AM UTC, comment #5:

I have pcre 7.8-2 installed and I don't have this problem. So I imaagine that something changed in the behavior of PCRE between my version and yours.

Your fix seems fine to me. If idx points beyond the buffer at the end of the loop then yes we should break.

D.

David Bateman <dbateman>
Project Member
Sat 18 Sep 2010 12:43:52 AM UTC, comment #4:

I'm attaching a diff that appears to fix the problem for me. I'm not sure whether this is the right or best fix.

I'm also attaching a transcript of a gdb session showing a trace of the execution path without this change.

(file #21481, file #21482)

John W. Eaton <jwe>
Project Administrator
Fri 17 Sep 2010 08:52:12 PM UTC, comment #3:

I can duplicate the problem with the current sources. I have

octave> octave_config_info ("REGEX_LIBS")
ans = -L/usr/lib -lpcre

and

$ dpkg -l 'pcre'
...
ii libpcre3 8.02-1.1 Perl 5 Compatible Regular Expression Library
ii libpcre3-dev 8.02-1.1 Perl 5 Compatible Regular Expression Library
ii libpcrecpp0 8.02-1.1 Perl 5 Compatible Regular Expression Library

This is on a current Debian amd64 testing system.

John W. Eaton <jwe>
Project Administrator
Fri 17 Sep 2010 08:17:21 PM UTC, comment #2:

In particular what does

octave_config_info ("REGEX_LIBS")

give? You might not have pcre installed whereas I think Jaroslav probably does

D.

David Bateman <dbateman>
Project Member
Fri 17 Sep 2010 07:42:50 PM UTC, comment #1:

I can't reproduce this problem. I'm afraid you'll have to provide more info about your configuration.

Jaroslav Hajek <highegg>
Fri 17 Sep 2010 10:03:16 AM UTC, original submission:

The command regexpi() will not work with the filter '.*' instead it gets stuck:

regexpi('.svn','.*')

will freeze Octave. According to the Matlab standard its meaning is:

" Metacharacter Meaning
--------------- --------------------------------
. Any character

metacharacter or grouped subexpression may be matched:

Metacharacter Meaning
--------------- --------------------------------
* Match zero or more occurrences "

Thank you for your time and effort!

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21481:  diffs added by jwe (333B - application/octet-stream)
file #21482:  gdb-trace added by jwe (5KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by dbateman (Posted a comment)
  • -unavailable- added by highegg (Posted a comment)
  • -unavailable- added by None (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Sep 2010 03:23:06 PM UTCjweStatusWorks For Me=>Fixed
      Open/ClosedOpen=>Closed
    Sat 18 Sep 2010 12:43:52 AM UTCjweAttached File-=>Added diffs, #21481
      Attached File-=>Added gdb-trace, #21482
    Fri 17 Sep 2010 07:42:50 PM UTChigheggStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1