diff options
| author | 2013-06-11 13:01:11 +0000 | |
|---|---|---|
| committer | 2013-06-11 13:01:11 +0000 | |
| commit | d9c98de0989c8aaf7d2864b6c3b37bf2ac8ecf5e (patch) | |
| tree | 33590df2997f53a11e74fdea28595d9bba0d61fd /makefile | |
| parent | 28aff9d7860ace94c2b45dcd689d47a9e262dff1 (diff) | |
some MemorySanitizer preparations:
- put memory initialization in src/emu/emualloc.c behind NO_MEMORY_INITIALIZATION define
- disable memory initialization when msan is used
- use origin tracking for msan when clang is used
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -440,6 +440,12 @@ ifneq ($(BUILD_JPEGLIB),1) DEFS += -DUSE_SYSTEM_JPEGLIB endif +# disable initialization of memory in malloc overload +ifdef SANITIZE +ifneq (,$(findstring memory,$(SANITIZE))) +DEFS += -DNO_MEMORY_INITIALIZATION +endif +endif #------------------------------------------------- @@ -536,6 +542,11 @@ CCOMFLAGS += -fsanitize=$(SANITIZE) ifneq (,$(findstring thread,$(SANITIZE))) CCOMFLAGS += -fPIE endif +ifneq (,$(findstring memory,$(SANITIZE))) +ifneq (,$(findstring clang,$(CC))) +CCOMFLAGS += -fsanitize-memory-track-origins +endif +endif endif #------------------------------------------------- |
