Closed hdarjus closed 3 years ago
Mistake was in https://github.com/mboeck11/BGVAR/commit/43a8b0368456f55a1cb8562c7dfffd797abe563e in src/BVAR_linear.cpp about the changes in variable Sv_para and pars_store and in particular in line 451. Sv_para has 4 rows but receives an arma vector of length 3. Therefore its 4th element is uninitialized in all columns.
With this change, the example that failed on CRAN passes valgrind checks on my computer. The test is
library(BGVAR) set.seed(1) data(eerDatasmall) model.eer<-bgvar(Data=eerDatasmall,W=W.trade0012.small,draws=50,burnin=50,plag=1,eigen=TRUE)
and the command for running R was
R
R --debugger=valgrind --debugger-args='--track-origins=yes --leak-check=full --show-reachable=yes' --no-save --no-restore
after building and installing BGVAR with debug flags.
BGVAR
Mistake was in https://github.com/mboeck11/BGVAR/commit/43a8b0368456f55a1cb8562c7dfffd797abe563e in src/BVAR_linear.cpp about the changes in variable Sv_para and pars_store and in particular in line 451. Sv_para has 4 rows but receives an arma vector of length 3. Therefore its 4th element is uninitialized in all columns.
With this change, the example that failed on CRAN passes valgrind checks on my computer. The test is
and the command for running
R
wasafter building and installing
BGVAR
with debug flags.