aboutsummaryrefslogtreecommitdiffstats
path: root/gnuradio-runtime
diff options
context:
space:
mode:
authorVasil Velichkov <vvvelichkov@gmail.com>2021-10-22 14:20:49 +0300
committermormj <34754695+mormj@users.noreply.github.com>2021-12-02 17:37:43 -0500
commit696af48e7f245bc85f3c62cae496b35882c01b2c (patch)
treeb373ace56e80200997be957343f55fa23cb8ea6a /gnuradio-runtime
parentRelease Candidate 3.10.0.0-rc1 (diff)
downloadgnuradio-696af48e7f245bc85f3c62cae496b35882c01b2c.tar.xz
gnuradio-696af48e7f245bc85f3c62cae496b35882c01b2c.zip
runtime: Fix alloc-dealloc-mismatch in host_buffer
ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x631000028800 #0 0x7f87c88129d7 in operator delete(void*, unsigned long) (/lib64/libasan.so.6+0xad9d7) #1 0x7f87c5378c57 in std::default_delete<char>::operator()(char*) const /usr/include/c++/10/bits/unique_ptr.h:85 #2 0x7f87c5378c57 in std::unique_ptr<char, std::default_delete<char> >::~unique_ptr() /usr/include/c++/10/bits/unique_ptr.h:361 #3 0x7f87c5378c57 in gr::host_buffer::~host_buffer() /home/user/src/gnuradio/gnuradio-runtime/lib/host_buffer.cc:65 #4 0x7f87c5384654 in gr::host_buffer::~host_buffer() /home/user/src/gnuradio/gnuradio-runtime/lib/host_buffer.cc:65 0x631000028800 is located 0 bytes inside of 65536-byte region [0x631000028800,0x631000038800) allocated by thread T0 here: #0 0x7f87c8811cb7 in operator new[](unsigned long) (/lib64/libasan.so.6+0xaccb7) #1 0x7f87c5377a7a in gr::host_buffer::do_allocate_buffer(unsigned long, unsigned long) /home/user/src/gnuradio/gnuradio-runtime/lib/host_buffer.cc:123 #2 0x7f87c56deebf (/home/user/src/gnuradio/build/gnuradio-runtime/lib/libgnuradio-runtime.so.3.10.0git+0x3475ebf) Signed-off-by: Vasil Velichkov <vvvelichkov@gmail.com>
Diffstat (limited to 'gnuradio-runtime')
-rw-r--r--gnuradio-runtime/include/gnuradio/host_buffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnuradio-runtime/include/gnuradio/host_buffer.h b/gnuradio-runtime/include/gnuradio/host_buffer.h
index a99519bfa..61096ffbb 100644
--- a/gnuradio-runtime/include/gnuradio/host_buffer.h
+++ b/gnuradio-runtime/include/gnuradio/host_buffer.h
@@ -95,7 +95,7 @@ public:
private:
// This is the simulated device buffer
- std::unique_ptr<char> d_device_buf;
+ std::unique_ptr<char[]> d_device_buf;
char* d_device_base;
/*!