diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-08 15:57:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-08 15:57:23 +0100 |
commit | 50eb12a8e304b345552d353668d1140b61057dd9 (patch) | |
tree | bc67a79042ed0ffcd4d4db7496c9e0dbec68cebd /external | |
parent | 126871b0715a0fd6c39102c9ed597acf53475420 (diff) |
external/boost: Silence -fsanitize=nonnull-attribute
...as reported e.g. during CppunitTest_sw_odfimport:
> /workdir/UnpackedTarball/boost/boost/circular_buffer/debug.hpp:37:17: runtime error: null pointer passed as argument 1, which is declared to never be null
> /usr/include/string.h:62:62: note: nonnull attribute specified here
> #0 0x2b24bc0e6389 in void boost::cb_details::do_fill_uninitialized_memory<SwFrameFormat*>(SwFrameFormat**, unsigned long) /workdir/UnpackedTarball/boost/boost/circular_buffer/debug.hpp:37:5
> #1 0x2b24bc0e5b48 in boost::circular_buffer<SwFrameFormat*, std::allocator<SwFrameFormat*> >::allocate(unsigned long) /workdir/UnpackedTarball/boost/boost/circular_buffer/base.hpp:2375:9
> #2 0x2b24bc0e545a in boost::circular_buffer<SwFrameFormat*, std::allocator<SwFrameFormat*> >::initialize_buffer(unsigned long) /workdir/UnpackedTarball/boost/boost/circular_buffer/base.hpp:2482:18
> #3 0x2b24bc0cfaa7 in boost::circular_buffer<SwFrameFormat*, std::allocator<SwFrameFormat*> >::circular_buffer(unsigned long, std::allocator<SwFrameFormat*> const&) /workdir/UnpackedTarball/boost/boost/circular_buffer/base.hpp:1036:9
> #4 0x2b24bc068cd7 in AppendAllObjs(SwFrameFormats const*, SwFrame const*) /sw/source/core/layout/frmtool.cxx:1100:44
...
Change-Id: Id96a6127990548ab0ae2e8a02b7bec2d61094c37
Diffstat (limited to 'external')
-rw-r--r-- | external/boost/ubsan.patch.0 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/external/boost/ubsan.patch.0 b/external/boost/ubsan.patch.0 index 6ff6649dd1ee..19a77856c777 100644 --- a/external/boost/ubsan.patch.0 +++ b/external/boost/ubsan.patch.0 @@ -1,4 +1,4 @@ -Work around -fsanitize=bool +Work around -fsanitize=bool and -fsanitize=nonnull-attribute --- boost/algorithm/string/find_iterator.hpp +++ boost/algorithm/string/find_iterator.hpp @@ -11,3 +11,14 @@ Work around -fsanitize=bool {} //! Constructor +--- boost/circular_buffer/debug.hpp ++++ boost/circular_buffer/debug.hpp +@@ -34,7 +34,7 @@ + + template <class T> + inline void do_fill_uninitialized_memory(T* data, std::size_t size_in_bytes) BOOST_NOEXCEPT { +- std::memset(static_cast<void*>(data), UNINITIALIZED, size_in_bytes); ++ if (size_in_bytes != 0) std::memset(static_cast<void*>(data), UNINITIALIZED, size_in_bytes); + } + + template <class T> |