diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 17:35:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 17:35:20 +0200 |
commit | c8346d77e73bdbe82a1eb73dd83c34ada8c68b17 (patch) | |
tree | 32c93647c381ed42dfb53de692c49525fc7694cf /external | |
parent | 42c178bef78efeaa3ab2e31ca5d466105966e5f3 (diff) |
external/coinmp: -fsanitize=nonnull-attribute
Change-Id: I487e772395defa9aae2ce3eb040b8c7d92720cb2
Diffstat (limited to 'external')
-rw-r--r-- | external/coinmp/UnpackedTarball_coinmp.mk | 1 | ||||
-rw-r--r-- | external/coinmp/ubsan.patch.0 | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/external/coinmp/UnpackedTarball_coinmp.mk b/external/coinmp/UnpackedTarball_coinmp.mk index 635deff73abc..aad0cd3be756 100644 --- a/external/coinmp/UnpackedTarball_coinmp.mk +++ b/external/coinmp/UnpackedTarball_coinmp.mk @@ -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: diff --git a/external/coinmp/ubsan.patch.0 b/external/coinmp/ubsan.patch.0 new file mode 100644 index 000000000000..157332986098 --- /dev/null +++ b/external/coinmp/ubsan.patch.0 @@ -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 |