Skip to content
Prev 10050 / 12125 Next

[R-pkg-devel] Issue with flang-new (segfault from C stack overflow)

Hello Ivan & Tomas,

Thank you for your time and helpful suggestions!

The finer details of memory use and heap vs stack are still outside my 
comfort zone, but some trial and error shows that using an allocatable 
does indeed solve the issue. When using the largest value I expect users 
to use before running into Out Of Memory issues at other points in the 
code, I get

==3154== Warning: set address range perms: large range [0xd0ff3070, 
0x14834c470) (undefined)
==3154== Warning: set address range perms: large range [0x14834d040, 
0x1bf6a6440) (undefined)
==3154== Warning: set address range perms: large range [0x14834d028, 
0x1bf6a6458) (noaccess)

but no valgrind errors. So I'm happy with this fairly straightforward 
solution, thanks Ivan!
Will do; I suspect gfortran may have some trick to make it work somehow.
Since the original error was "segfault from C stack overflow" I was not 
convinced that this was a Fortran issue, but thanks for the suggestion - 
I will try to find those for future issues.
Good to know!
Thanks,

Jisca
On 18-12-2023 16:06, Tomas Kalibera wrote: