Update tisean.yaml by lostbard · Pull Request #543 · gnu-octave/packages
I'm also able to reproduce the crash.
The top of the backtrace looks like this:
(gdb) bt
#0 0x00007ffc74c82745 in mneigh (nmax=<optimized out>, mmax=<optimized out>, nxx=<optimized out>, y=...,
n=-103295133, nlast=1000, id=1, m=9, jh=..., jpntr=..., eps=0.354788046951234, nlist=..., nfound=0)
at source_f/neigh.f:165
#1 0x00007ffc74c8191e in d1 (nmax=1000, mmax=2, nxx=1000, y=..., id=1, m=9, ncmin=100, pr=0, pln=-6.4799584020685925,
eln=-44.052167321973606, nmin=0, kmax=100, iverb=0) at source_f/d1.f:103
#2 0x00007ffc74c86be9 in F__c1__ (args=..., nargout=<optimized out>) at __c1__.cc:121
#3 0x00007ffc84080083 in liboctinterp-13!_ZN6octave14tree_evaluator24execute_builtin_functionER14octave_builtiniRK17octave_value_list () from C:\PROGRA~1\GNUOCT~1\OCF8BC~1.0\mingw64\bin\liboctinterp-13.dll
#4 0x00007ffc83f2cb03 in liboctinterp-13!_ZN14octave_builtin7executeERN6octave14tree_evaluatorEiRK17octave_value_list
() from C:\PROGRA~1\GNUOCT~1\OCF8BC~1.0\mingw64\bin\liboctinterp-13.dll
#5 0x00007ffc83f74eb0 in liboctinterp-13!_ZN15octave_function4callERN6octave14tree_evaluatorEiRK17octave_value_list ()
from C:\PROGRA~1\GNUOCT~1\OCF8BC~1.0\mingw64\bin\liboctinterp-13.dll
#6 0x00007ffc840a3572 in liboctinterp-13!_ZN6octave21tree_index_expression10evaluate_nERNS_14tree_evaluatorEi ()
from C:\PROGRA~1\GNUOCT~1\OCF8BC~1.0\mingw64\bin\liboctinterp-13.dll
#7 0x00007ffc847068aa in liboctinterp-13!_ZN6octave21tree_index_expression8evaluateERNS_14tree_evaluatorEi ()
from C:\PROGRA~1\GNUOCT~1\OCF8BC~1.0\mingw64\bin\liboctinterp-13.dll
#8 0x00007ffc8405a11f in liboctinterp-13!_ZN6octave22tree_simple_assignment8evaluateERNS_14tree_evaluatorEi ()
from C:\PROGRA~1\GNUOCT~1\OCF8BC~1.0\mingw64\bin\liboctinterp-13.dll
#9 0x00007ffc8408ee16 in liboctinterp-13!_ZN6octave14tree_evaluator15visit_statementERNS_14tree_statementE ()
from C:\PROGRA~1\GNUOCT~1\OCF8BC~1.0\mingw64\bin\liboctinterp-13.dll
n has a suspicious value. It is negative and has a large magnitude. That is probably not intentional.
Looking at d1.f, there is a suspicious expression which probably misses parenthesis.
I don't know how to install a package from a checked out repository. So, I haven't tested that. But does the following change help?
diff --git a/src/source_f/d1.f b/src/source_f/d1.f --- a/src/source_f/d1.f +++ b/src/source_f/d1.f @@ -89,7 +89,7 @@ c computations do 10 i=1,nmax-(mt-1)*id 10 ju(i)=i+(mt-1)*id do 20 i=1,nmax-(mt-1)*id - iperm=min(int(rand(0.0)*nmax-(mt-1)*id)+1,nmax-(mt-1)*id) + iperm=min(int(rand(0)*(nmax-(mt-1)*id))+1,nmax-(mt-1)*id) ih=ju(i) ju(i)=ju(iperm) 20 ju(iperm)=ih
This also fixes the input argument type for the RAND intrinsic which according to its documentation should be called with an integer:
https://gcc.gnu.org/onlinedocs/gfortran/RAND.html
Since the existing code only randomly leads to negative indices iperm, this might not crash every time...