bugGNU Octave - Bugs: bug #48110, ishghandle silently ignores...

 
 

bug #48110: ishghandle silently ignores additional arguments

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Fri 03 Jun 2016 09:40:17 AM UTC  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 3 - LowItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/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.

 

Fri 03 Jun 2016 08:12:37 PM UTC, comment #3:

I modified your patch and pushed it here (http://hg.savannah.gnu.org/hgweb/octave/rev/7f633f680f68)

In particular, the patch initially failed the BIST test below that I wrote.

Thanks for providing a base changeset to work off. It made it quite quick work to close this bug report.

Rik <rik5>
Project Administrator
Fri 03 Jun 2016 04:00:53 PM UTC, comment #2:

Octave generally doesn't try very hard to match undocumented Matlab behavior. I've changed the Severity to 'Wish' and the Priority to 'Low'.

As for input validation, Octave is usually stricter than Matlab. I can see that one way would be to use varargin in this case and then pass all arguments to ishandle() which would then throw an error.

Rik <rik5>
Project Administrator
Fri 03 Jun 2016 09:46:01 AM UTC, comment #1:

See also:
http://undocumentedmatlab.com/blog/ishghandle-undocumented-input-parameter

(file #37372)

Markus Mützel <mmuetzel>
Project Member
Fri 03 Jun 2016 09:40:17 AM UTC, original submission:

The function ishghandle in Matlab accepts the graphics object type as an additional un-documented argument.

While the above returns true and false in Matlab, the result is true for both in Octave.

I'll send a patch that fixes this compatibility issue as soon as I have a bug number.

BTW: In Matlab, functions (without varargin) being called with more arguments than expected fail automatically. Octave silently ignores these additional arguments. Is this difference intentional?

Markus Mützel <mmuetzel>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #37372:  ishghandle_type.patch added by mmuetzel (4KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mmuetzel (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 Jun 2016 08:12:37 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Fri 03 Jun 2016 06:09:35 PM UTCmtmillerStatusConfirmed=>Patch Submitted
    Fri 03 Jun 2016 04:00:53 PM UTCrik5Severity3 - Normal=>1 - Wish
      Priority5 - Normal=>3 - Low
      StatusNone=>Confirmed
    Fri 03 Jun 2016 09:46:01 AM UTCmmuetzelAttached File-=>Added ishghandle_type.patch, #37372

    Back to the top


    Powered by Savane 3.1-cleanup1