zstd
                                
                                 zstd copied to clipboard
                                
                                    zstd copied to clipboard
                            
                            
                            
                        LLVM mingw bug AddressSanitizer: use-after-poison on address
Describe the bug
when build with https://github.com/mstorsjo/llvm-mingw and CMAKE,  zstd make app crash with AddressSanitizer: use-after-poison on address
To Reproduce Steps to reproduce the behavior:
- download llvm mingw for ubuntu
- build zstd with cmake
- create libuv thread and use ZSTD_compress
- app late crash with AddressSanitizer: use-after-poison on address
remove the only one function call from ZSTD_compress fix the problem.
Expected behavior expect it work without crash.
Desktop (please complete the following information):
- OS: win10
- Compiler llvm mingw clang
- Flags  -O1 -g
- Build system  cmake  -DBUILD_SHARED_LIBS=OFF -DZSTD_BUILD_SHARED=OFF -DZSTD_MULTITHREAD_SUPPORT=OFF -DZSTD_BUILD_PROGRAMS=OFF
remove ZSTD, or change ZSTD into lz4 both fix the problem.
Thanks for the report! Could you share the exact code you're using to call ZSTD_compress? (You could create a GitHub Gist of that code and share that link with me).
https://gist.github.com/calvin2021y/955910b52c46773a846dcad856a01fcd
@calvin2021y, can you share a little more about this issue? I don't see -fsanitize=address in the list of arguments you're providing to the build.