Re: GCC 8: camotics fails to build for i686, ARMv7 arches (reading 31 bytes from a region of size 16)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15/02/18 07:05 -0000, Samuel Rakitničan wrote:
Hello,

Need help figuring this out since I have no idea what this means.

It means the package should probably not be using -Werror

The cbang code that is included in camotics fails to build with the following messages. It is failing only for i686 and armv7hl architectures.

So presumably some structure is smaller on 32-bit targets than the
code expects.


g++ -o build/cbang/log/Logger.o -c -std=c++11 -ggdb -Wall -Werror -I/usr/include/v8-3.14/ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -Wno-error=parentheses -Wno-deprecated-declarations -DDEBUG -D_REENTRANT -DHAVE_EXPAT -DHAVE_PTHREADS -DHAVE_LIBSQLITE -DHAVE_V8 -DDEBUG_LEVEL=1 -DUSING_CBANG -Iinclude -Isrc -Isrc/boost src/cbang/log/Logger.cpp
In file included from /usr/include/string.h:494,
                from src/boost/boost/range/detail/implementation_help.hpp:18,
                from src/boost/boost/range/end.hpp:24,
                from src/boost/boost/range/functions.hpp:19,
                from src/boost/boost/range/iterator_range_core.hpp:38,
                from src/boost/boost/range/iterator_range.hpp:13,
                from src/boost/boost/iostreams/traits.hpp:38,
                from src/boost/boost/iostreams/detail/dispatch.hpp:17,
                from src/boost/boost/iostreams/flush.hpp:17,
                from src/boost/boost/iostreams/close.hpp:18,
                from src/boost/boost/iostreams/operations.hpp:16,
                from src/cbang/http/ChunkedStreamFilter.h:41,
                from src/cbang/http/Transaction.h:37,
                from src/cbang/http/Transaction.cpp:33:
In function 'void* memcpy(void*, const void*, size_t)',
   inlined from 'std::streamsize cb::HTTP::ChunkedStreamFilter::write(Sink&, const char*, std::streamsize) [with Sink = boost::iostreams::detail::linked_streambuf<char, std::char_traits<char> >]' at src/cbang/http/ChunkedStreamFilter.h:131:19,

This code looks like:

           std::string l = String((uint64_t)n);
           writeLengthBytes = l.length() < 31 ? l.length() : 31;
           memcpy(writeLength, l.c_str(), writeLengthBytes);
           writeLength[writeLengthBytes] = 0;

That should be OK. It reads no more than l.length() from l.c_str(),
which doesn't overflow, but it says:

/usr/include/bits/string_fortified.h:34:33: error: 'void* __builtin_memcpy(void*, const void*, unsigned int)' reading 31 bytes from a region of size 16 [-Werror=stringop-overflow=]
  return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This might be a GCC bug. We'll need the preprocessed source file
Transaction.ii to analyze it.
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux