PragmaTwice commented on PR #599: URL: https://github.com/apache/incubator-kvrocks/pull/599#issuecomment-1133908094
> @PragmaTwice How can I reproduce the memory leaks in tcl tests? I have tried to build with `ENABLE_ASAN` and run tcl tests, but can't find leaks error. Did your tcl tests pass or fail? There are some suggestions you could try: - make sure that your `./build/kvrocks` is built with `-DENABLE_ASAN=ON` and from this branch - execute `runtest` with `--dont-clean`, so you can view stdout/stderr of kvrocks after test (`grep AddressSanitizer . -r` in `./tests/tcl`) - I am using GCC 11.2 and Clang 13, and they both can make the test fail, so you could try some higher version. stderr from Clang: ``` $ rg AddressSanitizer . ./tests/tmp.bak/server.605939.3/stderr 137:SUMMARY: AddressSanitizer: 684 byte(s) leaked in 8 allocation(s). ./tests/tmp/server.724500.3/stderr 2:==726298==ERROR: AddressSanitizer: heap-use-after-free on address 0x608000020068 at pc 0x56231866985d bp 0x7fc7b4180570 sp 0x7fc7b4180568 81:SUMMARY: AddressSanitizer: heap-use-after-free /home/twice/incubator-kvrocks/src/redis_cmd.cc:1531:25 in Redis::CommandBPop::TryPopFromList() ./tests/tmp/server.724501.7/stderr 137:SUMMARY: AddressSanitizer: 684 byte(s) leaked in 8 allocation(s). ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
