rockchip-linux / mpp

Media Process Platform (MPP) module
596 stars 172 forks source link

使用rkmpp 在香橙派上进行硬件编码,使用valgrind 查看内存情况,报Invalid read of size 8 和 Invalid free() / delete / delete[] / realloc() #514

Open haozizhuimao opened 10 months ago

haozizhuimao commented 10 months ago

==231127== Invalid read of size 8 ==231127== at 0x50230DC: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x1515ff00 is 0 bytes inside a block of size 64 free'd ==231127== at 0x4867AD0: free (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023113: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x486A304: memalign (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x486A477: posix_memalign (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x514707B: os_malloc (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x5146367: mpp_osal_malloc (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x5022E13: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const*, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x50230E8: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x1515ff18 is 24 bytes inside a block of size 64 free'd ==231127== at 0x4867AD0: free (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023113: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x486A304: memalign (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x486A477: posix_memalign (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x514707B: os_malloc (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x5146367: mpp_osal_malloc (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x5022E13: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E664: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3270 is 64 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 4 ==231127== at 0x501E678: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e32f8 is 200 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E784: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e32d8 is 168 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E698: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e32a0 is 112 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E6A8: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e32a8 is 120 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E6BC: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e33b0 is 384 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid write of size 8 ==231127== at 0x501E6C0: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3280 is 80 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E6D4: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3230 is 0 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E6F4: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3238 is 8 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E714: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3240 is 16 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E734: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3248 is 24 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E754: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3268 is 56 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x501E764: Mpp::clear() (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3270 is 64 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid read of size 8 ==231127== at 0x50217A0: mpp_dump_deinit (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x50230F7: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: __cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: __run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e32f0 is 192 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid free() / delete / delete[] / realloc() ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x144e3230 is 0 bytes inside a block of size 392 free'd ==231127== at 0x48682F0: operator delete(void, unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023107: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x48657B8: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5022E2F: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== Invalid free() / delete / delete[] / realloc() ==231127== at 0x4867AD0: free (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023113: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A776B: VideoEncoder::~VideoEncoder() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48AA463: EncodeManage::~EncodeManage() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4E7D387: cxa_finalize (cxa_finalize.c:83) ==231127== by 0x48A68E7: ??? (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x4005397: _dl_fini (dl-fini.c:142) ==231127== by 0x4E7CDE7: run_exit_handlers (exit.c:113) ==231127== by 0x4E7CF0B: exit (exit.c:143) ==231127== by 0x4E673FF: (below main) (libc_start_call_main.h:74) ==231127== Address 0x1515ff00 is 0 bytes inside a block of size 64 free'd ==231127== at 0x4867AD0: free (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x5023113: mpp_destroy (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A76EF: VideoEncoder::Release() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A877B: EncodeManage::EndEncode() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D6B: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== Block was alloc'd at ==231127== at 0x486A304: memalign (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x486A477: posix_memalign (in /usr/libexec/valgrind/vgpreload_memcheck-arm64-linux.so) ==231127== by 0x514707B: os_malloc (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x5146367: mpp_osal_malloc (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x5022E13: mpp_create (in /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0) ==231127== by 0x48A7FDF: VideoEncoder::InitMppAPI() (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A81E7: VideoEncoder::Init(FrameInfo const&, StreamInfo const&, std::function<void (unsigned char, unsigned int)> const&, SpsHeader) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x48A8647: EncodeManage::Init(char const*, FrameInfo const&, StreamInfo const&) (in /home/orangepi/yuehao/code/bin/libblaze_linux/libDetectSDK.so) ==231127== by 0x109D63: main (in /home/orangepi/yuehao/code/bin/testsdkdemo) ==231127== ==231127== ==231127== HEAP SUMMARY: ==231127== in use at exit: 477,677 bytes in 3,857 blocks ==231127== total heap usage: 138,705 allocs, 134,850 frees, 3,175,686,586 bytes allocated ==231127== ==231127== LEAK SUMMARY: ==231127== definitely lost: 0 bytes in 0 blocks ==231127== indirectly lost: 0 bytes in 0 blocks ==231127== possibly lost: 0 bytes in 0 blocks ==231127== still reachable: 475,661 bytes in 3,836 blocks ==231127== suppressed: 0 bytes in 0 blocks ==231127== Reachable blocks (those to which a pointer was found) are not shown. ==231127== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==231127== ==231127== For lists of detected and suppressed errors, rerun with: -s ==231127== ERROR SUMMARY: 21 errors from 18 contexts (suppressed: 0 from 0)

HermanChen commented 10 months ago

mpp 实体被放到全局析构里去反初始化么?尽量不要这样做 因为 C++ 的全局析构运行顺序不是固定的,可能一些资源已经被释放了,mpp 的析构才被调用