Closed mattdowle closed 3 years ago
Hi Matt. Thanks for the service. Wasn't aware of this -Wstringop-overflow= Is this holding you back from releasing data.table to CRAN?
And Matt, just wanted to let you know data.table is GREAT! And many thanks for the efforts on that package.
Sure thing. Thanks. No it's not holding the release up.
A similar problem with another package (Rgraphviz
) was solved by using -O2
instead of -O3
. So I tried that for crfsuite
too, and lucky me, it worked.
I did look at the line of code in your package, and it's only 2 lines in that function :
static int read_uint8(const uint8_t* buffer, uint8_t* value)
{
*value = *buffer; // line 127
return sizeof(*value);
}
For the life of me, that looks fine to me. I can't see how there could ever be an overflow with that simple assign and that function signature.
So, since R CMD check crfsuite_0.3.4.tar.gz
passes flawlessly with -O2
, I'd put it down to a possible problem in the compiler with -O3
.
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 10.2.0-13ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-JvwpWM/gcc-10-10.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-JvwpWM/gcc-10-10.2.0/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Ubuntu 10.2.0-13ubuntu1)
Thanks for the doing the code inspection and providing your C expert knowledge.
Hi, Thanks for using data.table. In revdep testing for the next release, I'm seeing the following compiler warning for
crfsuite
. I see everything is fully OK on CRAN, though. I have just upgraded to gcc 10.2.0 so maybe that's why. I'm surprised though as usually CRAN is the first to use latest compilers and spot things like this first. Best, Matt