[compiler-rt] f799371 - [sanitizer] Fix crash on empty strings.
Evgenii Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 13:28:12 PST 2021
Author: Vyacheslav Chigrin
Date: 2021-01-27T13:22:43-08:00
New Revision: f79937140d07e176924a05d9870e3d5060469b08
URL: https://github.com/llvm/llvm-project/commit/f79937140d07e176924a05d9870e3d5060469b08
DIFF: https://github.com/llvm/llvm-project/commit/f79937140d07e176924a05d9870e3d5060469b08.diff
LOG: [sanitizer] Fix crash on empty strings.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D95431
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
index 710da4c1cecd..98418b426c37 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
@@ -356,7 +356,7 @@ void ParseSymbolizePCOutput(const char *str, SymbolizedStack *res) {
InternalFree(info->function);
info->function = 0;
}
- if (0 == internal_strcmp(info->file, "??")) {
+ if (info->file && 0 == internal_strcmp(info->file, "??")) {
InternalFree(info->file);
info->file = 0;
}
More information about the llvm-commits
mailing list