At first glance, it seems to be happening when you call functions in
the adegenet package, specifically here:
https://github.com/thibautjombart/adegenet/blob/master/src/snpbin.c#L225
The CRAN checks for the adegenet package aren't showing a problem; my
guess is that your code is exercising part of the adegenet code base
that isn't covered in that package's own tests and examples ... I would
ask the 'adegenet' maintainer for help tracking and solving the problem ...
On 2025-02-02 5:56 p.m., Bernd.Gruber wrote:
Hi,
I was requested to update my package (dartR.base) that shows a note for an old
mac release and the errors below:
Additional issues<https://cran.r-project.org/web/checks/check_issue_kinds.html>
clang-ASAN<https://www.stats.ox.ac.uk/pub/bdr/memtests/clang-ASAN/dartR.base>
gcc-ASAN<https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-ASAN/dartR.base>
When I look into those links I see the output below.
It seems to break when running an example, but the example runs just fine on my
machine and also other systems. So no clue what is going on the the output
below is definitely above my paygrade.
Any help here would be highly appreciated.
Thanks in advance
* using log directory
'/data/gannet/ripley/R/packages/tests-clang-ASAN/dartR.base.Rcheck'
* using R Under development (unstable) (2025-01-31 r87670)
* using platform: x86_64-pc-linux-gnu
* R was compiled by
clang version 19.1.7
flang-new version 19.1.7
* running under: Fedora Linux 36 (Workstation Edition)
* using session charset: UTF-8
* using option '--no-stop-on-test-error'
* checking for file 'dartR.base/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'dartR.base' version '0.98'
* package encoding: UTF-8
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'dartR.base' can be installed ... [234s/475s] OK
* checking package directory ... OK
* checking whether the package can be loaded ... [23s/28s] OK
* checking whether the package can be loaded with stated dependencies ...
[22s/26s] OK
* checking whether the package can be unloaded cleanly ... [22s/25s] OK
* checking whether the namespace can be loaded with stated dependencies ...
[19s/20s] OK
* checking whether the namespace can be unloaded cleanly ... [23s/24s] OK
* checking loading without being on the library search path ... [22s/22s] OK
* checking examples ... [81s/88s] ERROR
Running examples in 'dartR.base-Ex.R' failed
The error most likely occurred in:
### Name: gl.filter.factorloadings
### Title: Filters loci based on factor loadings for a PCA or PCoA
### Aliases: gl.filter.factorloadings
### ** Examples
pca <- gl.pcoa(testset.gl)
Starting gl.pcoa
Processing genlight object with SNP data
Warning: Number of loci is less than the number of individuals to be
represented
Performing a PCA, individuals as entities, loci as attributes, SNP genotype
as state
=================================================================
==2742437==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x518000697ff0 at pc 0x7f2e873ccfe0 bp 0x7ffdac8d25d0 sp 0x7ffdac8d25c8
READ of size 16 at 0x518000697ff0 thread T0
#0 0x7f2e873ccfdf in bytesToDouble
/tmp/RtmpNNPUz9/R.INSTALL3cef1f2b1bd39c/adegenet/src/snpbin.c:225:19
#1 0x7f2e873ceca5 in snpbin2freq
/tmp/RtmpNNPUz9/R.INSTALL3cef1f2b1bd39c/adegenet/src/snpbin.c:332:5
#2 0x7f2e873ceca5 in snpbin_dotprod_freq
/tmp/RtmpNNPUz9/R.INSTALL3cef1f2b1bd39c/adegenet/src/snpbin.c:447:5
#3 0x7f2e873bba42 in GLdotProd
/tmp/RtmpNNPUz9/R.INSTALL3cef1f2b1bd39c/adegenet/src/GLfunctions.c:42:14
#4 0x5653c6191567 in do_dotCode
/data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c
#5 0x5653c6232f7f in bcEval_loop
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:8122:14
#6 0x5653c6225384 in bcEval
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7505:16
#7 0x5653c622389a in Rf_eval
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1167:8
#8 0x5653c626d36c in R_execClosure
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2393:22
#9 0x5653c626c531 in applyClosure_core
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2306:16
#10 0x5653c62242e9 in Rf_applyClosure
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2328:16
#11 0x5653c62242e9 in Rf_eval
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1280:12
#12 0x5653c627ee00 in do_set
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3571:8
#13 0x5653c6223de3 in Rf_eval
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1232:12
#14 0x5653c62faa9a in Rf_ReplIteration
/data/gannet/ripley/R/svn/R-devel/src/main/main.c:265:2
#15 0x5653c62fd1d0 in R_ReplConsole
/data/gannet/ripley/R/svn/R-devel/src/main/main.c:317:11
#16 0x5653c62fd1d0 in run_Rmainloop
/data/gannet/ripley/R/svn/R-devel/src/main/main.c:1219:5
#17 0x5653c62fd262 in Rf_mainloop
/data/gannet/ripley/R/svn/R-devel/src/main/main.c:1226:5
#18 0x5653c600720c in main
/data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5
#19 0x7f2e9fc2950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f)
(BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#20 0x7f2e9fc295c8 in __libc_start_main@GLIBC_2.2.5
(/lib64/libc.so.6+0x295c8) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#21 0x5653c5f274e4 in _start
(/data/gannet/ripley/R/clang-ASAN/bin/exec/R+0x1574e4)
0x518000697ff8 is located 0 bytes after 888-byte region
[0x518000697c80,0x518000697ff8)
allocated by thread T0 here:
#0 0x5653c5fc44b9 in calloc
/data/gannet/ripley/Sources2/LLVM/19/latest/compiler-rt/lib/asan/asan_malloc_linux.cpp:75:3
#1 0x7f2e873cebca in snpbin_dotprod_freq
/tmp/RtmpNNPUz9/R.INSTALL3cef1f2b1bd39c/adegenet/src/snpbin.c:443:23
#2 0x7f2e873bba42 in GLdotProd
/tmp/RtmpNNPUz9/R.INSTALL3cef1f2b1bd39c/adegenet/src/GLfunctions.c:42:14
#3 0x5653c6191567 in do_dotCode
/data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c
#4 0x5653c6232f7f in bcEval_loop
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:8122:14
#5 0x5653c6225384 in bcEval
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7505:16
#6 0x5653c622389a in Rf_eval
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1167:8
#7 0x5653c626d36c in R_execClosure
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2393:22
#8 0x5653c626c531 in applyClosure_core
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2306:16
#9 0x5653c62242e9 in Rf_applyClosure
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2328:16
#10 0x5653c62242e9 in Rf_eval
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1280:12
#11 0x5653c627ee00 in do_set
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3571:8
#12 0x5653c6223de3 in Rf_eval
/data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1232:12
#13 0x5653c62faa9a in Rf_ReplIteration
/data/gannet/ripley/R/svn/R-devel/src/main/main.c:265:2
#14 0x5653c62fd1d0 in R_ReplConsole
/data/gannet/ripley/R/svn/R-devel/src/main/main.c:317:11
#15 0x5653c62fd1d0 in run_Rmainloop
/data/gannet/ripley/R/svn/R-devel/src/main/main.c:1219:5
#16 0x5653c62fd262 in Rf_mainloop
/data/gannet/ripley/R/svn/R-devel/src/main/main.c:1226:5
#17 0x5653c600720c in main
/data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5
#18 0x7f2e9fc2950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f)
(BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
SUMMARY: AddressSanitizer: heap-buffer-overflow
/tmp/RtmpNNPUz9/R.INSTALL3cef1f2b1bd39c/adegenet/src/snpbin.c:225:19 in
bytesToDouble
Shadow bytes around the buggy address:
0x518000697d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x518000697d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x518000697e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x518000697e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x518000697f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x518000697f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[00]fa
0x518000698000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x518000698080: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x518000698100: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x518000698180: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x518000698200: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==2742437==ABORTING
* DONE
Status: 1 ERROR
From: R-package-devel <r-package-devel-boun...@r-project.org> On Behalf Of
r-package-devel-requ...@r-project.org
Sent: Saturday, 1 February 2025 10:00 PM
To: r-package-devel@r-project.org
Subject: R-package-devel Digest, Vol 118, Issue 1
Send R-package-devel mailing list submissions to
r-package-devel@r-project.org<mailto:r-package-devel@r-project.org>
To subscribe or unsubscribe via the World Wide Web, visit
https://stat.ethz.ch/mailman/listinfo/r-package-devel<https://stat.ethz.ch/mailman/listinfo/r-package-devel>
or, via email, send a message with subject or body 'help' to
r-package-devel-requ...@r-project.org<mailto:r-package-devel-requ...@r-project.org>
You can reach the person managing the list at
r-package-devel-ow...@r-project.org<mailto:r-package-devel-ow...@r-project.org>
[UC Logo]<http://www.canberra.edu.au>
[Adobe Creative Campus. Fuel your ceativity, Adobe Express free for all UC Students
and Staff.]<https://www.canberra.edu.au/on-campus/adobe-creative-campus/>
The Ngunnawal people are the Traditional Custodians of the ACT where UC's Bruce
Campus is situated and are an integral and celebrated part of UC's culture. We
also acknowledge other First Nations Peoples.
Australian Government Higher Education Registered Provider (CRICOS) #00212K.
TEQSA Provider ID: PRV12003 (Australian University)
Email
Disclaimer<https://www.canberra.edu.au/about-uc/disclaimer-copyright-privacy-accessibility>
[UC Facebook]<https://www.facebook.com/UniversityOfCanberra> [UC Instagram]
<https://www.instagram.com/unicanberra/> [UC Linkedin]
<https://au.linkedin.com/school/university-of-canberra/> [UC Youtube]
<https://www.youtube.com/user/uniofcanberra> [University of Canberra]
<http://www.canberra.edu.au>
[[alternative HTML version deleted]]
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel