paleolimbot opened a new issue, #4638:
URL: https://github.com/apache/arrow-adbc/issues/4638

   ### What happened?
   
   From CRAN:
   
   
https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-ASAN/adbcdrivermanager/00check.log
   
   It looks like this is related to `std::regex()` and perhaps not our code, 
but perhaps the `std::regex()` usage is new?
   
   ### Stack Trace
   
   ```
   =================================================================
     ==724491==ERROR: AddressSanitizer: global-buffer-overflow on address 
0x7b92540c9578 at pc 0x7b9253bffd1a bp 0x7ffd2f711ba0 sp 0x7ffd2f711b98
     READ of size 1 at 0x7b92540c9578 thread T0
         #0 0x7b9253bffd19 in std::__detail::_Scanner<char>::_M_scan_normal() 
/usr/include/c++/16/bits/regex_scanner.tcc:98
         #1 0x7b9253bffd19 in std::__detail::_Scanner<char>::_M_advance() 
/usr/include/c++/16/bits/regex_scanner.tcc:79
         #2 0x7b9253c0386a in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> 
>::_M_match_token(std::__detail::_ScannerBase::_TokenT) 
/usr/include/c++/16/bits/regex_compiler.tcc:578
         #3 0x7b9253c48635 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_try_char() 
/usr/include/c++/16/bits/regex_compiler.tcc:565
         #4 0x7b9253c2a588 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_atom() 
/usr/include/c++/16/bits/regex_compiler.tcc:313
         #5 0x7b9253c2a588 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_term() 
/usr/include/c++/16/bits/regex_compiler.tcc:136
         #6 0x7b9253c2a588 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() 
/usr/include/c++/16/bits/regex_compiler.tcc:118
         #7 0x7b9253c297c5 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() 
/usr/include/c++/16/bits/regex_compiler.tcc:121
         #8 0x7b9253c297c5 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() 
/usr/include/c++/16/bits/regex_compiler.tcc:121
         #9 0x7b9253c297c5 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() 
/usr/include/c++/16/bits/regex_compiler.tcc:121
         #10 0x7b9253c297c5 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() 
/usr/include/c++/16/bits/regex_compiler.tcc:121
         #11 0x7b9253c297c5 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() 
/usr/include/c++/16/bits/regex_compiler.tcc:121
         #12 0x7b9253c297c5 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() 
/usr/include/c++/16/bits/regex_compiler.tcc:121
         #13 0x7b9253c297c5 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_alternative() 
/usr/include/c++/16/bits/regex_compiler.tcc:121
         #14 0x7b9253c32184 in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_M_disjunction() 
/usr/include/c++/16/bits/regex_compiler.tcc:94
         #15 0x7b9253c34fba in 
std::__detail::_Compiler<std::__cxx11::regex_traits<char> >::_Compiler(char 
const*, char const*, std::locale const&, 
std::regex_constants::syntax_option_type) 
/usr/include/c++/16/bits/regex_compiler.tcc:79
         #16 0x7b9253c34fba in std::__cxx11::basic_regex<char, 
std::__cxx11::regex_traits<char> >::_M_compile(char const*, char const*, 
std::regex_constants::syntax_option_type) [clone .constprop.0] 
/usr/include/c++/16/bits/regex.h:831
         #17 0x7b9253bebb42 in std::__cxx11::basic_regex<char, 
std::__cxx11::regex_traits<char> >::basic_regex(char const*, 
std::regex_constants::syntax_option_type) /usr/include/c++/16/bits/regex.h:495
         #18 0x7b9253bebb42 in ProcessProfileValue(std::basic_string_view<char, 
std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> 
>, std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >&, AdbcError*) 
c/driver_manager/adbc_driver_manager_profiles.cc:214
         #19 0x7b9253ad4bb1 in InternalInitializeProfile(TempDatabase*, 
std::basic_string_view<char, std::char_traits<char> >, AdbcError*) 
c/driver_manager/adbc_driver_manager.cc:584
         #20 0x7b9253ad98d4 in InternalAdbcParseOptions(TempDatabase*, 
AdbcError*) c/driver_manager/adbc_driver_manager.cc:483
         #21 0x7b9253bc1906 in AdbcDatabaseInit 
c/driver_manager/adbc_driver_manager_api.cc:663
         #22 0x7b9253a8b747 in RAdbcDatabaseInit 
/data/localhost/ripley/R/packages/tests-gcc-SAN/adbcdrivermanager/src/radbc.cc:241
         #23 0x00000075c146 in R_doDotCall 
/data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:757
         #24 0x0000008fecf7 in bcEval_loop 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8700
         #25 0x0000008d5ffb in bcEval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533
         #26 0x00000087763a in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167
         #27 0x00000088de4a in R_execClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398
         #28 0x000000891add in applyClosure_core 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314
         #29 0x000000ab9c96 in Rf_applyClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333
         #30 0x000000ab9c96 in applyMethod 
/data/localhost/ripley/R/svn/R-devel/src/main/objects.c:120
         #31 0x000000abd773 in dispatchMethod 
/data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473
         #32 0x000000abf725 in Rf_usemethod.isra.0 
/data/localhost/ripley/R/svn/R-devel/src/main/objects.c:513
         #33 0x000000ac04e3 in do_usemethod 
/data/localhost/ripley/R/svn/R-devel/src/main/objects.c:579
         #34 0x0000008f4e6c in bcEval_loop 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170
         #35 0x0000008d5ffb in bcEval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533
         #36 0x00000087763a in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167
         #37 0x00000088de4a in R_execClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398
         #38 0x000000891add in applyClosure_core 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314
         #39 0x000000877ce8 in Rf_applyClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333
         #40 0x000000877ce8 in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278
         #41 0x0000008a601e in do_set 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3585
         #42 0x000000878116 in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1230
         #43 0x00000088c4ae in do_begin 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3001
         #44 0x000000878116 in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1230
         #45 0x0000008b03e9 in do_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3975
         #46 0x0000008eb0fb in bcEval_loop 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8150
         #47 0x0000008d5ffb in bcEval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533
         #48 0x00000087763a in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167
         #49 0x00000088de4a in R_execClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398
         #50 0x000000891add in applyClosure_core 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314
         #51 0x000000877ce8 in Rf_applyClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333
         #52 0x000000877ce8 in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278
         #53 0x0000008b10e2 in do_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3993
         #54 0x0000008eb0fb in bcEval_loop 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8150
         #55 0x0000008d5ffb in bcEval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533
         #56 0x00000087763a in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167
         #57 0x00000088de4a in R_execClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398
         #58 0x000000891add in applyClosure_core 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314
         #59 0x000000893849 in Rf_applyClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333
         #60 0x000000893849 in R_forceAndCall 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2465
         #61 0x00000049fa67 in do_lapply 
/data/localhost/ripley/R/svn/R-devel/src/main/apply.c:75
         #62 0x000000ab8a51 in do_internal 
/data/localhost/ripley/R/svn/R-devel/src/main/names.c:1425
         #63 0x0000008f4e6c in bcEval_loop 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170
         #64 0x0000008d5ffb in bcEval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533
         #65 0x00000087763a in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167
         #66 0x00000088de4a in R_execClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398
         #67 0x000000891add in applyClosure_core 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314
         #68 0x000000877ce8 in Rf_applyClosure 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333
         #69 0x000000877ce8 in Rf_eval 
/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278
         #70 0x000000a1e808 in Rf_ReplIteration 
/data/localhost/ripley/R/svn/R-devel/src/main/main.c:264
         #71 0x000000a1e808 in R_ReplConsole 
/data/localhost/ripley/R/svn/R-devel/src/main/main.c:317
         #72 0x000000a3c49a in run_Rmainloop 
/data/localhost/ripley/R/svn/R-devel/src/main/main.c:1237
         #73 0x000000a3c532 in Rf_mainloop 
/data/localhost/ripley/R/svn/R-devel/src/main/main.c:1244
         #74 0x000000411faf in main 
/data/localhost/ripley/R/svn/R-devel/src/main/Rmain.c:29
         #75 0x7f926200a680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) 
(BuildId: 17f2e1fd905f485786f6fd6e3bede4ad737137e7)
         #76 0x7f926200a797 in __libc_start_main@GLIBC_2.2.5 
(/lib64/libc.so.6+0x3797) (BuildId: 17f2e1fd905f485786f6fd6e3bede4ad737137e7)
         #77 0x000000412974 in _start 
(/data/localhost/ripley/R/gcc-SAN3/bin/exec/R+0x412974) (BuildId: 
4c3b14fead8430734d8e34ebd074e42f20fdd4e4)
     
     0x7b92540c9578 is located 40 bytes before global variable '*.LC62' defined 
in './adbcdrivermanager.so.ltrans10.ltrans' (0x7b92540c95a0) of size 33
       '*.LC62' is ascii string '/usr/include/c++/16/bits/regex.h'
     0x7b92540c9578 is located 0 bytes after global variable '*.LC60' defined 
in './adbcdrivermanager.so.ltrans10.ltrans' (0x7b92540c9560) of size 24
       '*.LC60' is ascii string '\{\{\s*([^{}]*?)\s*\}\}'
     SUMMARY: AddressSanitizer: global-buffer-overflow 
c/driver_manager/adbc_driver_manager_profiles.cc:214 in 
ProcessProfileValue(std::basic_string_view<char, std::char_traits<char> >, 
std::basic_string_view<char, std::char_traits<char> >, 
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
>&, AdbcError*)
     Shadow bytes around the buggy address:
       0x7b92540c9280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02
       0x7b92540c9300: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
       0x7b92540c9380: 00 00 00 00 00 00 01 f9 f9 f9 f9 f9 00 00 00 01
       0x7b92540c9400: f9 f9 f9 f9 00 07 f9 f9 f9 f9 f9 f9 07 f9 f9 f9
       0x7b92540c9480: f9 f9 f9 f9 00 05 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
     =>0x7b92540c9500: f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9 00 00 00[f9]
       0x7b92540c9580: f9 f9 f9 f9 00 00 00 00 01 f9 f9 f9 f9 f9 f9 f9
       0x7b92540c9600: 00 00 00 00 06 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
       0x7b92540c9680: 00 03 f9 f9 f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9
       0x7b92540c9700: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
       0x7b92540c9780: 00 05 f9 f9 f9 f9 f9 f9 00 00 00 00 06 f9 f9 f9
     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
     ==724491==ABORTING
   * DONE
   Status: 1 ERROR
   ```
   
   ### How can we reproduce the bug?
   
   _No response_
   
   ### Environment/Setup
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to