- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在为这个问题挠头。如何重现 CRAN's gcc ubsan tests of my package的结果在家里,在 ubuntu 上? (准备步骤说明来自here)
1) 我安装更新所有需要的包:
apt-get update
apt-get install bash-completion bison debhelper default-jdk g++ gcc gfortran groff-base libblas-dev libbz2-dev libcairo2-dev libcurl4-openssl-dev libjpeg-dev liblapack-dev liblzma-dev libncurses5-dev libpango1.0-dev libpcre3-dev libpng-dev libreadline-dev libtiff5-dev libx11-dev libxt-dev mpack subversion tcl8.5-dev texinfo texlive-base texlive-extra-utils texlive-fonts-extra texlive-fonts-recommended texlive-generic-recommended texlive-latex-base texlive-latex-extra texlive-latex-recommended tk8.5-dev valgrind x11proto-core-dev xauth xdg-utils xfonts-base xvfb zlib1g-dev
2) 使用所需选项构建 Rdevel:
cd /tmp
svn co http://svn.r-project.org/R/trunk R-devel
cd /tmp/R-devel
R_PAPERSIZE=letter R_BATCHSAVE="--no-save --no-restore" PAGER=/usr/bin/pager PERL=/usr/bin/perl R_UNZIPCMD=/usr/bin/unzip R_ZIPCMD=/usr/bin/zip R_PRINTCMD=/usr/bin/lpr LIBnn=lib AWK=/usr/bin/awk CFLAGS="-pipe -std=gnu99 -Wall -pedantic -O2" CXXFLAGS="-pipe -Wall -pedantic -O2" CC="gcc -fsanitize=address,undefined" CXX="g++ -fsanitize=address,undefined" CXX1X="g++ -fsanitize=address,undefined" FC="gfortran -fsanitize=address,undefined" F77="gfortran -fsanitize=address,undefined" ./configure --enable-R-shlib --without-blas --without-lapack --with-readline --without-recommended-packages --program-suffix=dev --disable-openmp
make
make install
make clean
3) 最后,使用 as-cran 标志在本地构建/编译所述包:
wget https://cran.r-project.org/src/contrib/FastRCS_0.0.6.tar.gz
tar -xvzf FastRCS_0.0.6.tar.gz
Rdevel CMD check --as-cran FastRCS
但我没有得到与 cran 相同的错误报告(参见 here )。我的意思是例如这个:
/usr/local/gcc5/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include/emmintrin.h:140:21: runtime error: load of misaligned address 0x61800007fc84 for type 'const double', which requires 8 byte alignment
0x61800007fc84: note: pointer points here
00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f 00 00 80 3f
我使用的脚本有什么问题?
最佳答案
另一个开箱即用的解决方案似乎是使用 r-hub package/service ,其工作方式与 devtools::check()
类似,您只需要运行
rhub::check_with_sanitizers()
关于在 ubuntu 上重现 CRAN GCC-UBSAN 测试结果 'at home',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33178878/
我想使用 UBSAN(未定义行为 sanitizer ),但发现它完全没有值(value),因为它会报告许多误报。 例如。一个简单的std::make_shared(42);足以触发警告,如 memb
当启用未定义的 sanitizer 时,我在 GNU 科学库 (GSL) 中发现了一个运行时错误: deque.c:58:11: runtime error: member access within
使用 clang 的 ubsan 运行来自 boost 版本 1.64 的 gzip.hpp 代码会给出以下消息: path/to/boost/1_64_0/include/boost/iostrea
我的大部分 -fsanitize=unsigned-integer-overflow 错误都是错误,但有时我会按预期明确使用它,这会导致 UBSan 产生误报。 有没有办法为特定表达式关闭 UBSan
这个问题不是关于未对齐数据访问的定义,而是为什么 memcpy 沉默了 UBsan 的发现,而类型转换却没有,尽管生成了相同的汇编代码。 我有一些示例代码来解析发送字节数组的协议(protocol),
我想用 -fsanitize=address,undefined 运行我的单元测试套件并将所有 sanitizer 错误写入 report.txt文件。默认情况下,所有 sanitizer 错误都会写
我在这里有一个小的单元测试,它具有未定义的行为。 源代码: #include TEST(test, test) { int k = 0x7fffffff; k += 1; // ca
最新版本的 GCC 和 Clang 具有未定义行为 sanitizer (UBSan),它是一个编译标志 (-fsanitize=undefined),可添加运行时检测代码。出现错误时,会显示如下警告
我正在尝试通过一个函数指针表调用一些 C++ 函数,该函数指针表作为 C 符号从共享对象中导出。该代码实际上可以正常工作,但 Clang 的未定义行为 sanitizer (= UBSan)认为我进行
简单代码片段: #define FOO 7 int bar = -875; bar <<= FOO; UBSAN 将此事报告为 UB。 我的理解是-875 << 7只是 -(875<<7)并且没有溢出
我试图理解我们最近在使用 Clang 5.0 和未定义行为 sanitizer (UBsan) 时解决的问题。我们有在向前或向后方向处理缓冲区的代码。简化的大小写是 similar to the co
拿下面的测试程序(用clang 3.4编译,在gdb 7.6.1下运行): #include #include int main(void) { int a = INT_MAX + 1;
以下代码用clang UBSAN编译会崩溃 #include #include #include #include template inline std::string floatToStr
我们使用以下代码来确定是否在编译时为 clang 和 gcc 指定了 -fsanitize=address。我们如何确定是否指定了 -fsanitize=undefined? bool isS
我正在尝试为我的 R 包复制 CRAN sanitizer 故障,该包依赖于 rocker/r-devel-ubsan-clang docker 镜像上的 Rcpp。 当我尝试安装 Rcpp 时,我收
我正在为这个问题挠头。如何重现 CRAN's gcc ubsan tests of my package的结果在家里,在 ubuntu 上? (准备步骤说明来自here) 1) 我安装更新所有需要的包
我已经使用 -fsanitize=undefined 选项编译了我的应用程序。我现在如何测试我的应用程序是否存在未定义的行为? 另外,我该如何进行牙山检查?我用 -fsanitize=address
我是一名优秀的程序员,十分优秀!