[R] Stack smashing again, redux.

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Tue Apr 12 12:33:04 CEST 2022


В Tue, 12 Apr 2022 11:03:21 +1200
Rolf Turner <r.turner using auckland.ac.nz> пишет:

> The fact that d2f was not dimensioned in getgl was indeed the loony
> that I had not spotted.  I fixed that, and another couple of
> deficiencies that became apparent to me once the d2f deficiency was
> drawn to my attention, and the example ran, without any stack
> smashing.

Glad to be able to help!

> I would like to add that I tried your third method of applying
> AddressSanitizer, and it "worked", but yet it didn't work.  (This is
> the story of my life; things that work for everyone else do not work
> for me. :-( ) I have attached the output from running "scr" with
> AddressSanitizer enabled.  (*Before* making the necessary corrections
> to getgl.)

Maybe I'm just lucky to be able to run an unsupported configuration
like I did. What versions of compiler and kernel are you running? I
wasn't able to get ASan to work with R not compiled for it on an older
system (Debian 9), but my advice does seem to work on newer systems
(Debian 10, 11).

Compiling R from source with -fsanitize=address set in compiler options
or running R with ASan using Docker should have a higher likelihood of
working than my manual approach.

-- 
Best regards,
Ivan



More information about the R-help mailing list