disable macro buffer in asan mode

This commit is contained in:
chaser-ch
2022-04-12 20:45:30 +08:00
committed by LINxiansheng
parent d47e160a68
commit 3edc7f7144

View File

@ -42,12 +42,14 @@ ObSelfBufferWriter::~ObSelfBufferWriter()
char *ObSelfBufferWriter::alloc(const int64_t size) char *ObSelfBufferWriter::alloc(const int64_t size)
{ {
char *data = NULL; char *data = NULL;
#ifndef OB_USE_ASAN
if (size == macro_block_mem_ctx_.get_block_size()) { if (size == macro_block_mem_ctx_.get_block_size()) {
data = (char *)macro_block_mem_ctx_.alloc(); data = (char *)macro_block_mem_ctx_.alloc();
if (OB_ISNULL(data)) { if (OB_ISNULL(data)) {
STORAGE_LOG(WARN, "fail to alloc buf from mem ctx", K(size)); STORAGE_LOG(WARN, "fail to alloc buf from mem ctx", K(size));
} }
} }
#endif
// alloc from mem ctx fail // alloc from mem ctx fail
if (OB_ISNULL(data)) { if (OB_ISNULL(data)) {