diff options
author | Sangchul Lee <sc11.lee@samsung.com> | 2018-04-09 13:12:02 +0900 |
---|---|---|
committer | Sangchul Lee <sc11.lee@samsung.com> | 2018-04-09 16:12:28 +0900 |
commit | 9b94d75b4d732d41f30d34c6113002d87544c85a (patch) | |
tree | 80b199bcbc6dd98c683dde4be22e0c0dc897f9b7 | |
parent | 96b6897bcfc45e4013fe358eba0de0041861a71d (diff) | |
download | murphy-9b94d75b4d732d41f30d34c6113002d87544c85a.tar.gz murphy-9b94d75b4d732d41f30d34c6113002d87544c85a.tar.bz2 murphy-9b94d75b4d732d41f30d34c6113002d87544c85a.zip |
Disable calling memory checking functions temporarily in case of asan buildsubmit/tizen/20180409.075025
Change-Id: I3642a96c6ccab3c6c772f14ee369643166a8fbd8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
-rw-r--r-- | packaging/murphy.spec | 1 | ||||
-rw-r--r-- | src/common/mm.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/packaging/murphy.spec b/packaging/murphy.spec index faaa212..b58e7c3 100644 --- a/packaging/murphy.spec +++ b/packaging/murphy.spec @@ -189,6 +189,7 @@ cp %{SOURCE1001} . %build %if "%{asan}" == "1" %restore_fcommon +export CFLAGS="-DTIZEN_DISABLE_MEMORY_CHECK" %endif %if %{with debug} export CFLAGS="-O0 -g3" diff --git a/src/common/mm.c b/src/common/mm.c index a1a98a2..d6e595d 100644 --- a/src/common/mm.c +++ b/src/common/mm.c @@ -523,10 +523,12 @@ static int __passthru_memalign(void **ptr, size_t align, size_t size, return posix_memalign(ptr, align, size); } +#ifndef TIZEN_DISABLE_MEMORY_CHECK MRP_INIT static void menory_check_init() { mcheck(NULL); } +#endif static void __passthru_free(void *ptr, const char *file, int line, const char *func) @@ -536,12 +538,15 @@ static void __passthru_free(void *ptr, const char *file, int line, MRP_UNUSED(func); if (ptr == NULL) return; - +#ifdef TIZEN_DISABLE_MEMORY_CHECK + free(ptr); +#else if (mprobe(ptr) == MCHECK_OK) free(ptr); else { mrp_log_warning("Invalid pointer passed to fuction free"); } +#endif } |