allow disabling actual versus given sized delete checking
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279560#c10 and https://github.com/llvm/llvm-project/pull/90292
This commit is contained in:
parent
778df41889
commit
5284f386ee
|
@ -414,8 +414,10 @@ class MallocBlock {
|
|||
alloc_map_lock_.Unlock();
|
||||
// clear us
|
||||
const size_t size = real_size();
|
||||
#if !defined(TCMALLOC_DONT_VERIFY_SIZE)
|
||||
RAW_CHECK(!given_size || given_size == size1_,
|
||||
"right size must be passed to sized delete");
|
||||
#endif
|
||||
memset(this, kMagicDeletedByte, size);
|
||||
return size;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue