Skip to content
Snippets Groups Projects
  1. Mar 22, 2016
  2. Mar 21, 2016
  3. Mar 20, 2016
    • Bruno Cardoso Lopes's avatar
      Reapply [2] [VFS] Add 'overlay-relative' field to YAML files · 86240eff
      Bruno Cardoso Lopes authored
      This reapplies r261552 and r263748. Fixed testcase to reapply.
      
      The VFS overlay mapping between virtual paths and real paths is done through
      the 'external-contents' entries in YAML files, which contains hardcoded paths
      to the real files.
      
      When a module compilation crashes, headers are dumped into <name>.cache/vfs
      directory and are mapped via the <name>.cache/vfs/vfs.yaml. The script
      generated for reproduction uses -ivfsoverlay pointing to file to gather the
      mapping between virtual paths and files inside <name>.cache/vfs. Currently, we
      are only capable of reproducing such crashes in the same machine as they
      happen, because of the hardcoded paths in 'external-contents'.
      
      To be able to reproduce a crash in another machine, this patch introduces a new
      option in the VFS yaml file called 'overlay-relative'. When it's equal to
      'true' it means that the provided path to the YAML file through the
      -ivfsoverlay option should also be used to prefix the final path for every
      'external-contents'.
      
      Example, given the invocation snippet "... -ivfsoverlay
      <name>.cache/vfs/vfs.yaml" and the following entry in the yaml file:
      
      "overlay-relative": "true",
      "roots": [
      ...
        "type": "directory",
        "name": "/usr/include",
        "contents": [
          {
            "type": "file",
            "name": "stdio.h",
            "external-contents": "/usr/include/stdio.h"
          },
      ...
      
      Here, a file manager request for virtual "/usr/include/stdio.h", that will map
      into real path "/<absolute_path_to>/<name>.cache/vfs/usr/include/stdio.h.
      
      This is a useful feature for debugging module crashes in machines other than
      the one where the error happened.
      
      Differential Revision: http://reviews.llvm.org/D17457
      
      rdar://problem/24499339
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263893 91177308-0d34-0410-b5e6-96231b3b80d8
      86240eff
  4. Mar 17, 2016
  5. Mar 14, 2016
    • Daniel Jasper's avatar
      clang-format: [JS] Handle certain cases of ASI. · e14f44c2
      Daniel Jasper authored
      Automatic Semicolon Insertion can only be properly handled by parsing
      source code. However conservatively catching just a few, common
      situations prevents breaking code during development, which greatly
      improves usability.
      
      JS code should still use semicolons, and ASI code should be flagged by
      a compiler or linter.
      
      Patch by Martin Probst. Thank you.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263470 91177308-0d34-0410-b5e6-96231b3b80d8
      e14f44c2
  6. Mar 09, 2016
  7. Mar 08, 2016
  8. Mar 06, 2016
  9. Mar 05, 2016
  10. Mar 04, 2016
  11. Mar 03, 2016
  12. Mar 02, 2016
  13. Mar 01, 2016
  14. Feb 29, 2016
  15. Feb 23, 2016
  16. Feb 22, 2016
  17. Feb 21, 2016
    • Duncan P. N. Exon Smith's avatar
      Lex: Never overflow the file in HeaderMap::lookupFilename() · 839cd13b
      Duncan P. N. Exon Smith authored
      If a header map file is corrupt, the strings in the string table may not
      be null-terminated.  The logic here previously relied on `MemoryBuffer`
      always being null-terminated, but this isn't actually guaranteed by the
      class AFAICT.  Moreover, we're seeing a lot of crash traces at calls to
      `strlen()` inside of `lookupFilename()`, so something is going wrong
      there.
      
      Instead, use `strnlen()` to get the length, and check for corruption.
      
      Also remove code paths that could call `StringRef(nullptr)`.  r261459
      made these rather obvious (although they'd been there all along).
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261461 91177308-0d34-0410-b5e6-96231b3b80d8
      839cd13b
  18. Feb 20, 2016
Loading