commit | 5284f386ee86f333ba546e7befc18690aba10254 | [log] [tgz] |
---|---|---|
author | Aliaksey Kandratsenka <alkondratenko@gmail.com> | Wed Jun 12 20:35:28 2024 |
committer | Aliaksey Kandratsenka <alkondratenko@gmail.com> | Wed Jun 12 20:42:29 2024 |
tree | 584cdf6cef068a93e1bed62e626b359f228d469a | |
parent | 778df41889eb562bb5e7e64526824a2604d832f9 [diff] |
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
diff --git a/src/debugallocation.cc b/src/debugallocation.cc index d5c8386..dc2ac80 100644 --- a/src/debugallocation.cc +++ b/src/debugallocation.cc
@@ -414,8 +414,10 @@ 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; }