[R-pkg-devel] Stack smashing detected (dynamically loaded Fortran).
On Sun, 6 Feb 2022 13:25:48 +0300
Ivan Krylov <krylov.r00t at gmail.com> wrote:
<SNIP>
d2f is declared to have dimensions (kstate,npar,npar) in derivf.f, but is only a real(kind=8) in its caller, getgl.f. Setting the correct dimensions in getgl.f seems to fix the crash.
Aaaarrrghhhh! Yes, that must be it. (And likewise with d2u, d2zeta, ...). I was trying to use derivf to handle settings in which I only wanted first derivatives as well as ones in which I wanted both first and second derivatives. And I buggered it up. As me high school mates used to tell me, if I had a brain, I'd be sitting on the floor playing with it! Thanks Ivan for your diligent, well organised and clever tracking down of the problem. I shall retain your email with the illustration of using "AddressSanitizer" etc., for future reference. Thanks again. I owe you, big-time! cheers, Rolf
Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276