[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used |
Date: |
Thu, 21 Nov 2019 13:38:32 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
Follow-up Comment #14, bug #57284 (project octave):
We can allocate an uniitialized array for plhs because normally it is used to
set values. But prhs is typically accessed. So if we allocate an
uninitialized array, we'd still end up with crashes. And if we set the
elements to nullptr, then we still have crashes because the functions like
mxGetScalar access their arguments without checking. My recollection is that
Matlab does the same but my understanding may be out of date. Someone could
check whether mxGetScalar (NULL) crashes current versions of Matlab or throws
some other kind of error.
My preference is to not attempt to fix this "problem" for either inputs or
outputs unless someone can find some documentation that says that Matlab
guarantees N output (or input) arguments will be allocated automatically, and
what they should be initialized to.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57284>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, (continued)
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Guillaume, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Guillaume, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Guillaume, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Rik, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Guillaume, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Rik, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Dmitri A. Sergatskov, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, John W. Eaton, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Rik, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Rik, 2019/11/21
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used,
John W. Eaton <=
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Guillaume, 2019/11/22
- [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used, Rik, 2019/11/22