-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 reports use-after-free within zstd mempool #12215
Comments
cc @BrainSlayer (as he wrote most of the current allocator) |
not sure if this is a false positive due the way this allocator is working. this is no allocator which frees memory after it has been allocated and used. its a memory cache which keeps allocated memory for reuse to avoid reallocation delays. i also cannot find any bug in the code while reviewing. and no crash has been ever observed in it, in its daily use. a use after free would lead to crashes at a certain point. if something find something i would be happy to know about it. but i cannot find any issue in the code here edt: |
no error so far
|
Could this bug depend on compiler and library versions? Are you both running the same system? |
of course not. i can just talk about my system which is opensuse based in kernel 5.13 using latest trunk source + gcc 10.2.1 |
I confirm that
On top of asan problems, ubsan also reports following
|
@szubersk great! |
System information
Describe the problem you're observing
Describe how to reproduce the problem
./configure --enable-asan
, then run zloop. AddressSanitizer reportsuse-after-poison
.I can make the problem go away by changing
zstd_mempool_alloc()
to always usevmem_alloc()
(by commenting out the code above the "try lazy allocation" comment).Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: