[R-pkg-devel] clang-san issue with R vignettes using ggplot2

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Wed Oct 30 03:36:54 CET 2024


Can you tell us more about/point us to the code for the plots that are
triggering these errors? (eg, are you using unusual fonts or other
settings?)

On Tue, Oct 29, 2024, 10:22 PM Kaifeng Lu <kaifenglu using gmail.com> wrote:

> Dear friends,
>
> I received clang-san error messages for all vignettes that include ggplot2
> figures when submitting an R package to CRAN. Please see below for an
> example.
>
> How can I resolve this problem without replacing the ggplot2 figures with
> base R plots?
>
> Thank you in advance for your help.
>
> Regards,
> Kaifeng
>
> --- re-building ‘tsegest.Rmd’ using rmarkdown
>   ** Processing:
>
> /home/hornik/tmp/CRAN_special_clang-san/trtswitch.Rcheck/vign_test/trtswitch/vignettes/tsegest_files/figure-html/km-1.png
>   288x288 pixels, 8 bits/pixel, 256 colors in palette
>   Reducing image to 8 bits/pixel, grayscale
>   Input IDAT size = 4659 bytes
>   Input file size = 5517 bytes
>
>   Trying:
>     zc = 9  zm = 8  zs = 0  f = 0               IDAT size = 4256
>     zc = 9  zm = 8  zs = 1  f = 0               IDAT size = 4226
>     zc = 1  zm = 8  zs = 2  f = 0
>     zc = 9  zm = 8  zs = 3  f = 0
>     zc = 9  zm = 8  zs = 0  f = 5
>     zc = 9  zm = 8  zs = 1  f = 5
>     zc = 1  zm = 8  zs = 2  f = 5
>     zc = 9  zm = 8  zs = 3  f = 5
>
>   Selecting parameters:
>     zc = 9  zm = 8  zs = 1  f = 0               IDAT size = 4226
>
>   Output IDAT size = 4226 bytes (433 bytes decrease)
>   Output file size = 4304 bytes (1213 bytes = 21.99% decrease)
>
>   ** Processing:
>
> /home/hornik/tmp/CRAN_special_clang-san/trtswitch.Rcheck/vign_test/trtswitch/vignettes/tsegest_files/figure-html/Z(psi)-1.png
>   288x288 pixels, 8 bits/pixel, 256 colors in palette
>   Reducing image to 8 bits/pixel, grayscale
>   Input IDAT size = 5933 bytes
>   Input file size = 6791 bytes
>
>   Trying:
>     zc = 9  zm = 8  zs = 0  f = 0               IDAT size = 5349
>     zc = 9  zm = 8  zs = 1  f = 0
>     zc = 1  zm = 8  zs = 2  f = 0
>     zc = 9  zm = 8  zs = 3  f = 0
>     zc = 9  zm = 8  zs = 0  f = 5
>     zc = 9  zm = 8  zs = 1  f = 5
>     zc = 1  zm = 8  zs = 2  f = 5
>     zc = 9  zm = 8  zs = 3  f = 5
>
>   Selecting parameters:
>     zc = 9  zm = 8  zs = 0  f = 0               IDAT size = 5349
>
>   Output IDAT size = 5349 bytes (584 bytes decrease)
>   Output file size = 5427 bytes (1364 bytes = 20.09% decrease)
>
>   --- finished re-building ‘tsegest.Rmd’
>
>   +-+tsegest.html
>
>   =================================================================
>   ==1429888==ERROR: LeakSanitizer: detected memory leaks
>
>   Direct leak of 7680 byte(s) in 12 object(s) allocated from:
>       #0 0x55b3e7ff95d0 in realloc
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xc65d0) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbd7d28
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x24d28) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>   Direct leak of 6656 byte(s) in 26 object(s) allocated from:
>       #0 0x55b3e7ff91b3 in malloc
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xc61b3) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbd7c81
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x24c81) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>   Indirect leak of 25920 byte(s) in 810 object(s) allocated from:
>       #0 0x55b3e7ff91b3 in malloc
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xc61b3) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbc198f
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0xe98f) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>   Indirect leak of 11982 byte(s) in 994 object(s) allocated from:
>       #0 0x55b3e7fe0ebe in strdup
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xadebe) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbd74d7 in FcValueSave
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x244d7) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>   Indirect leak of 8768 byte(s) in 274 object(s) allocated from:
>       #0 0x55b3e7ff939d in calloc
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xc639d) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbd8450
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x25450) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>   Indirect leak of 5376 byte(s) in 168 object(s) allocated from:
>       #0 0x55b3e7ff939d in calloc
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xc639d) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbd7862
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x24862) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>   Indirect leak of 1152 byte(s) in 36 object(s) allocated from:
>       #0 0x55b3e7ff939d in calloc
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xc639d) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbd770f
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2470f) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>   Indirect leak of 384 byte(s) in 12 object(s) allocated from:
>       #0 0x55b3e7ff939d in calloc
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xc639d) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbd777f
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2477f) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>   Indirect leak of 288 byte(s) in 6 object(s) allocated from:
>       #0 0x55b3e7ff91b3 in malloc
> (/home/hornik/tmp/R-d-clang-xtra/bin/exec/R+0xc61b3) (BuildId:
> 71b7cc9351bcc02083f9df16c056d5fba06ed51c)
>       #1 0x7f61fcbd0d2f in FcLangSetCopy
> (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1dd2f) (BuildId:
> 4b26d8a18d92f6f97cf8eccd56f114fb89e44039)
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list