src: improve memory sanitizer handling

This commit is contained in:
Markus F.X.J. Oberhumer
2023-09-26 15:15:55 +02:00
parent a24de15060
commit 39a6cc4b5f
5 changed files with 46 additions and 9 deletions
+10 -4
View File
@@ -34,6 +34,16 @@
#include "headers.h"
#include "version.h"
#if !defined(__has_attribute)
#define __has_attribute(x) 0
#endif
#if !defined(__has_builtin)
#define __has_builtin(x) 0
#endif
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif
// reserve name "upx" for namespace
namespace upx {}
@@ -319,10 +329,6 @@ inline void NO_fprintf(FILE *, const char *, ...) noexcept attribute_format(2, 3
inline void NO_printf(const char *, ...) noexcept {}
inline void NO_fprintf(FILE *, const char *, ...) noexcept {}
#if !defined(__has_builtin)
# define __has_builtin(x) 0
#endif
#if __has_builtin(__builtin_memcpy_inline)
# define upx_memcpy_inline __builtin_memcpy_inline
#elif __has_builtin(__builtin_memcpy)