[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API |
Date: |
Fri, 11 Aug 2017 17:31:22 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #5, bug #51725 (project octave):
Question 1 :
Yes, it would probably be a good idea to check that we are not de-referencing
a nullptr. On the other hand, I don't think Matlab's interface has been very
good about input validation. The whole idea behind leaving the the Matlab
language for C or Fortran was too have maximum performance, and if you crashed
the program it was your own fault.
Given that the usage pattern is
1) Translate Matlab data to C data
2) Perform complex algorithm
3) Translate C data back to Matlab data
it seems that the mxDoSomething functions are only called twice per usage and
so adding a test for nullptr wouldn't slow things down much.
If you have access to Matlab it would be interesting to test and see if they
happily let you segfault.
Question 2:
True QA testing would test both the basic function, and then corner cases and
illegal input, etc. I just wanted to verify that I could actually fetch a
property value as the function is supposed to.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51725>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Piotr Held, 2017/08/10
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Piotr Held, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API,
Rik <=
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Piotr Held, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/12