bugGNU Octave - Bugs: bug #34861, user defined function does not...

 
 

bug #34861: user defined function does not reload automatically

Submitted by:  Matyas Sustik <sustik>
Submitted on:  Sat 19 Nov 2011 02:22:53 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Matyas SustikOpen/Closed: Closed
Release: devOperating System: GNU/Linux

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 27 Feb 2013 08:58:51 PM UTC, comment #9:

Thanks. I merged in your patch:

http://hg.savannah.gnu.org/hgweb/octave/graph/8f1f8a5cdc96

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Wed 27 Feb 2013 07:36:40 PM UTC, comment #8:

At Jordi's suggestion I attached patch that removes the class octave_mex_file_list.

(file #27539)

Janne Olavi Paanajärvi <jpaanaja>
Tue 26 Feb 2013 10:04:07 AM UTC, comment #7:

I added an alternate fix that extends octave_mex_file_list and
uses it instead of octave_shlib_list.

Janne Olavi Paanajärvi <jpaanaja>
Fri 22 Feb 2013 06:10:11 PM UTC, comment #6:

Yeah, I wondered about the need of octave_mex_file_list, but I opted for minimal fix. You can't move to completely using octave_mex_file_list here because you need the octave_shlib_list::find_file.

Janne Olavi Paanajärvi <jpaanaja>
Fri 22 Feb 2013 04:33:41 PM UTC, comment #5:

jwe seems to be in a pruning mode for dead code. Perhaps we should bring the potential duplicate of octave_shlib_list, octave_mex_file_list up on the Octave Maintainers list and see if we can't eliminate octave_mex_file_list.

Rik <rik5>
Project Administrator
Fri 22 Feb 2013 04:10:37 PM UTC, comment #4:

I was about to apply your fix, but then I realised that this basically invalidates the need for octave_mex_list completely, since you removed the only two places where this is used. Wouldn't it make more sense to change the octave_shlib_list::append call to octave_mex_file_list::append instead?

Alternatively, perhaps there is no need to keep two separate lists of shlibs at all, so perhaps it does make sense to completely get rid of the octave_mex_file_list singleton.

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Fri 22 Feb 2013 03:34:12 PM UTC, comment #3:

Would it be too troubling to amend your commit message to follow our guidelines? First line should be short, and you should say which files and functions you patched and how.

http://wiki.octave.org/Commit_message_guidelines

With a recent enough Mercurial, you can do the following to amend it:

and show us the revised patch.

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Fri 22 Feb 2013 03:13:26 PM UTC, comment #2:

I attached a patch that fixes the issue for me. The problem was that on reload previous mex function was not properly cleared due to it being appended both to octave_shlib_list and octave_mex_file_list. I cannot see the reason for using octave_mex_file_list here. Removing its use fixes the bug.

(file #27499)

Janne Olavi Paanajärvi <jpaanaja>
Sat 19 Nov 2011 06:15:17 PM UTC, comment #1:

It looks like the web interface ate part of your post. I'm copying it here:

Small favour, can you please attach myhello.c so we can have a complete example of the problem?

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Sat 19 Nov 2011 02:22:53 AM UTC, original submission:

If a user function or oct/mex file changes, then it is not properly
reloaded by octave. In version 3.2.3 (debian testing is what I am using) a recompile of the mex file causes a segfault on subsequent invocation.

According to John W. Eaton, the current development version does not segfault, but still does not behave properly:

Matyas Sustik <sustik>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #27539:  mexfix4.diff added by jpaanaja (3KiB - text/x-patch)
file #27532:  mexfix3.diff added by jpaanaja (3KiB - text/x-patch - Alternate fix)
file #27501:  mexfix2.diff added by jpaanaja (1KiB - text/x-patch - revised commit message)
file #27499:  mexfix.diff added by jpaanaja (974B - text/x-patch)
file #24399:  myhello.C added by sustik (162B - text/x-c++src)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by jpaanaja (Updated the item)
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by sustik (Submitted the item)
  • -unavailable- added by sustik
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 11 Jul 2013 01:09:17 PM UTCjordighDependencies-=>bugs #39461 is dependent
    Wed 27 Feb 2013 08:58:51 PM UTCjordighStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Wed 27 Feb 2013 07:36:40 PM UTCjpaanajaAttached File-=>Added mexfix4.diff, #27539
    Tue 26 Feb 2013 10:02:19 AM UTCjpaanajaAttached File-=>Added mexfix3.diff, #27532
    Fri 22 Feb 2013 03:54:35 PM UTCjpaanajaAttached File-=>Added mexfix2.diff, #27501
    Fri 22 Feb 2013 03:34:12 PM UTCjordighStatusConfirmed=>Patch Submitted
    Fri 22 Feb 2013 03:13:26 PM UTCjpaanajaAttached File-=>Added mexfix.diff, #27499
    Mon 27 Feb 2012 05:58:00 AM UTCrik5Item GroupSegfault, Bus Error, etc.=>Incorrect Result
      StatusNone=>Confirmed
      Release3.2.3=>dev
    Sat 19 Nov 2011 09:56:00 PM UTCsustikAttached File-=>Added myhello.C, #24399
    Sat 19 Nov 2011 02:22:53 AM UTCsustikCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1