diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-03 07:45:48 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-03 07:45:48 +0200 |
commit | f146969fb3a1e8ed508f55ee38faaffd5cff2021 (patch) | |
tree | 1ec78d300d5618b2e7037b0a5970610bdfa92076 | |
parent | f3a58ed801cf381b5f84a0607b10ede305580469 (diff) | |
download | mariadb-git-f146969fb3a1e8ed508f55ee38faaffd5cff2021.tar.gz |
MDEV-22929 fixup: root_name() clash with clang++ <fstream>
The clang++ -stdlib=libc++ header file <fstream> depends on
<filesystem> that defines a member function path::root_name(),
which conflicts with the rather unused #define root_name()
that had been introduced in
commit 7c58e97bf6f80a251046c5b3e7bce826fe058bd6.
Because an instrumented -stdlib=libc++ (rather than the default
-stdlib=libstdc++) is easier to build for a working -fsanitize=memory
(cmake -DWITH_MSAN=ON), let us remove the conflicting #define for now.
-rw-r--r-- | include/my_sys.h | 1 | ||||
-rw-r--r-- | mysys/my_alloc.c | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index cc1f041a2f0..f76d1f463a7 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -873,7 +873,6 @@ extern void my_free_lock(void *ptr); #define my_malloc_lock(A,B) my_malloc(PSI_INSTRUMENT_ME, (A),(B)) #define my_free_lock(A) my_free((A)) #endif -#define root_name(A) "" #define alloc_root_inited(A) ((A)->min_malloc != 0) #define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8) #define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0) diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index edcb4ce7483..3e0b774b0c7 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -174,7 +174,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length) #if defined(HAVE_valgrind) && defined(EXTRA_DEBUG) reg1 USED_MEM *next; DBUG_ENTER("alloc_root"); - DBUG_PRINT("enter",("root: %p name: %s", mem_root, root_name(mem_root))); + DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); @@ -208,7 +208,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length) reg2 USED_MEM **prev; size_t original_length __attribute__((unused)) = length; DBUG_ENTER("alloc_root"); - DBUG_PRINT("enter",("root: %p name: %s", mem_root, root_name(mem_root))); + DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", @@ -387,8 +387,7 @@ void free_root(MEM_ROOT *root, myf MyFlags) { reg1 USED_MEM *next,*old; DBUG_ENTER("free_root"); - DBUG_PRINT("enter",("root: %p name: %s flags: %u", root, root_name(root), - (uint) MyFlags)); + DBUG_PRINT("enter",("root: %p flags: %lu", root, MyFlags)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) /* |