trace_processor: fix null dereference in ref_type mapping
As we were calling InternString with a nullptr, we were getting crashes
in strlen when looking up the string for a reftype.
Instead of storing char*, store the StringView which lets us avoid the
issue - this code is going away soon anyway so trying to fix this better
is not worth our time.
This fixes the Chrome roll.
Change-Id: I1005b64128fee772a80b0f0a2bb68f67d3dce791
diff --git a/src/trace_processor/trace_storage.h b/src/trace_processor/trace_storage.h
index 0cb7cc0..56c92a0 100644
--- a/src/trace_processor/trace_storage.h
+++ b/src/trace_processor/trace_storage.h
@@ -98,7 +98,7 @@
kRefMax
};
-const std::vector<const char*>& GetRefTypeStringMap();
+const std::vector<NullTermStringView>& GetRefTypeStringMap();
// Stores a data inside a trace file in a columnar form. This makes it efficient
// to read or search across a single field of the trace (e.g. all the thread