[all-commits] [llvm/llvm-project] 47c343: [llvm-objcopy][test] Fix test that could have pass...

James Henderson via All-commits all-commits at lists.llvm.org
Fri Mar 5 01:03:34 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47c343d7685f4ce9d8013c2e7ed3e30869875f4d
      https://github.com/llvm/llvm-project/commit/47c343d7685f4ce9d8013c2e7ed3e30869875f4d
  Author: James Henderson <james.henderson at sony.com>
  Date:   2021-03-05 (Fri, 05 Mar 2021)

  Changed paths:
    M llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test

  Log Message:
  -----------
  [llvm-objcopy][test] Fix test that could have passed spuriously

The test was showing that when --strip-unneeded is specified for an
executable, all the symbols are stripped. However, the set of symbols
used in the test would be stripped by --strip-unneeded for an ET_REL
object too. Fix this by adding additional symbols that aren't normally
stripped by --strip-unneeded.

Reviewed by: MaskRay

Differential Revision: https://reviews.llvm.org/D97664


  Commit: 076698154ad7cd36c590379ed09fdd14047b8244
      https://github.com/llvm/llvm-project/commit/076698154ad7cd36c590379ed09fdd14047b8244
  Author: James Henderson <james.henderson at sony.com>
  Date:   2021-03-05 (Fri, 05 Mar 2021)

  Changed paths:
    M llvm/test/tools/llvm-objcopy/ELF/binary-input.test
    M llvm/tools/llvm-objcopy/ELF/Object.cpp

  Log Message:
  -----------
  [llvm-objcopy] Fix crash for binary input files with non-ascii names

The code was using the standard isalnum function which doesn't handle
values outside the non-ascii range. Switching to using llvm::isAlnum
instead ensures we don't provoke undefined behaviour, which can in some
cases result in crashes.

Reviewed by: MaskRay

Differential Revision: https://reviews.llvm.org/D97663


Compare: https://github.com/llvm/llvm-project/compare/0c5bfe6bb82b...076698154ad7


More information about the All-commits mailing list