[Rd] Advice on ASAN for gap 1.9
Benjamin Schwendinger
benj@m|n@chwe @end|ng |rom gm@||@com
Tue Feb 17 23:27:36 CET 2026
Dear Jing,
you currently have multiple issues.
1st) problem is not directly on your side but lies within ragg as the ASAN
error correctly pointed out.
Essentially, ragg/src/./agg/include/agg_font_cache_manager.h:176:21.
On the corresponding line we see
std::memcpy(m_fonts, m_fonts + 1, (m_max_fonts - 1) * sizeof(font_cache*));
Hence, we copy from m_fonts+1 to m_fonts with possible multiple bytes,
which is UB. Simplest solution would be to drop `dev = "ragg_png"` from
your vignette (as you supposedly also have figured out).
2) You are calling V8 which does not play nicely with the much larger stack
frames under ASAN/UBSAN. I would recommend precomputing these outputs.
For reproducing errors regarding ASAN and UBSAN I can fully recommend the
rocker containers (rocker/r-devel-san and rocker/r-devel-ubsan-clang) from
https://rocker-project.org/images/base/r-devel.html
Best regards,
Ben
Am Di., 17. Feb. 2026 um 20:06 Uhr schrieb jinghua zhao <
jinghuazhao using hotmail.com>:
> Dear R developers,
>
> I am seeking advice regarding some issues of my package from CRAN check. I
> have made attempts to identify sources of the errors via customized
> clang/gcc which may not always yield the same errors. I also tried
> ~/.valgrindrc and --use-valgrind which would say OK but I suspect my
> ASAN-scheme is fully working. Brefly, the error tracking information can be
> seen from here,
>
> *
> CRAN checks, https://cran.r-project.org/web/checks/check_results_gap.html
> *
> Current attempt. https://cran.dev/gap
>
> For next steps, I wonder if
>
> *
> Anyone has a polished pipelines clang/gcc for Fedora 43 which is what I
> am using so as to reproduce errors / hints for any additional changes to be
> made, e.g., https://www.stats.ox.ac.uk/pub/bdr/Rconfig/
> *
> To convert the somewhat legacy C/Fortran codes in the package for more
> modern implementations.
>
> More importantly, any advices will be greatly appreciated.
>
> Best wishes,
>
> Jing Hua
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
[[alternative HTML version deleted]]
More information about the R-devel
mailing list