[PATCH] [ASan] Get fake stack code working with GCC 4.8.2.
Jay Foad
jay.foad at gmail.com
Thu Nov 20 06:34:36 PST 2014
Unfortunately the current patch still doesn't build cleanly.
The problem is that I'm trying to move the definition of break_optimization into lib/sanitizer_common/sanitizer_common.h, but there is already another definition of break_optimization in lib/sanitizer_common/tests/sanitizer_test_utils.h.
Some tests, like lib/sanitizer_common/tests/sanitizer_allocator_test.cc, include both of these headers.
Others, like lib/asan/tests/asan_test.cc, only include sanitizer_test_utils.h.
I tried including sanitizer_common.h from sanitizer_test_utils.h but I ran into this, and I don't know how to fix it:
```
In file included from /home/jay/svn/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_interface_test.cc:15:
In file included from /home/jay/svn/llvm-project/llvm/trunk/projects/compiler-rt/include/sanitizer/asan_interface.h:17:
/home/jay/svn/llvm-project/llvm/trunk/projects/compiler-rt/include/sanitizer/common_interface_defs.h:40:5: error: typedef redefinition with different types ('struct __sanitizer_sandbox_arguments' vs 'struct __sanitizer_sandbox_arguments')
} __sanitizer_sandbox_arguments;
^
/home/jay/svn/llvm-project/llvm/trunk/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:109:5: note: previous definition is here
} __sanitizer_sandbox_arguments;
^
```
http://reviews.llvm.org/D6266
More information about the llvm-commits
mailing list