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

[ci] [R-package] stack-use-after-scope issues detected by address sanitizer #4674

Closed
jameslamb opened this issue Oct 13, 2021 · 4 comments
Closed

Comments

@jameslamb
Copy link
Collaborator

jameslamb commented Oct 13, 2021

Description

On the 3.3.0 release of {lightgbm} (#4633), CRAN's "additional checks" with address sanitizers (ASAN) detected some issues. Originally noted at #4633 (comment).

clang (link)

==3226314==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffca6724d90 at pc 0x7f2ba7c1f4a7 bp 0x7ffca6724030 sp 0x7ffca6724028
READ of size 8 at 0x7ffca6724d90 thread T0

full logs (click me)
=================================================================
  ==3226314==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffca6724d90 at pc 0x7f2ba7c1f4a7 bp 0x7ffca6724030 sp 0x7ffca6724028
  READ of size 8 at 0x7ffca6724d90 thread T0
      #0 0x7f2ba7c1f4a6 in std::__1::__function::__value_func<void (std::__1::vector<std::__1::pair<int, double>, std::__1::allocator<std::__1::pair<int, double> > > const&, double*)>::operator bool() const /usr/local/bin/../include/c++/v1/__functional/function.h:540:55
      #1 0x7f2ba7c1f4a6 in std::__1::function<void (std::__1::vector<std::__1::pair<int, double>, std::__1::allocator<std::__1::pair<int, double> > > const&, double*)>::operator bool() const /usr/local/bin/../include/c++/v1/__functional/function.h:1027:32
      #2 0x7f2ba7c1f4a6 in bool std::__1::operator==<void, std::__1::vector<std::__1::pair<int, double>, std::__1::allocator<std::__1::pair<int, double> > > const&, double*>(std::__1::function<void (std::__1::vector<std::__1::pair<int, double>, std::__1::allocator<std::__1::pair<int, double> > > const&, double*)> const&, std::nullptr_t) /usr/local/bin/../include/c++/v1/__functional/function.h:1208:82
      #3 0x7f2ba7c1f4a6 in LightGBM::DatasetLoader::ExtractFeaturesFromMemory(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >*, LightGBM::Parser const*, LightGBM::Dataset*) /data/gannet/ripley/R/packages/tests-clang-SAN/lightgbm/src/io/dataset_loader.cpp:1146:20
      #4 0x7f2ba7c17b2e in LightGBM::DatasetLoader::LoadFromFile(char const*, int, int) /data/gannet/ripley/R/packages/tests-clang-SAN/lightgbm/src/io/dataset_loader.cpp:223:7
      #5 0x7f2ba844b343 in LightGBM::DatasetLoader::LoadFromFile(char const*) /data/gannet/ripley/R/packages/tests-clang-SAN/lightgbm/src/./include/LightGBM/dataset_loader.h:25:12
      #6 0x7f2ba844b343 in LGBM_DatasetCreateFromFile /data/gannet/ripley/R/packages/tests-clang-SAN/lightgbm/src/c_api.cpp:960:21
      #7 0x7f2ba84d19e0 in LGBM_DatasetCreateFromFile_R /data/gannet/ripley/R/packages/tests-clang-SAN/lightgbm/src/lightgbm_R.cpp:123:3
      #8 0x6d7932 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:607:17
      #9 0x7240a9 in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1284:11
      #10 0x81db7f in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:843:9
      #11 0x892216 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2982:8
      #12 0x81d778 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12
      #13 0x8910b2 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2530:10
      #14 0x81d778 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12
      #15 0x81d778 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12
      #16 0x8910b2 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2530:10
      #17 0x81d778 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12
      #18 0x81d778 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12
      #19 0x8910b2 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2530:10
      #20 0x81d778 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12
      #21 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #22 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #23 0x81ddc8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863:12
      #24 0x8910b2 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2530:10
      #25 0x81d778 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815:12
      #26 0x897aa5 in do_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3357:13
      #27 0x834ab8 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7128:14
      #28 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #29 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #30 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #31 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #32 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #33 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #34 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #35 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #36 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #37 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #38 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #39 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #40 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #41 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #42 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #43 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #44 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #45 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #46 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #47 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #48 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #49 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #50 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #51 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #52 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #53 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #54 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #55 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #56 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #57 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #58 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #59 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #60 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #61 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #62 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #63 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #64 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #65 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #66 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #67 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #68 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #69 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #70 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #71 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #72 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #73 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #74 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #75 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #76 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #77 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #78 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #79 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #80 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #81 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #82 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #83 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #84 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #85 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #86 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #87 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #88 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #89 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #90 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #91 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #92 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #93 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #94 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #95 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #96 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #97 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #98 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #99 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #100 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #101 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #102 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #103 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #104 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #105 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #106 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #107 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #108 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #109 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #110 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #111 0x81ddc8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863:12
      #112 0x89838c in do_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3380:9
      #113 0x834ab8 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7128:14
      #114 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #115 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #116 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #117 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #118 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #119 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #120 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #121 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #122 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #123 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #124 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #125 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #126 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #127 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #128 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #129 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #130 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #131 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #132 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #133 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #134 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #135 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #136 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #137 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #138 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #139 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #140 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #141 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #142 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #143 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #144 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #145 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #146 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #147 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #148 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #149 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #150 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #151 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #152 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #153 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #154 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #155 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #156 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #157 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #158 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #159 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #160 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #161 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #162 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #163 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #164 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #165 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #166 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #167 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #168 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #169 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #170 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #171 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #172 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #173 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #174 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #175 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #176 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #177 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #178 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #179 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #180 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #181 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #182 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #183 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #184 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #185 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #186 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #187 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #188 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #189 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #190 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #191 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #192 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #193 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #194 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #195 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #196 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #197 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #198 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #199 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #200 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #201 0x888b5f in R_forceAndCall /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1977:8
      #202 0x526ecf in do_lapply /data/gannet/ripley/R/svn/R-devel/src/main/apply.c:70:8
      #203 0x999c04 in do_internal /data/gannet/ripley/R/svn/R-devel/src/main/names.c:1396:11
      #204 0x832a19 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7148:15
      #205 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #206 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #207 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #208 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #209 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #210 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #211 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #212 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #213 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #214 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #215 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #216 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #217 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #218 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #219 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #220 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #221 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #222 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #223 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #224 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #225 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #226 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #227 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #228 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #229 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #230 0x87efe1 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568:8
      #231 0x8afc40 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149:15
      #232 0x8afc40 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190:14
      #233 0x854c76 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880:20
      #234 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #235 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #236 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #237 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #238 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #239 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #240 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #241 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #242 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #243 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #244 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #245 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #246 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #247 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #248 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #249 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #250 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #251 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #252 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #253 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #254 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #255 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #256 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #257 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #258 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #259 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #260 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #261 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #262 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #263 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #264 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #265 0x841ddf in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096:12
      #266 0x81d38e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740:8
      #267 0x886197 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c
      #268 0x881aff in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836:16
      #269 0x81ddc8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863:12
      #270 0x94d246 in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264:2
      #271 0x950790 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:316:11
      #272 0x950599 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1129:5
      #273 0x4e247a in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29:5
  
  Address 0x7ffca6724d90 is located in stack of thread T0 at offset 1840 in frame
      #0 0x7f2ba844b08f in LGBM_DatasetCreateFromFile /data/gannet/ripley/R/packages/tests-clang-SAN/lightgbm/src/c_api.cpp:949
  
    This frame has 5 object(s):
      [32, 72) 'param' (line 951)
      [112, 1456) 'config' (line 952)
      [1584, 1736) 'loader' (line 957)
      [1808, 1856) 'ref.tmp' (line 957) <== Memory access at offset 1840 is inside this variable
      [1888, 1912) 'ref.tmp61' (line 968)
  HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
        (longjmp and C++ exceptions *are* supported)
  SUMMARY: AddressSanitizer: stack-use-after-scope /usr/local/bin/../include/c++/v1/__functional/function.h:540:55 in std::__1::__function::__value_func<void (std::__1::vector<std::__1::pair<int, double>, std::__1::allocator<std::__1::pair<int, double> > > const&, double*)>::operator bool() const
  Shadow bytes around the buggy address:
    0x100014cdc960: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x100014cdc970: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x100014cdc980: 00 00 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2
    0x100014cdc990: f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x100014cdc9a0: 00 00 00 00 00 f2 f2 f2 f2 f2 f2 f2 f2 f2 f8 f8
  =>0x100014cdc9b0: f8 f8[f8]f8 f2 f2 f2 f2 f8 f8 f8 f3 f3 f3 f3 f3
    0x100014cdc9c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x100014cdc9d0: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3
    0x100014cdc9e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x100014cdc9f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x100014cdca00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  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
  ==3226314==ABORTING
* DONE
Status: 1 ERROR

gcc (link)

==2022826==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffda8d7fa80 at pc 0x7ff65096277b bp 0x7ffda8d7f220 sp 0x7ffda8d7f210
READ of size 8 at 0x7ffda8d7fa80 thread T0

full logs (click me)
==2022826==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffda8d7fa80 at pc 0x7ff65096277b bp 0x7ffda8d7f220 sp 0x7ffda8d7f210
  READ of size 8 at 0x7ffda8d7fa80 thread T0
      #0 0x7ff65096277a in std::_Function_base::_M_empty() const /usr/include/c++/10/bits/std_function.h:248
      #1 0x7ff65096277a in std::function<void (std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > > const&, double*)>::operator bool() const /usr/include/c++/10/bits/std_function.h:499
      #2 0x7ff65096277a in bool std::operator==<void, std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > > const&, double*>(std::function<void (std::vector<std::pair<int, double>, std::allocator<std::pair<int, double> > > const&, double*)> const&, decltype(nullptr)) /usr/include/c++/10/bits/std_function.h:681
      #3 0x7ff65096277a in LightGBM::DatasetLoader::ExtractFeaturesFromMemory(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, LightGBM::Parser const*, LightGBM::Dataset*) io/dataset_loader.cpp:1146
      #4 0x7ff650a03643 in LightGBM::DatasetLoader::LoadFromFile(char const*, int, int) io/dataset_loader.cpp:223
      #5 0x7ff651f33b7d in LightGBM::DatasetLoader::LoadFromFile(char const*) include/LightGBM/dataset_loader.h:25
      #6 0x7ff651f33b7d in LGBM_DatasetCreateFromFile /data/gannet/ripley/R/packages/tests-gcc-SAN/lightgbm/src/c_api.cpp:960
      #7 0x7ff652051cba in LGBM_DatasetCreateFromFile_R /data/gannet/ripley/R/packages/tests-gcc-SAN/lightgbm/src/lightgbm_R.cpp:123
      #8 0x57d953 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:607
      #9 0x586bac in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1284
      #10 0x67124e in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:843
      #11 0x67c8a9 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2982
      #12 0x670c58 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815
      #13 0x678bf6 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2530
      #14 0x670c58 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815
      #15 0x670c58 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815
      #16 0x678bf6 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2530
      #17 0x670c58 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815
      #18 0x670c58 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815
      #19 0x678bf6 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2530
      #20 0x670c58 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815
      #21 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #22 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #23 0x67082f in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863
      #24 0x678bf6 in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2530
      #25 0x670c58 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:815
      #26 0x67f737 in do_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3357
      #27 0x62824b in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7128
      #28 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #29 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #30 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #31 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #32 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #33 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #34 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #35 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #36 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #37 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #38 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #39 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #40 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #41 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #42 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #43 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #44 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #45 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #46 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #47 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #48 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #49 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #50 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #51 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #52 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #53 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #54 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #55 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #56 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #57 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #58 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #59 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #60 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #61 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #62 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #63 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #64 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #65 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #66 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #67 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #68 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #69 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #70 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #71 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #72 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #73 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #74 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #75 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #76 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #77 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #78 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #79 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #80 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #81 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #82 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #83 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #84 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #85 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #86 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #87 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #88 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #89 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #90 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #91 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #92 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #93 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #94 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #95 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #96 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #97 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #98 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #99 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #100 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #101 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #102 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #103 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #104 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #105 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #106 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #107 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #108 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #109 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #110 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #111 0x67082f in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863
      #112 0x680177 in do_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3380
      #113 0x62824b in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7128
      #114 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #115 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #116 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #117 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #118 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #119 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #120 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #121 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #122 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #123 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #124 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #125 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #126 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #127 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #128 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #129 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #130 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #131 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #132 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #133 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #134 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #135 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #136 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #137 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #138 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #139 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #140 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #141 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #142 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #143 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #144 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #145 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #146 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #147 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #148 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #149 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #150 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #151 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #152 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #153 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #154 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #155 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #156 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #157 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #158 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #159 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #160 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #161 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #162 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #163 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #164 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #165 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #166 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #167 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #168 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #169 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #170 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #171 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #172 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #173 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #174 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #175 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #176 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #177 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #178 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #179 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #180 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #181 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #182 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #183 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #184 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #185 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #186 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #187 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #188 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #189 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #190 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #191 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #192 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #193 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #194 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #195 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #196 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #197 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #198 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #199 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #200 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #201 0x67d7dd in R_forceAndCall /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1977
      #202 0x44c98a in do_lapply /data/gannet/ripley/R/svn/R-devel/src/main/apply.c:70
      #203 0x71c9a9 in do_internal /data/gannet/ripley/R/svn/R-devel/src/main/names.c:1396
      #204 0x6234ec in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7148
      #205 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #206 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #207 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #208 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #209 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #210 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #211 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #212 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #213 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #214 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #215 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #216 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #217 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #218 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #219 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #220 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #221 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #222 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #223 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #224 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #225 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #226 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #227 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #228 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #229 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #230 0x671fb2 in forcePromise /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:568
      #231 0x672747 in FORCE_PROMISE /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5149
      #232 0x672747 in getvar /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:5190
      #233 0x636bda in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:6880
      #234 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #235 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #236 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #237 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #238 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #239 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #240 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #241 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #242 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #243 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #244 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #245 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #246 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #247 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #248 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #249 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #250 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #251 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #252 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #253 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #254 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #255 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #256 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #257 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #258 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #259 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #260 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #261 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #262 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #263 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #264 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #265 0x6469ae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7096
      #266 0x66ff67 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:740
      #267 0x675274 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1910
      #268 0x677697 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1836
      #269 0x67082f in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:863
      #270 0x6f130d in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264
      #271 0x6f19a0 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:316
      #272 0x6f1ae4 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1129
      #273 0x6f1b32 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1136
      #274 0x41b3e8 in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29
  
  Address 0x7ffda8d7fa80 is located in stack of thread T0 at offset 64 in frame
      #0 0x7ff651f337df in LGBM_DatasetCreateFromFile /data/gannet/ripley/R/packages/tests-gcc-SAN/lightgbm/src/c_api.cpp:949
  
    This frame has 6 object(s):
      [32, 33) '<unknown>'
      [48, 80) '<unknown>' <== Memory access at offset 64 is inside this variable
      [112, 144) '<unknown>'
      [176, 232) 'param' (line 951)
      [272, 456) 'loader' (line 957)
      [528, 2048) 'config' (line 952)
  HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
        (longjmp and C++ exceptions *are* supported)
  SUMMARY: AddressSanitizer: stack-use-after-scope /usr/include/c++/10/bits/std_function.h:248 in std::_Function_base::_M_empty() const
  Shadow bytes around the buggy address:
    0x1000351a7f00: f1 f1 04 f2 00 f2 f2 f2 00 f2 f2 f2 00 f2 f2 f2
    0x1000351a7f10: 00 00 00 f2 f2 f2 f2 f2 00 00 00 f2 f2 f2 f2 f2
    0x1000351a7f20: 00 00 00 f2 f2 f2 f2 f2 00 00 00 f2 f2 f2 f2 f2
    0x1000351a7f30: 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00
    0x1000351a7f40: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 01 f2 f8 f8
  =>0x1000351a7f50:[f8]f8 f2 f2 f2 f2 00 00 00 00 f2 f2 f2 f2 00 00
    0x1000351a7f60: 00 00 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 00
    0x1000351a7f70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x1000351a7f80: 00 f2 f2 f2 f2 f2 f2 f2 f2 f2 00 00 00 00 00 00
    0x1000351a7f90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x1000351a7fa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  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
    Shadow gap:              cc
  ==2022826==ABORTING
* DONE
Status: 1 ERROR

Thanks to @david-cortes for noting the likely root cause of these errors, in #4633 (comment).

Took a look at the error and it's not R specific. The issue is that you're using a C++ std::function as if it were a C function pointer, assigning to and comparing against nullptr. This is a general memory safety issue that should be affecting also the C API and other interfaces relying on it.

Additional Comments

The last time CRAN detected memory issues in its "Additional Checks", they told us we had a few weeks to fix it and that if we didn't, {lightgbm} would be removed from CRAN: #3338 (comment)

At the time, I believed that we had successfully replicated CRAN's testing setup in LightGBM's continuous integration: #3439 (comment).

Today, LightGBM runs 3 CI jobs on every commits using UBSAN/ASAN.

None of these jobs produce the issues in CRAN's additional checks.

As of this writing, based on the information at https://www.stats.ox.ac.uk/pub/bdr/memtests/README.txt (found from https://cran.r-project.org/web/checks/check_issue_kinds.html) here is the configuration CRAN is using for those tests.

CRAN memtest configs (click me)
Tests of memory access errors, on x86_64 Linux (currently Fedora 32).

There is a directory for each package with a 00check.log file documenting the
package version and the version of R used.  For {gcc,clang}-ASAN this may
also report errors, including from examples.

How to run and interpret these (with links to further information) is in §4.3 of 'Writing R Extensions'.  The settings used are listed by sub-directory in the rest of this file.

clang-ASAN, clang-UBSAN:
Using clang 13.0.0 built with libc++/libcxxabi as the default C++ library,
and gfortran 10.3.
[For a version built to default to libstdc++ (as shipped by Debian/Ubuntu),
add -stdlib=libc++ to the CXX line and install the libc++-dev package.]

config.site:
CC="clang -fsanitize=address,undefined -fno-sanitize=float-divide-by-zero -fno-sanitize=alignment -fno-omit-frame-pointer"
CXX="clang++ -fsanitize=address,undefined -fno-sanitize=float-divide-by-zero -fno-sanitize=alignment -fno-omit-frame-pointer -frtti"
CFLAGS="-g -O3 -Wall -pedantic"
FFLAGS="-g -O2 -mtune=native"
CXXFLAGS="-g -O3 -Wall -pedantic"
MAIN_LD="clang++ -fsanitize=undefined,address"

and environment variables
setenv ASAN_OPTIONS 'detect_leaks=0:detect_odr_violation=0'
[Experimenting without detect_odr_violation=0]
setenv UBSAN_OPTIONS 'print_stacktrace=1'
setenv RJAVA_JVM_STACK_WORKAROUND 0
setenv RGL_USE_NULL true
(alloc-dealloc mismatches were seen in system libraries used by rgl)
setenv R_DONT_USE_TK true
(There are ASAN errors in X libraries called from Tk initialization.)


gcc-ASAN, gcc-UBSAN:
gcc 10.3 with config.site:
CXX="g++ -fsanitize=address,undefined,bounds-strict -fno-omit-frame-pointer"
CFLAGS="-g -O2 -Wall -pedantic -mtune=native -fsanitize=address"
DEFS=-DSWITCH_TO_REFCNT
FFLAGS="-g -O2 -mtune=native"
CXXFLAGS="-g -O2 -Wall -pedantic -mtune=native"
MAIN_LDFLAGS="-fsanitize=address,undefined -pthread"

~/.R/Makevars:
CC = gcc -std=gnu99 -fsanitize=address,undefined -fno-omit-frame-pointer
F77 = gfortran -fsanitize=address
FC = gfortran -fsanitize=address

and environment variables
setenv ASAN_OPTIONS 'detect_leaks=0:detect_odr_violation=0'
[Experimenting without detect_odr_violation=0]
setenv UBSAN_OPTIONS 'print_stacktrace=1'
setenv RJAVA_JVM_STACK_WORKAROUND 0
setenv RGL_USE_NULL true
setenv R_DONT_USE_TK true


valgrind:
Running R CMD check --use-valgrind with an instrumented (level 2) build of R,
currently using valgrind 3.16.0 on Fedora 32.

configured by:
.../configure -C --with-valgrind-instrumentation=2 --with-system-valgrind-headers

with config.site:

CFLAGS="-g -O2 -Wall -pedantic -mtune=native"
CXXFLAGS="-g -O2 -Wall -pedantic -mtune=native"
FFLAGS="-g -O2 -mtune=native"
FCFLAGS="-g -O2 -mtune=native"

and environment variables

setenv RJAVA_JVM_STACK_WORKAROUND 0
setenv R_DONT_USE_TK true

The following valgrind suppression file is used:

{
   Suppression for wcsrtombs
   Memcheck:Cond
   fun:__wcsnlen_sse4_1
   fun:wcsrtombs
   fun:wcstombs
}

{
   Suppression for do_makename
   Memcheck:Addr16
   fun:__wcsnlen_sse4_1
   fun:wcsrtombs
   fun:wcstombs
}
@david-cortes
Copy link
Contributor

You'll probably need to use the same compiler versions as CRAN.

@jameslamb
Copy link
Collaborator Author

Yep for sure! I've listed the complete configuration CRAN uses (which includes compiler versions) in the issue description.

@jameslamb
Copy link
Collaborator Author

jameslamb commented Oct 14, 2021

Good News

I was able to reproduce the problems cited by CRAN's gcc-ASAN checks tonight!!!

Why LightGBM's existing CI jobs didn't catch the same errors as gcc-ASAN / clang-ASAN

In the existing jobs named GCC ASAN/UBSAN, LightGBM is not actually being instrumented to use the address sanitizer

Look at the build logs from the most recent such build on master: https://github.com/microsoft/LightGBM/runs/3886143847.

g++ -fsanitize=undefined,bounds-strict -fno-omit-frame-pointer -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -I./include -DEIGEN_MPL2_ONLY -DMM_PREFETCH=1 -DMM_MALLOC=1 -DUSE_SOCKET -DLGB_R_BUILD -I/usr/local/include -pthread -fpic -g -O2 -Wall -pedantic -mtune=native -c io/parser.cpp -o io/parser.o

Compare those arguments to CRAN's configuration for its gcc-ASAN check, from https://www.stats.ox.ac.uk/pub/bdr/memtests/README.txt.

CXX="g++ -fsanitize=address,undefined,bounds-strict -fno-omit-frame-pointer"
CFLAGS="-g -O2 -Wall -pedantic -mtune=native -fsanitize=address"

So it seems to me that the rhub/rocker-gcc-san image, whose description on GitHub says "GCC ASAN/UBSAN" is actually only configured to use the undefined bounds ("UBSAN") sanitizer!

Thankfully, the wch1/r-debug image comes with versions of R configured to be usable in tests that replicate CRAN's gcc-ASAN and clang-ASAN tests. (https://github.com/wch/r-debug).

docker run \
     --rm \
     -it rhub/rocker-gcc-san:latest \
     /bin/bash -c "Rdevel CMD config CXX11"

# g++ -fsanitize=undefined,bounds-strict -fno-omit-frame-pointer

docker run \
     --rm \
     -it wch1/r-debug:latest \
     /bin/bash -c "RDsan CMD config CXX11"

# g++ -fsanitize=address,undefined,bounds-strict -fno-omit-frame-pointer

How to Reproduce CRAN's checks

docker run \
  --rm \
  -it \
  wch1/r-debug:latest \
  /bin/bash

export ASAN_OPTIONS="detect_leaks=0:detect_odr_violation=0"
export UBSAN_OPTIONS="print_stacktrace=1"
export RJAVA_JVM_STACK_WORKAROUND=0
export RGL_USE_NULL=true
export R_DONT_USE_TK=true

git clone \
  --recursive \
  --depth 1 \
  https://github.com/microsoft/LightGBM.git

RDscriptsan -e "install.packages(c('R6', 'data.table', 'jsonlite', 'Matrix', 'testthat'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())"
cd LightGBM
sh build-cran-package.sh

RDsan CMD INSTALL lightgbm_*.tar.gz
cd R-package/tests
RDscriptsan testthat.R | tee ubsan-tests.log | cat 2>&1 

When I ran this tonight, I saw the exact errors reported by CRAN for gcc-ASAN.

image

What I'm going to do next

If that all goes well, I think we can create a 3.3.1 release and submit it to CRAN. I recommend not doing that though until all of the CRAN checks are complete. So we'll know the full scope of what they're asking.

As of now, there are still a few tests left (2 on Windows, 1 on Mac) at https://cran.r-project.org/web/checks/check_results_lightgbm.html.

image

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants