[PATCH] A couple minor changes to support sanitizers on FreeBSD 9.2

Viktor Kutuzov vkutuzov at accesssoftek.com
Tue Mar 18 03:20:07 PDT 2014

  > Why do we use
  > #define size_t unsigned
  > in lib/asan/asan_new_delete.cc instead of the fix you suggest in this patch?

  If we define _SIZE_T_DECLARED for this set of sources, then we need to define size_t in each of the sources which is a kind of mass change--no good. And then we would need both the CMakeLists.txt and the sources, so what's the profit?

  Note that inclusion of <stddef.h> doesn't help as it doesn't actually refer to the clang's one when the run-time lib get compiled first time, that is, with a host compiler.

  > What if we (say) use #define size_t unsigned for old FreeBSD in Clang's stddef.h. Would that work? Or we will have problems with functions defined between the inclusion of (broken) system headers and the inclusion of stddef.h?

  Again, it wouldn't work as we cannot rely on that the host compiler is a specific version of clang.

  Furthermore, pre-installed clang on FreeBSD is not exactly one could get with (cmake && gmake && gmake install) as FreeBSD's ports--including clang--does not use cmake and build and install from plain makefiles. The latters sometimes differ from the corresponding version of clang is expected to be. This would server as an example of such a deviation:



More information about the llvm-commits mailing list