octave-bug-tracker
[Top][All Lists]
Advanced

[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: Rik
Subject: [Octave-bug-tracker] [bug #57284] Crash in MEX file when outputs are not used
Date: Thu, 21 Nov 2019 11:54:53 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #9, bug #57284 (project octave):

23 is a very odd number.  I don't see a reason to mimic that number exactly. 
*If* we want to make a change I think we should either A) use an absolute
number than encompasses 95% of programming cases or B) use a number relative
to the number of outputs.

If we use solution A, my guess is that 95% of all functions have less than 4
outputs and therefore that would be a good constant to use.  This could be
checked by some clever grepping of the function declarations in the scripts/
directory of Octave to find out what a measured sample for Octave functions
is.

If we use solution B, I think the value should be nlhs + 2.  Getting loop
counters wrong by 1 is a very common programming error so it should at least
be nlhs + 1.  I would throw in the extra pointer because 8 bytes is cheap.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57284>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]