Skip to content
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

AddressSanitizer: heap-use-after-free on addres xxx #48

Open
flyinskyin2013 opened this issue Nov 15, 2024 · 0 comments
Open

AddressSanitizer: heap-use-after-free on addres xxx #48

flyinskyin2013 opened this issue Nov 15, 2024 · 0 comments

Comments

@flyinskyin2013
Copy link

Asan messages:

READ of size 173 at 0x00766930acc0 thread T7
    #0 0x76a133ab38 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827
    #1 0x76a0e1a544 in tokenizers::HFTokenizer::Decode[abi:cxx11](std::vector<int, std::allocator<int> > const&) 


0x00766930acc0 is located 0 bytes inside of 173-byte region [0x00766930acc0,0x00766930ad6d)
freed by thread T0 here:
    #0 0x76a13a9fe8 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127
    #1 0x76a0e1d654 in tokenizers_decode

previously allocated by thread T7 here:
    #0 0x76a13aa2f4 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x76a0e2abcc in alloc::str::join_generic_copy::h968362ed642e72e2

My solution:

TokenizerObj.decode() must be called in one thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant