Skip to content
  1. Oct 18, 2017
    • Vlad Tsyrklevich's avatar
      Statically link llvm-cfi-verify's libraries. · 4dc1c973
      Vlad Tsyrklevich authored
      Summary:
      llvm-cfi-verify (D38379) introduced a potential build failure when compiling with `-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON`. Specific versions of cmake seem to treat the `add_subdirectory()` rule differently. It seems as if old versions of cmake BFS these rules, adding them to the fringe for expansion later. Newer versions of cmake seem to immediately execute CMakeFiles that are present in this subdirectory.
      
      If the subdirectory is expanded through the fringe, the globbing resultant from `llvm_add_implicit_projects()` from `cmake/modules/AddLLVM.cmake:1012` means that `tools/llvm-shlib/CMakeFile.txt` gets executed before `tools/llvm-cfi-verify/lib/CMakeFile.txt`. As the latter CMakeFile adds a new library, this expansion order means that the library files required the unit tests in `unittests/tools/llvm-cfi-verify/` are not present in the dynamic library. This causes unit tests to fail as the required functions can't be found.
      
      This change now ensures that the libraries created by `llvm-cfi-verify` are statically linked into the unit tests. As `tools/llvm-cfi-verify/lib` no longer adds anything to `llvm-shlib`, there should be no concern about the order-of-compilation.
      
      Reviewers: skatkov, pcc
      
      Reviewed By: skatkov, pcc
      
      Subscribers: llvm-commits, kcc, pcc, aheejin, vlad.tsyrklevich, mgorny
      
      Differential Revision: https://reviews.llvm.org/D39020
      
      llvm-svn: 316059
      4dc1c973
  2. Oct 17, 2017
    • Matt Morehouse's avatar
      [llvm-special-case-list-fuzzer] Add fuzz target. · 3f6c1627
      Matt Morehouse authored
      Summary: Create a fuzzer for sanitizer blacklists.
      
      Patch by: hctim
      
      Reviewers: morehouse
      
      Reviewed By: morehouse
      
      Subscribers: llvm-commits, mgorny, kcc
      
      Differential Revision: https://review.llvm.org/D38981
      
      llvm-svn: 316014
      3f6c1627
    • Vedant Kumar's avatar
      [llvm-cov] Add one correction to r315960 (PR34962) · 4d1969f2
      Vedant Kumar authored
      In r315960, I accidentally assumed that the first line segment is
      guaranteed to be the non-gap region entry segment (given that one is
      present). It can actually be any segment on the line, and the test I
      checked in demonstrates that.
      
      llvm-svn: 315963
      4d1969f2
    • Vedant Kumar's avatar
      [llvm-cov] Remove workaround in line execution count calculation (PR34962) · 58548c30
      Vedant Kumar authored
      Gap areas make it possible to correctly determine when to use counts
      from deferred regions. Before gap areas were introduced, llvm-cov needed
      to use a heuristic to do this: it ignored counts from segments that
      start, but do not end, on a line. This heuristic breaks down on a simple
      example (see PR34962).
      
      This patch removes the heuristic and picks counts from any region entry
      segment which isn't a gap area.
      
      llvm-svn: 315960
      58548c30
  3. Oct 16, 2017
  4. Oct 14, 2017
  5. Oct 13, 2017
  6. Oct 12, 2017
    • Justin Bogner's avatar
      Re-commit "llvm-isel-fuzzer: Handle a subset of backend flags in the exec name" · 9ea7fbd1
      Justin Bogner authored
      Here we add a secondary option parser to llvm-isel-fuzzer (and provide
      it for use with other fuzzers). With this, you can copy the fuzzer to
      a name like llvm-isel-fuzzer=aarch64-gisel for a fuzzer that fuzzer
      AArch64 with GlobalISel enabled, or fuzzer=x86_64 to fuzz x86, with no
      flags required. This should be useful for running these in OSS-Fuzz.
      
      Note that this handrolls a subset of cl::opts to recognize, rather
      than embedding a complete command parser for argv[0]. If we find we
      really need the flexibility of handling arbitrary options at some
      point we can rethink this.
      
      This re-applies 315545 using "=" instead of ":" as a separator for
      arguments.
      
      llvm-svn: 315557
      9ea7fbd1
    • Hans Wennborg's avatar
      Revert r315545 "llvm-isel-fuzzer: Handle a subset of backend flags in the executable name" · 022829d8
      Hans Wennborg authored
      It broke some tests on Windows:
      
      Failing Tests (4):
          LLVM :: tools/llvm-isel-fuzzer/execname-options.ll
          LLVM :: tools/llvm-isel-fuzzer/missing-triple.ll
          LLVM :: tools/llvm-isel-fuzzer/x86-empty-bc.ll
          LLVM :: tools/llvm-isel-fuzzer/x86-empty.ll
      
      > llvm-isel-fuzzer: Handle a subset of backend flags in the executable name
      >
      > Here we add a secondary option parser to llvm-isel-fuzzer (and provide
      > it for use with other fuzzers). With this, you can copy the fuzzer to
      > a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer
      > AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no
      > flags required. This should be useful for running these in OSS-Fuzz.
      >
      > Note that this handrolls a subset of cl::opts to recognize, rather
      > than embedding a complete command parser for argv[0]. If we find we
      > really need the flexibility of handling arbitrary options at some
      > point we can rethink this.
      
      llvm-svn: 315554
      022829d8
    • Justin Bogner's avatar
      llvm-isel-fuzzer: Handle a subset of backend flags in the executable name · a5969ce1
      Justin Bogner authored
      Here we add a secondary option parser to llvm-isel-fuzzer (and provide
      it for use with other fuzzers). With this, you can copy the fuzzer to
      a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer
      AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no
      flags required. This should be useful for running these in OSS-Fuzz.
      
      Note that this handrolls a subset of cl::opts to recognize, rather
      than embedding a complete command parser for argv[0]. If we find we
      really need the flexibility of handling arbitrary options at some
      point we can rethink this.
      
      llvm-svn: 315545
      a5969ce1
    • Zachary Turner's avatar
      Revert "[ADT] Make Twine's copy constructor private." · 41a9ee98
      Zachary Turner authored
      This reverts commit 4e4ee1c507e2707bb3c208e1e1b6551c3015cbf5.
      
      This is failing due to some code that isn't built on MSVC
      so I didn't catch.  Not immediately obvious how to fix this
      at first glance, so I'm reverting for now.
      
      llvm-svn: 315536
      41a9ee98
    • Lang Hames's avatar
      [MC] Have MCObjectStreamer take its MCAsmBackend argument via unique_ptr. · 2241ffa4
      Lang Hames authored
      MCObjectStreamer owns its MCCodeEmitter -- this fixes the types to reflect that,
      and allows us to remove the last instance of MCObjectStreamer's weird "holding
      ownership via someone else's reference" trick.
      
      llvm-svn: 315531
      2241ffa4
    • Zachary Turner's avatar
      [ADT] Make Twine's copy constructor private. · 337462b3
      Zachary Turner authored
      There's a lot of misuse of Twine scattered around LLVM.  This
      ranges in severity from benign (returning a Twine from a function
      by value that is just a string literal) to pretty sketchy (storing
      a Twine by value in a class).  While there are some uses for
      copying Twines, most of the very compelling ones are confined
      to the Twine class implementation itself, and other uses are
      either dubious or easily worked around.
      
      This patch makes Twine's copy constructor private, and fixes up
      all callsites.
      
      Differential Revision: https://reviews.llvm.org/D38767
      
      llvm-svn: 315530
      337462b3
    • Vlad Tsyrklevich's avatar
      MC Helpers for llvm-cfi-verify. · 0ee26324
      Vlad Tsyrklevich authored
      Add instruction analysis and machinecode traversal helpers in
      preparation for control flow graph generation implementation.
      
      Reviewers: vlad.tsyrklevich
      
      Reviewed By: vlad.tsyrklevich
      
      Subscribers: mgorny, llvm-commits, pcc, kcc
      
      Differential Revision: https://reviews.llvm.org/D38424
      
      llvm-svn: 315528
      0ee26324
  7. Oct 11, 2017
  8. Oct 10, 2017
    • Jake Ehrlich's avatar
      [llvm-objcopy] Fix latent bug that allowed some Sections to be improperly cast... · 70bd75f8
      Jake Ehrlich authored
      [llvm-objcopy] Fix latent bug that allowed some Sections to be improperly cast to StringTableSections
      
      If a Section had Type SHT_STRTAB (which could happen if you had a
      .dynstr section) it was possible to cast Section to StringTableSection
      and get away with any operation that was supported by SectionBase
      without it being noticed. This change makes this bug easier to notice
      and fixes it where it occurred. It also made me realize that there was
      some duplication of efforts in the loop that calls ::initialize. These
      issues are all fixed by this change.
      
      Differential Revision: https://reviews.llvm.org/D38329
      
      llvm-svn: 315372
      70bd75f8
    • Vlad Tsyrklevich's avatar
      Revert "Classify llvm-cfi-verify." · a45919f5
      Vlad Tsyrklevich authored
      This reverts commit r315363. It has a simple build failure, but more
      importantly I want to confirm that unit tests run in check-all to make
      sure that they don't silently break in the future.
      
      llvm-svn: 315370
      a45919f5
    • Vlad Tsyrklevich's avatar
      Classify llvm-cfi-verify. · b5488a22
      Vlad Tsyrklevich authored
      Summary: Move llvm-cfi-verify into a class in preparation for CFI analysis to come.
      
      Reviewers: vlad.tsyrklevich
      
      Reviewed By: vlad.tsyrklevich
      
      Subscribers: mgorny, llvm-commits, pcc, kcc
      
      Differential Revision: https://reviews.llvm.org/D38379
      
      llvm-svn: 315363
      b5488a22
    • Roman Lebedev's avatar
      [opt-viewer] Don't Decode HTML bytes for Python 2 · afd049b6
      Roman Lebedev authored
      Summary:
      D36624 added some python3 compatibility. But that fix has a problem..
      
      With python2 (which is specified by `#!/usr/bin/env python2.7`), if the env variables do not specify the UTF8,
      and the source file is UTF8 (contains non-ASCII symbols), then the `.decode('utf-8')` causes the following exception:
      ```
      Reading YAML files...
      Rendering HTML files...
              8 of 41Traceback (most recent call last):
        File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 277, in <module>
          print_progress)
        File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 213, in generate_report
          should_print_progress)
        File "/build/llvm/tools/opt-viewer/optpmap.py", line 45, in pmap
          result = map(_wrapped_func, func_and_args, *args, **kwargs)
        File "/build/llvm/tools/opt-viewer/optpmap.py", line 25, in _wrapped_func
          return func(argument)
        File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 174, in _render_file
          SourceFileRenderer(source_dir, output_dir, filename).render(remarks)
        File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 125, in render
          self.render_source_lines(self.source_stream, line_remarks)
        File "/build/llvm/tools/opt-viewer/opt-viewer.py", line 79, in render_source_lines
          </tr>'''.format(**locals()), file=self.stream)
      UnicodeEncodeError: 'ascii' codec can't encode character u'\xf4' in position 47: ordinal not in range(128)
      ```
      This is similar to https://bugs.llvm.org/show_bug.cgi?id=33548, which was fixed by https://reviews.llvm.org/D37661
      
      Unlike that fix, here, *removing* `.decode('utf-8')` actually fixes it.
      
      Since i assume that the original fix is needed, i simply made
      that fix conditional, since for python2 it actually breaks things.
      
      Reviewers: modocache, anemet
      
      Reviewed By: anemet
      
      Subscribers: fhahn, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D38289
      
      llvm-svn: 315350
      afd049b6
    • Jake Ehrlich's avatar
      [llvm-objcopy] Add support for removing sections · 36a2eb34
      Jake Ehrlich authored
      This change adds support for removing sections using the -R field (as
      GNU objcopy does as well). This change should let us add many helpful
      tests and is a proper stepping stone for adding more general kinds of
      stripping.
      
      Differential Revision: https://reviews.llvm.org/D38260
      
      llvm-svn: 315346
      36a2eb34
    • Jake Ehrlich's avatar
      Revert "temporary" · c5ff7270
      Jake Ehrlich authored
      I forgot to add a proper commit message. I'm reverting this
      to fix that.
      
      This reverts commit r315344.
      
      llvm-svn: 315345
      c5ff7270
Loading