[Libreoffice-commits] core.git: external/boost

Stephan Bergmann sbergman at redhat.com
Sun Jan 8 14:59:31 UTC 2017


 external/boost/ubsan.patch.0 |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 50eb12a8e304b345552d353668d1140b61057dd9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Jan 8 15:57:23 2017 +0100

    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

diff --git a/external/boost/ubsan.patch.0 b/external/boost/ubsan.patch.0
index 6ff6649..19a7785 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>


More information about the Libreoffice-commits mailing list