lib/lsan/lsan_common.h
// Special case for "new T[0]" where T is a type with DTOR.
// new T[0] will allocate a cookie (one or two words) for the array size (0)
// and store a pointer to the end of allocated chunk. The actual cookie layout
// varies between platforms according to their C++ ABI implementation.
Special case for "new T[0]" where T is a type with DTOR.
new T[0] will allocate a cookie (one or two words) for the array size (0)
and store a pointer to the end of allocated chunk. The actual cookie layout
varies between platforms according to their C++ ABI implementation.
Special case for " new T [ 0 ] " where T is a type with DTOR . new T [ 0 ] will allocate a cookie ( one or two words ) for the array size ( 0 ) and store a pointer to the end of allocated chunk . The actual cookie layout varies between platforms according to their C ++ ABI implementation .
inline bool IsSpecialCaseOfOperatorNew0(uptr chunk_beg, uptr chunk_size,
                                        uptr addr) {
#if defined(__arm__)
  return IsARMABIArrayCookie(chunk_beg, chunk_size, addr);
#else
  return IsItaniumABIArrayCookie(chunk_beg, chunk_size, addr);
#endif
}
inline bool IsSpecialCaseOfOperatorNew0 ( uptr chunk_beg , uptr chunk_size , uptr addr ) { #if defined ( __arm__ ) return IsARMABIArrayCookie ( chunk_beg , chunk_size , addr ) ; #else return IsItaniumABIArrayCookie ( chunk_beg , chunk_size , addr ) ; #endif }
Special case for "new T[0]" where T is a type with DTOR.
Special case for " new T [ 0 ] " where T is a type with DTOR .