Solve CRAN issues from Rcpp with UBSAN #76
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should fix the UBSAN issues reported by CRAN:
/data/gannet/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:340:62: runtime error: reference binding to misaligned address 0x000000000001 for type 'type', which requires 4 byte alignment
0x000000000001: note: pointer points here
#0 0x7f9168fd9ee9 in Rcpp::Vector<13, Rcpp::PreserveStorage>::operator /data/gannet/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:340
#1 0x7f9168fd9ee9 in extract_float_vector(Rcpp::S4_ImplRcpp::PreserveStorage) /data/gannet/ripley/R/packages/tests-gcc-SAN/rsparse/src/utils.cpp:124
#2 0x7f916907dc44 in als_implicit_float(Rcpp::S4_ImplRcpp::PreserveStorage const&, Rcpp::S4_ImplRcpp::PreserveStorage&, Rcpp::S4_ImplRcpp::PreserveStorage&, Rcpp::S4_ImplRcpp::PreserveStorage&, double, int, unsigned int, unsigned int, bool, bool, double, Rcpp::S4_ImplRcpp::PreserveStorage&, bool) /data/gannet/ripley/R/packages/tests-gcc-SAN/rsparse/src/wrmf_implicit.cpp:27
#3 0x7f9168ec9a08 in _rsparse_als_implicit_float /data/gannet/ripley/R/packages/tests-gcc-SAN/rsparse/src/RcppExports.cpp:413
#4 0x58bccb in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:813
#5 0x653b17 in bcEval_loop /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:8690
#6 0x68e822 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7523
#7 0x68f09a in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1167
#8 0x694dfe in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2398
#9 0x697268 in applyClosure_core /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2311
#10 0x68f6ad in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2333
#11 0x68f6ad in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1285
#12 0x69988b in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3009
#13 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#14 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#15 0x69988b in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3009
#16 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#17 0x694dfe in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2398
#18 0x697268 in applyClosure_core /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2311
#19 0x68f6ad in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2333
#20 0x68f6ad in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1285
#21 0x69d4b7 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3581
#22 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#23 0x69988b in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3009
#24 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#25 0x6a5ecc in do_for /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2891
#26 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#27 0x69988b in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3009
#28 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#29 0x694dfe in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2398
#30 0x697268 in applyClosure_core /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2311
#31 0x68f6ad in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2333
#32 0x68f6ad in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1285
#33 0x69d4b7 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3581
#34 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#35 0x69988b in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3009
#36 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#37 0x6a5ecc in do_for /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2891
#38 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#39 0x69988b in do_begin /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3009
#40 0x68fad8 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1237
#41 0x6a0fe2 in do_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3955
#42 0x64de4f in bcEval_loop /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:8140
#43 0x68e822 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7523
#44 0x68f09a in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1167
#45 0x694dfe in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2398
#46 0x697268 in applyClosure_core /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2311
#47 0x68f6ad in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2333
#48 0x68f6ad in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1285
#49 0x6a1e37 in do_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:3973
#50 0x64de4f in bcEval_loop /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:8140
#51 0x68e822 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7523
#52 0x68f09a in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1167
#53 0x694dfe in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2398
#54 0x697268 in applyClosure_core /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2311
#55 0x69e493 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2333
#56 0x69e493 in R_forceAndCall /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2465
#57 0x451404 in do_lapply /data/gannet/ripley/R/svn/R-devel/src/main/apply.c:75
#58 0x7420d7 in do_internal /data/gannet/ripley/R/svn/R-devel/src/main/names.c:1409
#59 0x63f4f9 in bcEval_loop /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:8160
#60 0x68e822 in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7523
#61 0x68f09a in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1167
#62 0x694dfe in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2398
#63 0x697268 in applyClosure_core /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2311
#64 0x68f6ad in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2333
#65 0x68f6ad in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1285
#66 0x714e9e in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:263
#67 0x715511 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:315
#68 0x715654 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1217
#69 0x7156a2 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1224
#70 0x41a7d8 in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29
#71 0x7f917ec2950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#72 0x7f917ec295c8 in __libc_start_main_alias_2 (/lib64/libc.so.6+0x295c8) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#73 0x41d034 in _start (/data/gannet/ripley/R/gcc-SAN/bin/exec/R+0x41d034) (BuildId: 56ff6b70c40a24eccf16f0ce952f5ebd85884520)