diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2017-11-17 00:46:59 +0000 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2017-11-17 00:46:59 +0000 |
| commit | 065421f0cc24c574970d5b4c875247cd035db324 (patch) | |
| tree | 60bc82d980ec91afc31ff9744449c5781c3a72fc | |
| parent | e6bb66357c37fc12ede53cbb289ba632d0ba8944 (diff) | |
| download | bcm5719-llvm-065421f0cc24c574970d5b4c875247cd035db324.tar.gz bcm5719-llvm-065421f0cc24c574970d5b4c875247cd035db324.zip | |
[fuzzer] Initialize PcDescr buffer before calling __sanitizer_symbolize_pc
__sanitizer_symbolize_pc is not instrumented so msan assumes that PcDescr
was not initialized.
llvm-svn: 318488
| -rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerUtil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtil.cpp b/compiler-rt/lib/fuzzer/FuzzerUtil.cpp index 65f0e17477e..96b37d34815 100644 --- a/compiler-rt/lib/fuzzer/FuzzerUtil.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerUtil.cpp @@ -181,7 +181,7 @@ std::string Base64(const Unit &U) { std::string DescribePC(const char *SymbolizedFMT, uintptr_t PC) { if (!EF->__sanitizer_symbolize_pc) return "<can not symbolize>"; - char PcDescr[1024]; + char PcDescr[1024] = {}; EF->__sanitizer_symbolize_pc(reinterpret_cast<void*>(PC), SymbolizedFMT, PcDescr, sizeof(PcDescr)); PcDescr[sizeof(PcDescr) - 1] = 0; // Just in case. |

