[Lldb-commits] [PATCH] D12239: Fix buffer overflow for fixed_form_sizes

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 21 07:35:02 PDT 2015

labath added inline comments.

Comment at: source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp:24
@@ -25,1 +23,3 @@
+static DWARFFormValue::FixedFormSizes
+g_form_sizes_addr4 {
     0, // 0x00 unused
Will these be linker-initialized? As I understand it, we are trying to avoid static constructors..

Comment at: source/Plugins/SymbolFile/DWARF/DWARFFormValue.h:39
@@ -38,1 +38,3 @@
+    typedef const std::vector<uint8_t> FixedFormSizes;
I don't think hiding const in the type name is a good idea. It makes it quite hard to tell you are declaring constant arrays below.


More information about the lldb-commits mailing list