Open jiemojiemo opened 2 years ago
some discussion about this: https://stackoverflow.com/questions/23541583/localtime-r-consuming-some-memory-before-program-exit
so how to avoid this ? help...
I didn't reproduce this, https://godbolt.org/z/cG33dj17d
more details about my system:
compiler : clang 13, -DCMAKE_CXX_COMPILER=/opt/homebrew/Cellar/llvm@13/13.0.1/bin/clang++ os: macos monterey, apple m1 pro
you can check this, if you want to suppress this leak. https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer#suppressions
you can check this, if you want to suppression this leak. https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer#suppressions
Thanks! you save my day!
More, you can also specify the suppression list at source code level:
extern "C"
const char *__lsan_default_suppressions() {
return "leak:*LSanTestLeakingFunc*";
}
it is strange...