[Lldb-commits] [PATCH] D35734: Don't allow LLDB to try and parse .debug_types

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 24 10:16:27 PDT 2017


clayborg added a comment.

I believe a crash looks like:

  #include <stdio.h>
  
  int main(int argc, const char **argv) {
    typedef enum FooTag {
      Bar,
      Baz
    } Foo;
    Foo foo = Bar;
    printf("foo = %i\n", foo);
    return 0; // Break here and "frame variable"
  }

The enum gets put into a type unit, and then we get an assertion when trying to get the byte size for an integer whose byte size is zero. -fdebug-types-section doesn't work on Mac as the flag is just ignored. Also, can we just assume "-fdebug-types-section" is available for any compiler that we run the LLDB test suite with? I am guessing that isn't the case so we should limit any test case to GCC or clang.

Can you compile the above code snippet and see if it crashes on linux?


https://reviews.llvm.org/D35734





More information about the lldb-commits mailing list