On Thu, 24 Oct 2019, Marcin Błażejowski wrote:
Hi,
simple script, which works on older gretl versions, crushes on current
git. GDB says:
my 2 € cents:
1) with the following change, the script runs ok
@@ -29,7 +29,9 @@
cnameset($ZM_ADF_res, "mpy mp05y mpx1y mpx2y")
scalar adf_lag_max = 4
scalar row = 1
- loop foreach i $ZM_ECM_list --quiet
+
+ list X = $ZM_ECM_list
+ loop foreach i X --quiet
adf adf_lag_max $i --c --test-down=BIC --quiet
$ZM_ADF_res[row, 1] = $pvalue
adf adf_lag_max $i --ct --test-down=BIC --quiet
2) Here's the output from valgrind:
==2862== Invalid write of size 4
==2862== at 0x4FF55AE: make_dollar_substitutions (monte_carlo.c:3035)
==2862== by 0x4FF91AA: loop_list_refresh (monte_carlo.c:1029)
==2862== by 0x4FF91AA: top_of_loop (monte_carlo.c:2948)
==2862== by 0x4FF91AA: gretl_loop_exec (monte_carlo.c:3585)
==2862== by 0x4FF876C: gretl_loop_exec (monte_carlo.c:3795)
==2862== by 0x10D500: cli_exec_line (gretlcli.c:1312)
==2862== by 0x10BB7B: main (gretlcli.c:778)
==2862== Address 0x0 is not stack'd, malloc'd or (recently) free'd
I'll try to have a go at this later today, if Allin doesn't fix it first,
which is more likely ;)
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------