• Sébastien Villemot's avatar
    Fix an invalid memory access in k_order_perturbation DLL. · 050b495a
    Sébastien Villemot authored
    In the case where a 2nd/3rd derivative is symbolically not zero but numerically
    zero at the evaluation point, the last lines of the g2/g3 matrices (in
    KordpDynare::calcDerivativesAtSteady()) where uninitialized (these matrices
    store the sparse hessian/3rd-deriv in coordinate list form, i.e. with 3 columns
    and as many rows as non-zero elements). When reconstructing the dense
    hessian/3rd-deriv matrix out of g2/g3, this would result in invalid memory
    accesses.
    050b495a
k_ord_dynare.cc 12.1 KB