bugGNU Octave - Bugs: bug #33670, bug in strfind

 
 

bug #33670: bug in strfind

Submitted by:  Thomas Smed <thomassmed>
Submitted on:  Wed 29 Jun 2011 01:39:26 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Thomas SmedOpen/Closed: Closed
Release: 3.4.0Operating 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 14 Jul 2011 06:47:17 PM UTC, comment #1:

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/4e70c4e61c24). You will need to build from the source in the Mercurial repository in order to see the fix. Alternatively, use any other delimiter in the range 0-254 in your strings and patterns.

Rik <rik5>
Project Administrator
Wed 29 Jun 2011 01:39:26 PM UTC, original submission:

I use strfind to navigate in a file created by FORTRAN, the file contains a mix of charaters, float and integers (big endian is used).
I found this error which I could simplify down to:
octave:1> test_str=' PAR ';
octave:2> label='PAR ';
octave:3> strfind(test_str,label)
ans = 2
octave:4> test_str(end)=255;
octave:5> strfind(test_str,label)
Now octave freezes and a triple ctrl-C is all that can take me out of the deadlock.

Thus, when there is 255 in one byte, strfind collapses.

Another akward detail is that after I had been working a while
with something else in one session of octave, and wanted to demonstrate the error to a colleague, the error had disappeared.
I have however not been able to recreate how the make the error disappear. If you try the above lines directly when getting in to octave, the error will be present.

Thomas Smed <thomassmed>

 

(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 thomassmed (Submitted the item)
  • -unavailable- added by thomassmed (I used this email address for my first attempt to register, but something failed.)
  •  

    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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 Jul 2011 06:47:17 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 29 Jun 2011 01:39:26 PM UTCthomassmedCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1