external/coinmp: -fsanitize=nonnull-attribute

Change-Id: I487e772395defa9aae2ce3eb040b8c7d92720cb2
This commit is contained in:
Stephan Bergmann
2015-06-02 17:35:20 +02:00
parent 42c178bef7
commit c8346d77e7
2 changed files with 12 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
) \
$(if $(filter MACOSX,$(OS)),external/coinmp/macosx.build.patch.1) \
external/coinmp/werror-format-pedantic.patch.0 \
external/coinmp/ubsan.patch.0 \
))
# vim: set noet sw=4 ts=4:

11
external/coinmp/ubsan.patch.0 vendored Normal file
View File

@@ -0,0 +1,11 @@
--- Clp/src/ClpParameters.hpp
+++ Clp/src/ClpParameters.hpp
@@ -81,7 +81,7 @@
template <class T> inline void
ClpDisjointCopyN( const T * array, const int size, T * newArray)
{
- memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
+ if (size != 0) memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
}
/// And set
template <class T> inline void