New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alloc-dealloc-mismatch in function openWavFile #4

fouzhe opened this Issue Jul 24, 2018 · 0 comments


None yet
1 participant

fouzhe commented Jul 24, 2018

I used gcc 5.4 and AddressSanitizer to build sound, this file can cause alloc-dealloc-mismatch when executing this command:

./parseSpeech -f alloc_dealloc_mismatch_openWavFile

This is the ASAN information:

Input file : alloc_dealloc_mismatch_openWavFileSize of chunk8
wBufferLength : 1080764maxInSamples 1080764
==8789==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x7fcd33711800
    #0 0x7fcd3277cb2a in operator delete(void*) (/usr/lib/x86_64-linux-gnu/
    #1 0x407655 in WavFile::openWavFile(char*) /home/fouzhe/my_fuzz/sound/src/
    #2 0x4025c2 in main /home/fouzhe/my_fuzz/sound/
    #3 0x7fcd31a9882f in __libc_start_main (/lib/x86_64-linux-gnu/
    #4 0x402a38 in _start (/home/fouzhe/my_fuzz/sound/parseSpeech+0x402a38)

0x7fcd33711800 is located 0 bytes inside of 1080764-byte region [0x7fcd33711800,0x7fcd338195bc)
allocated by thread T0 here:
    #0 0x7fcd3277c6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/
    #1 0x4070d9 in WavFile::openWavFile(char*) /home/fouzhe/my_fuzz/sound/src/

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch ??:0 operator delete(void*)
==8789==HINT: if you don't care about these warnings you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment