On Wed, 2 Mar 2016, Pedro Bação wrote:
Hello,
I now detected the following problem. The script below runs in gretl
1.9.11, but will cause gretl 2016a to crash (I am using ubuntu 12.04, gretl
2016a is in a virtualbox).
We need to release 2016b soon. This is a problem in 2016a that was
fixed in git a few weeks ago; it stems from a bug in relatively new
code that was introduced to optimize the performance of loops in
functions. That code is now stabilized.
nulldata 10
function series f1(series z)
series s=1
loop i=1..1
s[1]=0
endloop
return s
end function
function scalar f2(matrix *my,matrix *ma)
series z=1
series f=f1(z)
return 1
end function
series y=0
matrix my=ones(10,1)
matrix par=1
scalar a=BFGSmax(par,f2(&my,&par))
series yy=0
series x=f1(y)
Oddly, if I add a line between the final two and that new line defines a
series (e.g. series yy=0), it will not crash. Additionally, if I comment
out s[1]=0 in f1 or comment out loop i=1..1 and the corresponding endloop,
it will also not crash.
Yes, I saw symptoms like that in my testing that led up to the bug
fix.
Allin Cottrell