bugGNU Octave - Bugs: bug #46216, glob() oddities with a wildcard...

 
 

bug #46216: glob() oddities with a wildcard following two or more characters

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Thu 15 Oct 2015 08:27:38 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: John W. Eaton <jwe>
Originator Name: Philip NienhuisOpen/Closed: Closed
Release: devOperating System: Any

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)

Wed 25 Nov 2015 04:49:29 PM UTC, comment #9:

Fixed in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/c5e8863858b4). The problem was that the code had not been updated to use the new xall_strings() function that works with the new exception handling mechanism for errors in the core. Closing report.

Rik <rik5>
Project Administrator
Wed 25 Nov 2015 12:16:10 PM UTC, comment #8:

The problem with glob breaks installing forge packages for me.

only returns "__bilateral__.oct" on my system. This causes a problem in scripts/miscellaneous/copyfile.m:83

where not all .oct files are copied to the destination directory. I wonder why no one else sses this problem when trying to install forge packages with oct files.

Andreas Weber <andy1978>
Project Member
Wed 28 Oct 2015 05:20:45 PM UTC, comment #7:

see bug bug #46293 also

Doug Stewart <dastew>
Wed 21 Oct 2015 10:04:30 PM UTC, comment #6:

Both bugs are due to the switchover to exceptions for error handling. Per comment #2, jwe is trying to get a list/summary of all breakages related to this so we can figure out how to handle each case.

Rik <rik5>
Project Administrator
Wed 21 Oct 2015 09:30:11 PM UTC, comment #5:

@Olaf:
The relation with bug #46251 is not clear to me, sorry.

Philip Nienhuis <philipnienhuis>
Project Member
Mon 19 Oct 2015 06:29:07 PM UTC, comment #4:

As noted by Rik, see also:
<http://savannah.gnu.org/bugs/?46251>

Olaf Till <i7tiol>
Project Member
Sat 17 Oct 2015 10:04:49 PM UTC, comment #3:

Like Jordi says, the development branch is the one place where breakage is to be expected to some extent :-)

Philip Nienhuis <philipnienhuis>
Project Member
Sat 17 Oct 2015 04:00:37 PM UTC, comment #2:

Sorry about that breakage.

There are a few other sticky issues that have turned up with the exception handling changes and I'm not sure yet how to handle all of them. I'll try to put together a summary soon so we can decide how to handle them (or, worst case, just revert the exception handling change, but I really really really don't want to do that).

John W. Eaton <jwe>
Project AdministratorIn charge of this item.
Sat 17 Oct 2015 04:03:07 AM UTC, comment #1:

Confirmed. In version 4.0.0 the patterns work as expected, but not with a recent development tip.

The problem seems to be that the all_strings() function has changed. If you look at the glob function in dirfns.cc one of the first actions is

Using the glob pattern

I find that the resulting entries in the string_vector (using gdb) are

As you can see, it is as if the code called char (glob_ptn) and formed a char matrix. The first pattern is shorter than the second so it is extended with a space character. Of course, that is not right.

I think this is connected with jwe's change to exception processing. Using gdb I find the following backtrace

The thing to note is that pad is true. This is because the call in Fglob, as stated earlier, now contains an error message to be printed if the conversion fails.

There is no prototype in ov.h of an all_strings() function which takes a string argument in and outputs a string_vector. The closest matching function is one that takes in a boolean value pad. So the compiler seems to take the error message which is set as boolean true.

If I restore line 565 to

then the glob patterns work.

I'm adding jwe to the CC list for this report.

Rik <rik5>
Project Administrator
Thu 15 Oct 2015 08:27:38 PM UTC, original submission:

Steps to reproduce:

on Linux in the Octave build tree invoking "./run-octave &" is easiest:

It shows that subdir "doc" is only found if all file patterns comprise just one leading letter followed by a wildcard.
If any of the patterns consists of two or more leading letters followed by a wildcard glob() fails to find "doc".
I haven't been able to assess further systematics here.

I'm sure this was working fine some weeks ago (I mean: pkg rebuild -auto <list_of_packages>" worked fine, implying glob() must have worked fine in turn then), hence a regression.

FYI my systems:
Windows 7 prof 64-bit
Mageia-5 Linux 64 bit (build system also for mxe-octave)

[philip@deskprn dev]$ hg -v summary
parent: 20629:ab705b42cfd8 tip
build: Fix compilation error when building with --without-qrupdate

Background:
I hit this while trying to run "pkg rebuild -auto <list_of_package_names>" in a freshly insatlled MXE cross-build on Windows; I found that consistently only one of the packages in the list was actually set to autoload.
Debugging pkg.m it turns out that in rebuild.m, on L.38, the following call fails:

because glob() fails.

Philip Nienhuis <philipnienhuis>
Project Member

 

(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

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by dastew (Posted a comment)
  • -unavailable- added by i7tiol (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by philipnienhuis (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
    Wed 25 Nov 2015 04:54:26 PM UTCmtmillerDependencies-=>bugs #46230 is dependent
    Wed 25 Nov 2015 04:49:29 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sat 17 Oct 2015 04:03:07 AM UTCrik5StatusNone=>Confirmed
      Assigned toNone=>jwe

    Back to the top


    Powered by Savane 3.1-cleanup1