byronknoll/cmix

[BUG]: ERROR alloc-dealloc-mismatch

Closed this issue · 1 comments

Crash Inputs

Here is the crash file that trigger the error
cmix_asan_crash_alloc-dealloc-mismatch.zip

Bug Description:

When executing cmix (new release version) with the file inputs and parameter "-n", the ASan (Memory Sanitizer ) instrumented program terminates with Nonfatal Error shown below.

Detected block types: DEFAULT: 100.0%
94 bytes -> 78 bytes in 11.84 s.
cross entropy: 6.638
=================================================================
==43536==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x611000011fc0
    #0 0x4fb322 in operator delete(void*) (/cmix/cmix_asan+0x4fb322)
    #1 0x620b7b in paq8::OLS<double, unsigned char, true>::~OLS() /cmix/src/models/paq8.cpp:1426:5
    #2 0x41d8c0 in __cxx_global_array_dtor.138 /cmix/src/models/paq8.cpp:4480:77
    #3 0x7f0b30afc030 in __run_exit_handlers /build/glibc-CVJwZb/glibc-2.27/stdlib/exit.c:108
    #4 0x7f0b30afc129 in exit /build/glibc-CVJwZb/glibc-2.27/stdlib/exit.c:139
    #5 0x7f0b30adac8d in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:344
    #6 0x41f819 in _start (/cmix/cmix_asan+0x41f819)

0x611000011fc0 is located 0 bytes inside of 256-byte region [0x611000011fc0,0x6110000120c0)
allocated by thread T0 here:
    #0 0x4fa872 in operator new[](unsigned long) (/cmix/cmix_asan+0x4fa872)
    #1 0x6205e5 in paq8::OLS<double, unsigned char, true>::OLS(int, int, double, double) /cmix/src/models/paq8.cpp:1416:9

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/cmix/cmix_asan+0x4fb322) in operator delete(void*)

Step to reproduce

  • download the cmix from github and build it with ASAN
  • Execute cmix with provide files and given parameters "-n".

Thanks for the bug report, fixed.