[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52118] randg: segfault with erroneous argumen
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #52118] randg: segfault with erroneous arguments |
Date: |
Tue, 26 Sep 2017 13:11:14 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #52118 (project octave):
Severity: 3 - Normal => 4 - Important
_______________________________________________________
Follow-up Comment #2:
There appears to be something wrong with the input validation for randg.
Interestingly, if you look at the various randXXX functions, they all call
do_rand to do the work. The prototype for do_rand is
do_rand (const octave_value_list& args, int nargin, const char *fcn,
const std::string& distribution, bool additional_arg = false)
Notice that additional_arg is usually false. The only functions which call
do_rand with this argument set to true are randg and randp. So I tried
randp (1, 1e6)
and this segfaults as well.
So it looks like the input additional_arg is the proximate cause, but it still
needs to be tracked down why it is causing a problem.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52118>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/