diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-11-01 18:23:29 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-11-01 18:23:32 +0100 |
commit | 08dfe237c83a37440da00cb75e2882f21feaf18f (patch) | |
tree | d595f2ed15b54de5d83a54fe05fc6ffb0937505c /Transceiver52M | |
parent | 444ff34396c03b7d085e6916695f4b27dbb79cc6 (diff) |
ChannelizerBase: Fix ASan alloc-dealloc-mismatch
Fixes following Adress Sanitizer warning:
=================================================================
==27120==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x60c00003d900
#0 0x7f2f216de421 in operator delete(void*, unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:151
#1 0x561641ce18b7 in ChannelizerBase::~ChannelizerBase() (/build/new/out/bin/osmo-trx-uhd+0x4a8b7)
#2 0x561641ce1cad in Channelizer::~Channelizer() (/build/new/out/bin/osmo-trx-uhd+0x4acad)
#3 0x561641cd5160 in RadioInterfaceMulti::close() (/build/new/out/bin/osmo-trx-uhd+0x3e160)
#4 0x561641cd5047 in RadioInterfaceMulti::~RadioInterfaceMulti() (/build/new/out/bin/osmo-trx-uhd+0x3e047)
#5 0x561641cd5093 in RadioInterfaceMulti::~RadioInterfaceMulti() (/build/new/out/bin/osmo-trx-uhd+0x3e093)
#6 0x561641ca3fdd in trx_stop() (/build/new/out/bin/osmo-trx-uhd+0xcfdd)
#7 0x561641ca4b32 in main (/build/new/out/bin/osmo-trx-uhd+0xdb32)
#8 0x7f2f1f555222 in __libc_start_main (/usr/lib/libc.so.6+0x24222)
#9 0x561641ca195d in _start (/build/new/out/bin/osmo-trx-uhd+0xa95d)
0x60c00003d900 is located 0 bytes inside of 128-byte region [0x60c00003d900,0x60c00003d980)
allocated by thread T0 here:
#0 0x7f2f216dcf19 in operator new[](unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:93
#1 0x561641ce142d in ChannelizerBase::init() (/build/new/out/bin/osmo-trx-uhd+0x4a42d)
#2 0x561641cd5865 in RadioInterfaceMulti::init(int) (/build/new/out/bin/osmo-trx-uhd+0x3e865)
#3 0x561641ca1cb7 in makeRadioInterface(trx_ctx*, RadioDevice*, int) (/build/new/out/bin/osmo-trx-uhd+0xacb7)
#4 0x561641ca44c6 in trx_start(trx_ctx*) (/build/new/out/bin/osmo-trx-uhd+0xd4c6)
#5 0x561641ca4b05 in main (/build/new/out/bin/osmo-trx-uhd+0xdb05)
#6 0x7f2f1f555222 in __libc_start_main (/usr/lib/libc.so.6+0x24222)
SUMMARY: AddressSanitizer: alloc-dealloc-mismatch /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:151 in operator delete(void*, unsigned long)
==27120==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==27120==ABORTING
Change-Id: Ib7c98ae478f319573dd86a0d2cb264f676bb3859
Diffstat (limited to 'Transceiver52M')
-rw-r--r-- | Transceiver52M/ChannelizerBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Transceiver52M/ChannelizerBase.cpp b/Transceiver52M/ChannelizerBase.cpp index 8223dba..430e260 100644 --- a/Transceiver52M/ChannelizerBase.cpp +++ b/Transceiver52M/ChannelizerBase.cpp @@ -239,7 +239,7 @@ ChannelizerBase::~ChannelizerBase() for (size_t i = 0; i < m; i++) { free(subFilters[i]); - delete hist[i]; + delete[] hist[i]; } fft_free(fftInput); |