external/coinmp: -fsanitize=nonnull-attribute
Change-Id: I487e772395defa9aae2ce3eb040b8c7d92720cb2
This commit is contained in:
1
external/coinmp/UnpackedTarball_coinmp.mk
vendored
1
external/coinmp/UnpackedTarball_coinmp.mk
vendored
@@ -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
11
external/coinmp/ubsan.patch.0
vendored
Normal 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
|
Reference in New Issue
Block a user