Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-ASAN error #4

Open
Quentin62 opened this issue Oct 4, 2023 · 0 comments
Open

clang-ASAN error #4

Quentin62 opened this issue Oct 4, 2023 · 0 comments

Comments

@Quentin62
Copy link
Contributor

Quentin62 commented Oct 4, 2023

run the following workflow https://github.com/modal-inria/HDPenReg/actions/workflows/R-CMD-check-cpp.yml with clang-asan container to generate the error

* using log directory ‘/data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg.Rcheck’
* using R Under development (unstable) (2023-03-27 r84069)
* using platform: x86_64-pc-linux-gnu (64-bit)
* R was compiled by
    clang version 16.0.0
    GNU Fortran (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
* running under: Fedora Linux 36 (Workstation Edition)
* using session charset: UTF-8
* using option ‘--no-stop-on-test-error’
* checking for file ‘HDPenReg/DESCRIPTION’ ... OK
* this is package ‘HDPenReg’ version ‘0.94.9’
* 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 ‘HDPenReg’ can be installed ... [15m/28m] OK
* used C compiler: ‘clang version 16.0.0’
* used C++ compiler: ‘clang version 16.0.0’
* checking package directory ... OK
* checking whether the package can be loaded ... [12s/43s] OK
* checking whether the package can be loaded with stated dependencies ... [12s/27s] OK
* checking whether the package can be unloaded cleanly ... [13s/34s] OK
* checking whether the namespace can be loaded with stated dependencies ... [13s/21s] OK
* checking whether the namespace can be unloaded cleanly ... [13s/29s] OK
* checking loading without being on the library search path ... [12s/15s] OK
* checking compiled code ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... [75s/178s] ERROR
Running examples in ‘HDPenReg-Ex.R’ failed
The error most likely occurred in:

> ### Name: HDcvlars
> ### Title: cross validation
> ### Aliases: HDcvlars
> 
> ### ** Examples
> 
> dataset <- simul(50, 10000, 0.4, 10, 50, matrix(c(0.1, 0.8, 0.02, 0.02), nrow = 2))
> result <- HDcvlars(dataset$data, dataset$response, 5)
=================================================================
==3531110==ERROR: AddressSanitizer: container-overflow on address 0x623000221010 at pc 0x7f44f92f87da bp 0x7ffcf58ac7d0 sp 0x7ffcf58ac7c8
READ of size 8 at 0x623000221010 thread T0
    #0 0x7f44f92f87d9 in HD::PathState::l1norm() const /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/../lars/PathState.h:72:53
    #1 0x7f44f92f87d9 in HD::Path::l1norm() const /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/../lars/Path.h:72:40
    #2 0x7f44f92d5038 in HD::Lars::predict(STK::CArray<double, 2147483647, 2147483647, true> const&, double, bool, STK::CArrayVector<double, 2147483647, true>&) /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Lars.cpp:804:24
    #3 0x7f44f934b0df in .omp_outlined._debug__ /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:304:15
    #4 0x7f44f934b0df in .omp_outlined. /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:263:4
    #5 0x7f44fc3c90e2 in __kmp_invoke_microtask (/usr/local/clang/lib64/libomp.so+0xb80e2) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #6 0x7f44fc34ca35 in __kmp_fork_call (/usr/local/clang/lib64/libomp.so+0x3ba35) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #7 0x7f44fc33d2c3 in __kmpc_fork_call (/usr/local/clang/lib64/libomp.so+0x2c2c3) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #8 0x7f44f9347de7 in HD::Cvlars::run2() /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:263:4
    #9 0x7f44f92966fd in cvlarsmain /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/larsRmain.cpp:241:10
    #10 0x5626f0b0cca1 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c
    #11 0x5626f0b5be75 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1551:11
    #12 0x5626f0c76c5e in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7399:14
    #13 0x5626f0c5fec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #14 0x5626f0cc1ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #15 0x5626f0cbe386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #16 0x5626f0c607b1 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1140:12
    #17 0x5626f0cd0240 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3250:8
    #18 0x5626f0c6026d in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1092:12
    #19 0x5626f0d9f945 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:262:2
    #20 0x5626f0da3170 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:314:11
    #21 0x5626f0da2f66 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1200:5
    #22 0x5626f0da32b2 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1207:5
    #23 0x5626f08c572c in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5
    #24 0x7f450c62950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
    #25 0x7f450c6295c8 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x295c8) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
    #26 0x5626f07ec314 in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x310314)

0x623000221010 is located 2832 bytes inside of 6000-byte region [0x623000220500,0x623000221c70)
allocated by thread T0 here:
    #0 0x5626f08c310d in operator new(unsigned long) /data/gannet/ripley/Sources2/LLVM/16.0/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
    #1 0x7f44f9315f74 in void* std::__1::__libcpp_operator_new[abi:v160000]<unsigned long>(unsigned long) /usr/local/clang16/bin/../include/c++/v1/new:266:10
    #2 0x7f44f9315f74 in std::__1::__libcpp_allocate[abi:v160000](unsigned long, unsigned long) /usr/local/clang16/bin/../include/c++/v1/new:292:10
    #3 0x7f44f9315f74 in std::__1::allocator<HD::PathState>::allocate[abi:v160000](unsigned long) /usr/local/clang16/bin/../include/c++/v1/__memory/allocator.h:115:38
    #4 0x7f44f9315f74 in std::__1::__allocation_result<std::__1::allocator_traits<std::__1::allocator<HD::PathState> >::pointer> std::__1::__allocate_at_least[abi:v160000]<std::__1::allocator<HD::PathState> >(std::__1::allocator<HD::PathState>&, unsigned long) /usr/local/clang16/bin/../include/c++/v1/__memory/allocate_at_least.h:55:19
    #5 0x7f44f9315f74 in std::__1::__split_buffer<HD::PathState, std::__1::allocator<HD::PathState>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<HD::PathState>&) /usr/local/clang16/bin/../include/c++/v1/__split_buffer:323:29
    #6 0x7f44f9314bc5 in std::__1::vector<HD::PathState, std::__1::allocator<HD::PathState> >::reserve(unsigned long) /usr/local/clang16/bin/../include/c++/v1/vector:1503:53
    #7 0x7f44f930fab8 in HD::Path::Path(int) /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Path.cpp:45:11
    #8 0x7f44f92c3c41 in HD::Lars::Lars(STK::CArray<double, 2147483647, 2147483647, true> const&, STK::CArrayVector<double, 2147483647, true> const&, int, bool, double) /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Lars.cpp:83:13
    #9 0x7f44f934af83 in .omp_outlined._debug__ /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:298:17
    #10 0x7f44f934af83 in .omp_outlined. /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:263:4
    #11 0x7f44fc3c90e2 in __kmp_invoke_microtask (/usr/local/clang/lib64/libomp.so+0xb80e2) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #12 0x7f44fc34ca35 in __kmp_fork_call (/usr/local/clang/lib64/libomp.so+0x3ba35) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #13 0x7f44fc33d2c3 in __kmpc_fork_call (/usr/local/clang/lib64/libomp.so+0x2c2c3) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #14 0x7f44f9347de7 in HD::Cvlars::run2() /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:263:4
    #15 0x7f44f92966fd in cvlarsmain /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/larsRmain.cpp:241:10
    #16 0x5626f0b0cca1 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c
    #17 0x5626f0b5be75 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1551:11
    #18 0x5626f0c76c5e in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7399:14
    #19 0x5626f0c5fec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #20 0x5626f0cc1ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #21 0x5626f0cbe386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #22 0x5626f0c607b1 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1140:12
    #23 0x5626f0cd0240 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3250:8
    #24 0x5626f0c6026d in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1092:12
    #25 0x5626f0d9f945 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:262:2
    #26 0x5626f0da3170 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:314:11
    #27 0x5626f0da2f66 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1200:5
    #28 0x5626f0da32b2 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1207:5
    #29 0x5626f08c572c in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5
    #30 0x7f450c62950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)

HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_container_overflow=0.
If you suspect a false positive see also: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow.
SUMMARY: AddressSanitizer: container-overflow /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/../lars/PathState.h:72:53 in HD::PathState::l1norm() const
Shadow bytes around the buggy address:
  0x623000220d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x623000220e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x623000220e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x623000220f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x623000220f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
=>0x623000221000: fc fc[fc]fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x623000221080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x623000221100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x623000221180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x623000221200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x623000221280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
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
==3531110==ABORTING
* checking package vignettes in ‘inst/doc’ ... OK
* checking re-building of vignette outputs ... [78s/174s] ERROR
Error(s) in re-building vignettes:
--- re-building ‘HDPenReg.Rnw’ using Sweave
Loading required package: rtkore
Loading required package: Rcpp

Attaching package: ‘rtkore’

The following object is masked from ‘package:Rcpp’:

    LdFlags

OMP: Warning #96: Cannot form a team with 24 threads, using 2 instead.
OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
=================================================================
==3548796==ERROR: AddressSanitizer: container-overflow on address 0x6230000d0de0 at pc 0x7f53614f87da bp 0x7fffb8c2e550 sp 0x7fffb8c2e548
READ of size 8 at 0x6230000d0de0 thread T0
    #0 0x7f53614f87d9 in HD::PathState::l1norm() const /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/../lars/PathState.h:72:53
    #1 0x7f53614f87d9 in HD::Path::l1norm() const /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/../lars/Path.h:72:40
    #2 0x7f53614d5038 in HD::Lars::predict(STK::CArray<double, 2147483647, 2147483647, true> const&, double, bool, STK::CArrayVector<double, 2147483647, true>&) /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Lars.cpp:804:24
    #3 0x7f536154b0df in .omp_outlined._debug__ /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:304:15
    #4 0x7f536154b0df in .omp_outlined. /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:263:4
    #5 0x7f536468b0e2 in __kmp_invoke_microtask (/usr/local/clang/lib64/libomp.so+0xb80e2) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #6 0x7f53646140e7 in __kmp_invoke_task_func (/usr/local/clang/lib64/libomp.so+0x410e7) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #7 0x7f536460e777 in __kmp_fork_call (/usr/local/clang/lib64/libomp.so+0x3b777) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #8 0x7f53645ff2c3 in __kmpc_fork_call (/usr/local/clang/lib64/libomp.so+0x2c2c3) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #9 0x7f5361547de7 in HD::Cvlars::run2() /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:263:4
    #10 0x7f53614966fd in cvlarsmain /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/larsRmain.cpp:241:10
    #11 0x55e6e0a7dca1 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c
    #12 0x55e6e0acce75 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1551:11
    #13 0x55e6e0be7c5e in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7399:14
    #14 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #15 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #16 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #17 0x55e6e0bd17b1 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1140:12
    #18 0x55e6e0c41240 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3250:8
    #19 0x55e6e0bd126d in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1092:12
    #20 0x55e6e0c482ec in do_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3625:13
    #21 0x55e6e0be7c5e in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7399:14
    #22 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #23 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #24 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #25 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #26 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #27 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #28 0x55e6e0bd181d in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1040:9
    #29 0x55e6e0c4a1cf in do_withVisible /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3677:9
    #30 0x55e6e0d5f9a6 in do_internal /data/gannet/ripley/R/svn/R-devel/src/main/names.c:1404:11
    #31 0x55e6e0bda504 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7419:15
    #32 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #33 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #34 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #35 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #36 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #37 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #38 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #39 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #40 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #41 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #42 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #43 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #44 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #45 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #46 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #47 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #48 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #49 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #50 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #51 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #52 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #53 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #54 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #55 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #56 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #57 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #58 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #59 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #60 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #61 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #62 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #63 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #64 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #65 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #66 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #67 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #68 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #69 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #70 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #71 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #72 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #73 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #74 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #75 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #76 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #77 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #78 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #79 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #80 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #81 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #82 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #83 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #84 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #85 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #86 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #87 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #88 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #89 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #90 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #91 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #92 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #93 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #94 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #95 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #96 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #97 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #98 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #99 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #100 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #101 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #102 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #103 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #104 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #105 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #106 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #107 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #108 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #109 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #110 0x55e6e0bd17b1 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1140:12
    #111 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #112 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #113 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #114 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #115 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #116 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #117 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #118 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #119 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #120 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #121 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #122 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #123 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #124 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #125 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #126 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #127 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #128 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #129 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #130 0x55e6e0c2c90e in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:833:8
    #131 0x55e6e0c62f46 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5420:15
    #132 0x55e6e0c62f46 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5461:14
    #133 0x55e6e0c04bea in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7151:20
    #134 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #135 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #136 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #137 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #138 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #139 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #140 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #141 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #142 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #143 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #144 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #145 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #146 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #147 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #148 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #149 0x55e6e0bf29c3 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7367:12
    #150 0x55e6e0bd0ec5 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1013:8
    #151 0x55e6e0c32ddd in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
    #152 0x55e6e0c2f386 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2113:16
    #153 0x55e6e0bd17b1 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1140:12
    #154 0x55e6e0d10945 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:262:2
    #155 0x55e6e0d14170 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:314:11
    #156 0x55e6e0d13f66 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1200:5
    #157 0x55e6e0d142b2 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1207:5
    #158 0x55e6e083672c in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5
    #159 0x7f537582950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
    #160 0x7f53758295c8 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x295c8) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
    #161 0x55e6e075d314 in _start (/data/gannet/ripley/R/R-clang-SAN/bin/exec/R+0x310314)

0x6230000d0de0 is located 2272 bytes inside of 6000-byte region [0x6230000d0500,0x6230000d1c70)
allocated by thread T0 here:
    #0 0x55e6e083410d in operator new(unsigned long) /data/gannet/ripley/Sources2/LLVM/16.0/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
    #1 0x7f5361515f74 in void* std::__1::__libcpp_operator_new[abi:v160000]<unsigned long>(unsigned long) /usr/local/clang16/bin/../include/c++/v1/new:266:10
    #2 0x7f5361515f74 in std::__1::__libcpp_allocate[abi:v160000](unsigned long, unsigned long) /usr/local/clang16/bin/../include/c++/v1/new:292:10
    #3 0x7f5361515f74 in std::__1::allocator<HD::PathState>::allocate[abi:v160000](unsigned long) /usr/local/clang16/bin/../include/c++/v1/__memory/allocator.h:115:38
    #4 0x7f5361515f74 in std::__1::__allocation_result<std::__1::allocator_traits<std::__1::allocator<HD::PathState> >::pointer> std::__1::__allocate_at_least[abi:v160000]<std::__1::allocator<HD::PathState> >(std::__1::allocator<HD::PathState>&, unsigned long) /usr/local/clang16/bin/../include/c++/v1/__memory/allocate_at_least.h:55:19
    #5 0x7f5361515f74 in std::__1::__split_buffer<HD::PathState, std::__1::allocator<HD::PathState>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<HD::PathState>&) /usr/local/clang16/bin/../include/c++/v1/__split_buffer:323:29
    #6 0x7f5361514bc5 in std::__1::vector<HD::PathState, std::__1::allocator<HD::PathState> >::reserve(unsigned long) /usr/local/clang16/bin/../include/c++/v1/vector:1503:53
    #7 0x7f536150fab8 in HD::Path::Path(int) /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Path.cpp:45:11
    #8 0x7f53614c3c41 in HD::Lars::Lars(STK::CArray<double, 2147483647, 2147483647, true> const&, STK::CArrayVector<double, 2147483647, true> const&, int, bool, double) /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Lars.cpp:83:13
    #9 0x7f536154af83 in .omp_outlined._debug__ /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:298:17
    #10 0x7f536154af83 in .omp_outlined. /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/Cvlars.cpp:263:4
    #11 0x7f536468b0e2 in __kmp_invoke_microtask (/usr/local/clang/lib64/libomp.so+0xb80e2) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)
    #12 0x7f53646140e7 in __kmp_invoke_task_func (/usr/local/clang/lib64/libomp.so+0x410e7) (BuildId: 8eba3d0f3145b19407156ac55f322da7c26ffb38)

HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_container_overflow=0.
If you suspect a false positive see also: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow.
SUMMARY: AddressSanitizer: container-overflow /data/gannet/ripley/R/packages/tests-clang-SAN/HDPenReg/src/HDPenReg/lars/../lars/PathState.h:72:53 in HD::PathState::l1norm() const
Shadow bytes around the buggy address:
  0x6230000d0b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x6230000d0b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x6230000d0c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x6230000d0c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x6230000d0d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x6230000d0d80: 00 00 00 00 00 00 00 00 fc fc fc fc[fc]fc fc fc
  0x6230000d0e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x6230000d0e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x6230000d0f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x6230000d0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  0x6230000d1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
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
==3548796==ABORTING

* DONE
Status: 2 ERRORs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant