[PATCH] Fix for size_t in Asan's new and delete operators on x64 FreeBSD in 32-bit mode

Viktor Kutuzov vkutuzov at accesssoftek.com
Fri Feb 21 06:14:38 PST 2014


  > What is the definition of size_t on FreeBSD and shouldn't it be changed too? (in which case, please file a bug there)

    typedef unsigned long __uint64_t;  // in <machine/_types.h>
    typedef __uint64_t __size_t;  // in <machine/_types.h>
    typedef __size_t size_t;  // in lots of various headers

  It's a well-known problem with x64 FreeBSD and sure it should be fixed. There are related defects filed already;

  http://www.freebsd.org/cgi/query-pr.cgi?pr=186247

  is one of them.

  > Instead of defining another new type, can we use SIZE_T from interception/interception.h ?

  It gets defined as unsigned long whereas the compiler expects unsigned int.

http://llvm-reviews.chandlerc.com/D2856



More information about the llvm-commits mailing list