1. Oct 10, 2019
    • Raphael Isemann's avatar
      [lldb] Fix minidebuginfo-set-and-hit-breakpoint.test · ffe170c6
      Raphael Isemann authored
      This was failing for me because of this error:
      llvm-objcopy: error: 'build/tools/lldb/test/ObjectFile/ELF/Output/minidebuginfo-set-and-hit-breakpoint.test.tmp.mini_debuginfo': section '.dynsym' cannot be removed because it is referenced by the section '.hash'
      
      Patch by Konrad Kleine!
      
      llvm-svn: 374352
      ffe170c6
    • Simon Pilgrim's avatar
      [X86] combineFMADDSUB - Convert to use isNegatibleForFree/GetNegatedExpression. · f096443a
      Simon Pilgrim authored
      Split off from D67557, fixes the compile time regression mentioned in rL372756
      
      llvm-svn: 374351
      f096443a
    • Raphael Isemann's avatar
      [lldb] Add log output for the support files we pass to the CppModuleConfiguration · ccd54a13
      Raphael Isemann authored
      CppModuleConfiguration is the most likely point of failure when we have weird
      setups where we fail to load a C++ module. With this logging it should be easier
      to figure out why we can't find a valid configuration as the configuration only
      depends on the list of file paths.
      
      llvm-svn: 374350
      ccd54a13
    • Thomas Preud'homme's avatar
      Revert "[test] Use system locale for mri-utf8.test" · 48edae33
      Thomas Preud'homme authored
      This reverts commit r374318 / b6f1d1fa.
      
      llvm-svn: 374349
      48edae33
    • Jay Foad's avatar
      Revert "[AMDGPU] Run `unreachable-mbb-elimination` after isel to clean up PHIs." · 76505565
      Jay Foad authored
      Summary:
      This has been superseded by "[AMDGPU]: PHI Elimination hooks added for custom COPY insertion."
      
      This reverts the code changes from commit 53f967f2
      but keeps the test case.
      
      Reviewers: hliao, arsenm, tpr, dstuttard
      
      Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, t-tye, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68769
      
      llvm-svn: 374347
      76505565
    • Simon Pilgrim's avatar
      Fix OCaml/core.ml fneg check · fbf8b0bc
      Simon Pilgrim authored
      llvm-svn: 374346
      fbf8b0bc
    • Simon Pilgrim's avatar
      [DAG][X86] Add isNegatibleForFree/GetNegatedExpression override placeholders. NFCI. · 08c2f530
      Simon Pilgrim authored
      Continuing to undo the rL372756 reversion.
      
      Differential Revision: https://reviews.llvm.org/D67557
      
      llvm-svn: 374345
      08c2f530
    • George Rimar's avatar
      [llvm-readelf] - Do not enter an infinite loop when printing histogram. · 55f1be09
      George Rimar authored
      This is similar to D68086.
      We are entering an infinite loop when dumping a histogram for a specially crafted
      .hash section with a loop in a chain.
      
      Differential revision: https://reviews.llvm.org/D68771
      
      llvm-svn: 374344
      55f1be09
    • Kai Nacke's avatar
      [Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj). · 819f01d9
      Kai Nacke authored
      The command `od -t x` is used to dump data in hex format.
      The LIT tests assumes that the hex characters are in lowercase.
      However, there are also platforms which use uppercase letter.
      
      To solve this issue the tests are updated to use the new
      `--ignore-case` option of FileCheck.
      
      Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson
      
      Differential Revision: https://reviews.llvm.org/D68693
      
      llvm-svn: 374343
      819f01d9
    • Pavel Labath's avatar
      Fix the unwinding plan augmentation from x86 assembly · 50703223
      Pavel Labath authored
      Unwind plan augmentation should compute the plan row at offset x from
      the instruction before offset x, but currently we compute it from the
      instruction at offset x. Note that this behavior is a regression
      introduced when moving the x86 assembly inspection engine to its own
      file
      (https://github.com/llvm/llvm-project/commit/1c9858b298d79ce82c45a2954096718b39550109#diff-375a2be066db6f34bb9a71442c9b71fcL913);
      the original version handled this properly by copying the previous
      instruction out before advancing the instruction pointer.
      
      The relevant bug with more info is here: https://bugs.llvm.org/show_bug.cgi?id=43561
      
      Differential Revision: https://reviews.llvm.org/D68454
      Patch by Jaroslav Sevcik <jarin@google.com>.
      
      llvm-svn: 374342
      50703223
    • Pavel Labath's avatar
      Fix some dangling else warnings · c8c71e6f
      Pavel Labath authored
      EXPECT_EQ contains an if-else statement. It also contains some magic to
      suppress the dangling else warnings, but it seems that some new
      compilers can see through that...
      
      llvm-svn: 374341
      c8c71e6f
    • Amaury Sechet's avatar
      [DAGCombine] Match more patterns for half word bswap · aaf05078
      Amaury Sechet authored
      Summary: It ensures that the bswap is generated even when a part of the subtree already matches a bswap transform.
      
      Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68250
      
      llvm-svn: 374340
      aaf05078
    • Kai Nacke's avatar
      [FileCheck] Implement --ignore-case option. · dfd2b6f0
      Kai Nacke authored
      The FileCheck utility is enhanced to support a `--ignore-case`
      option. This is useful in cases where the output of Unix tools
      differs in case (e.g. case not specified by Posix).
      
      Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson, MaskRay
      
      Differential Revision: https://reviews.llvm.org/D68146
      
      llvm-svn: 374339
      dfd2b6f0
    • Florian Hahn's avatar
      [LV][NFC] Factor out calculation of "best" estimated trip count. · a3ca7acb
      Florian Hahn authored
      This is just small refactoring to minimize changes in upcoming patch.
      In the next path I'm going to introduce changes into heuristic for vectorization of "tiny trip count" loops.
      
      Patch by Evgeniy Brevnov <evgueni.brevnov@gmail.com>
      
      Reviewers: hsaito, Ayal, fhahn, reames
      
      Reviewed By: hsaito
      
      Differential Revision: https://reviews.llvm.org/D67690
      
      llvm-svn: 374338
      a3ca7acb
    • Pavel Labath's avatar
      MinidumpYAML: Add support for the memory info list stream · 3aa7e766
      Pavel Labath authored
      Summary:
      The implementation is fairly straight-forward and uses the same patterns
      as the existing streams. The yaml form does not attempt to preserve the
      data in the "gaps" that can be created by setting a larger-than-required
      header or entry size in the stream header, because the existing consumer
      (lldb) does not make use of the information in the gap in any way, and
      attempting to preserve that would make the implementation more
      complicated.
      
      Reviewers: amccarth, jhenderson, clayborg
      
      Subscribers: llvm-commits, lldb-commits, markmentovai, zturner, JosephTremoulet
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68645
      
      llvm-svn: 374337
      3aa7e766
    • David Green's avatar
      [ARM] VQADD instructions · 39596ec2
      David Green authored
      This selects MVE VQADD from the vector llvm.sadd.sat or llvm.uadd.sat
      intrinsics.
      
      Differential Revision: https://reviews.llvm.org/D68566
      
      llvm-svn: 374336
      39596ec2
    • Raphael Isemann's avatar
      [lldb] Make sure import-std-module/sysroot actually passes for the right reasons · f5b2b760
      Raphael Isemann authored
      This test was previously passing because myabs was actually emitted into the
      debug information and we called that. The test itself was broken as it didn't
      use the libc++ directory structure (the /v1/ directory was just called /include/).
      
      This patch gives myabs a default argument which we can't get from debug information
      and inlines the function to make sure we can't call it from LLDB without loading
      the C++ module.
      
      llvm-svn: 374335
      f5b2b760
    • Sanjay Patel's avatar
      [AArch64][x86] add tests for (v)select bit magic; NFC · 3370d4d2
      Sanjay Patel authored
      llvm-svn: 374334
      3370d4d2
    • David Carlier's avatar
      [Sanitizers] Fix getrandom test · 69c9c223
      David Carlier authored
      llvm-svn: 374333
      69c9c223
    • Rui Ueyama's avatar
      Make nullptr check more robust · 9adea6e4
      Rui Ueyama authored
      The only condition that isecLoc becomes null is
      
        Out::bufferStart == nullptr,
        isec->getParent()->offset == 0, and
        isec->outSecOff == 0.
      
      We can check the first condition only once.
      
      llvm-svn: 374332
      9adea6e4
    • Pavel Labath's avatar
      File: Handle more cases in GetOptionsFromMode · 342b1b2e
      Pavel Labath authored
      The "b" (binary) flag is meaningless most of the time, but the relevant
      standars allow it. The standards permit one to spell it both as "r+b"
      and "rb+", so handle both cases.
      
      This fixes TestFileHandle.test_binary_inout with python2.
      
      llvm-svn: 374331
      342b1b2e
    • Guillaume Chatelet's avatar
      [Alignment][NFC] Make VectorUtils uas llvm::Align · 837a1b84
      Guillaume Chatelet authored
      Summary:
      This is patch is part of a series to introduce an Alignment type.
      See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
      See this patch for the introduction of the type: https://reviews.llvm.org/D64790
      
      Reviewers: courbet
      
      Subscribers: hiraditya, rogfer01, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68784
      
      llvm-svn: 374330
      837a1b84
    • Roman Lebedev's avatar
      [lld] getErrPlace(): don't perform arithmetics on maybe-null pointer · 1508fbad
      Roman Lebedev authored
      isecLoc there can be null, but at the same time isec->getSize() may
      be non-null. It is UB to offset a nullptr.The most straight-forward fix
      here appears to perform casts+normal integral arithmetics.
      
      FAIL: lld :: ELF/invalid/invalid-relocation-aarch64.test (1158 of 2217)
      ******************** TEST 'lld :: ELF/invalid/invalid-relocation-aarch64.test' FAILED ********************
      Script:
      --
      : 'RUN: at line 2';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/yaml2obj /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/invalid/invalid-relocation-aarch64.test -o /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/invalid/Output/invalid-relocation-aarch64.test.tmp.o
      : 'RUN: at line 3';   not /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/invalid/Output/invalid-relocation-aarch64.test.tmp.o -o /dev/null 2>&1 | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/invalid/invalid-relocation-aarch64.test
      --
      Exit Code: 1
      
      Command Output (stderr):
      --
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/invalid/invalid-relocation-aarch64.test:4:10: error: CHECK: expected string not found in input
      # CHECK: error: unknown relocation (1024) against symbol foo
               ^
      <stdin>:1:1: note: scanning from here
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/ELF/Target.cpp:100:41: runtime error: applying non-zero offset 24 to null pointer
      ^
      <stdin>:1:118: note: possible intended match here
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/ELF/Target.cpp:100:41: runtime error: applying non-zero offset 24 to null pointer
                                                                                                                           ^
      
      --
      
      ********************
      Testing:  0.. 10.. 20.. 30.. 40.. 50.
      FAIL: lld :: ELF/invalid/invalid-relocation-x64.test (1270 of 2217)
      ******************** TEST 'lld :: ELF/invalid/invalid-relocation-x64.test' FAILED ********************
      Script:
      --
      : 'RUN: at line 2';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/yaml2obj /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/invalid/invalid-relocation-x64.test -o /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/invalid/Output/invalid-relocation-x64.test.tmp1.o
      : 'RUN: at line 3';   echo ".global foo; foo:" > /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/invalid/Output/invalid-relocation-x64.test.tmp2.s
      : 'RUN: at line 4';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/invalid/Output/invalid-relocation-x64.test.tmp2.s -o /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/invalid/Output/invalid-relocation-x64.test.tmp2.o -filetype=obj -triple x86_64-pc-linux
      : 'RUN: at line 5';   not /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/invalid/Output/invalid-relocation-x64.test.tmp1.o /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/invalid/Output/invalid-relocation-x64.test.tmp2.o -o /dev/null 2>&1 | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/invalid/invalid-relocation-x64.test
      --
      Exit Code: 1
      
      Command Output (stderr):
      --
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/invalid/invalid-relocation-x64.test:6:10: error: CHECK: expected string not found in input
      # CHECK: error: unknown relocation (152) against symbol foo
               ^
      <stdin>:1:1: note: scanning from here
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/ELF/Target.cpp:100:41: runtime error: applying non-zero offset 24 to null pointer
      ^
      <stdin>:1:118: note: possible intended match here
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/lld/ELF/Target.cpp:100:41: runtime error: applying non-zero offset 24 to null pointer
                                                                                                                           ^
      
      --
      
      ********************
      Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
      Testing Time: 20.73s
      ********************
      Failing Tests (2):
          lld :: ELF/invalid/invalid-relocation-aarch64.test
          lld :: ELF/invalid/invalid-relocation-x64.test
      
      llvm-svn: 374329
      1508fbad
    • Roman Lebedev's avatar
      [AST] ASTReader::ReadSLocEntry(): move computation of FirstDecl into the branch where it's used · bf4f1e0e
      Roman Lebedev authored
      The existing code is not defined, you are not allowed
      to produce non-null pointer from null pointer (F->FileSortedDecls here).
      That being said, i'm not really confident this is fix-enough, but we'll see.
      
      FAIL: Clang :: Modules/no-module-map.cpp (6879 of 16079)
      ******************** TEST 'Clang :: Modules/no-module-map.cpp' FAILED ********************
      Script:
      --
      : 'RUN: at line 1';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-name=ab -x c++-header /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map/a.h /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map/b.h -emit-header-module -o /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm
      : 'RUN: at line 2';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-file=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map -verify
      : 'RUN: at line 3';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-file=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map -verify -DA
      : 'RUN: at line 4';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-file=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map -verify -DB
      : 'RUN: at line 5';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -fmodules-ts -fmodule-file=/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp -I/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/Inputs/no-module-map -verify -DA -DB
      : 'RUN: at line 7';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -E /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm -o - | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp
      : 'RUN: at line 8';   /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/10.0.0/include -nostdsysteminc -frewrite-imports -E /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/test/Modules/Output/no-module-map.cpp.tmp.pcm -o - | /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Modules/no-module-map.cpp
      --
      Exit Code: 2
      
      Command Output (stderr):
      --
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:1526:50: runtime error: applying non-zero offset 8 to null pointer
          #0 0x3a9bd0c in clang::ASTReader::ReadSLocEntry(int) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:1526:50
          #1 0x328b6f8 in clang::SourceManager::loadSLocEntry(unsigned int, bool*) const /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Basic/SourceManager.cpp:461:28
          #2 0x328b351 in clang::SourceManager::initializeForReplay(clang::SourceManager const&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Basic/SourceManager.cpp:399:11
          #3 0x3996c71 in clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Frontend/FrontendAction.cpp:581:27
          #4 0x394f341 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:956:13
          #5 0x3a8a92b in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:290:25
          #6 0xaf8d62 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/cc1_main.cpp:250:15
          #7 0xaf1602 in ExecuteCC1Tool /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/driver.cpp:309:12
          #8 0xaf1602 in main /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/driver.cpp:382:12
          #9 0x7f2c1eecc2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
          #10 0xad57f9 in _start (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang-10+0xad57f9)
      
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Serialization/ASTReader.cpp:1526:50 in
      llvm-svn: 374328
      bf4f1e0e
    • Roman Lebedev's avatar
      [ADR] ArrayRefTest: disable SizeTSizedOperations test - it's UB. · abb34df4
      Roman Lebedev authored
      This test is not defined.
      
      FAIL: LLVM-Unit :: ADT/./ADTTests/ArrayRefTest.SizeTSizedOperations (178 of 33926)
      ******************** TEST 'LLVM-Unit :: ADT/./ADTTests/ArrayRefTest.SizeTSizedOperations' FAILED ********************
      Note: Google Test filter = ArrayRefTest.SizeTSizedOperations
      [==========] Running 1 test from 1 test case.
      [----------] Global test environment set-up.
      [----------] 1 test from ArrayRefTest
      [ RUN      ] ArrayRefTest.SizeTSizedOperations
      /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32: runtime error: applying non-zero offset 9223372036854775806 to null pointer
          #0 0x5ae8dc in llvm::ArrayRef<char>::slice(unsigned long, unsigned long) const /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32
          #1 0x5ae44c in (anonymous namespace)::ArrayRefTest_SizeTSizedOperations_Test::TestBody() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/unittests/ADT/ArrayRefTest.cpp:85:3
          #2 0x928a96 in testing::Test::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2474:5
          #3 0x929793 in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2656:11
          #4 0x92a152 in testing::TestCase::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2774:28
          #5 0x9319d2 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4649:43
          #6 0x931416 in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4257:10
          #7 0x920ac3 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:2233:46
          #8 0x920ac3 in main /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/unittest/UnitTestMain/TestMain.cpp:50:10
          #9 0x7f66135b72e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
          #10 0x472c19 in _start (/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/unittests/ADT/ADTTests+0x472c19)
      
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:180:32 in
      llvm-svn: 374327
      abb34df4
    • Simon Pilgrim's avatar
      Fix -Wparentheses warning. NFCI. · 788ba151
      Simon Pilgrim authored
      llvm-svn: 374326
      788ba151
    • Aleksandr Urakov's avatar
      [Windows] Introduce a switch for the `lldb-server` mode on Windows · 08913665
      Aleksandr Urakov authored
      Summary:
      This patch introduces a switch, based on the environment variable
      `LLDB_USE_LLDB_SERVER`, to determine whether to use the `ProcessWindows` plugin
      (the old way) or the `lldb-server` way for debugging on Windows.
      
      Reviewers: labath, amccarth, asmith, stella.stamenova
      
      Reviewed By: labath, amccarth
      
      Subscribers: mstorsjo, abidh, JDevlieghere, lldb-commits, leonid.mashinskiy
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D68258
      
      llvm-svn: 374325
      08913665
    • Kadir Cetinkaya's avatar
      Revert "Use -fdebug-compilation-dir to form absolute paths in coverage mappings" · 62808631
      Kadir Cetinkaya authored
      This reverts commit f6777964.
      
      Because the absolute path check relies on temporary path containing
      "clang", "test" and "CoverageMapping" as a subsequence, which is not
      necessarily true on all systems(breaks internal integrates). Wanted to
      fix it by checking for a leading "/" instead, but then noticed that it
      would break windows tests, so leaving it to the author instead.
      
      llvm-svn: 374324
      62808631
    • Pavel Labath's avatar
      TestFileHandle.py: relax exception type checks · 44506cd7
      Pavel Labath authored
      the exceptions returned differ between swig4 (TypeError) and swig<=3
      (NotImplementedError). Just check for the base Exception class instead.
      
      Theoretically we could switch on the swig version and expect the precise
      type directly, but checking the exact type does not seem that important.
      
      Thanks to Raphael for helping me figure this out.
      
      llvm-svn: 374322
      44506cd7
    • Russell Gallop's avatar
      Fix sanitizer lint check after r374315 · 38ac46b4
      Russell Gallop authored
      llvm-svn: 374321
      38ac46b4
    • Mirko Brkusanin's avatar
      [Mips] Fix 374055 · c2e48167
      Mirko Brkusanin authored
      EXPENSIVE_CHECKS build was failing on new test.
      This is fixed by marking $ra register as undef.
      Test now has -verify-machineinstrs to check for operand flags.
      
      llvm-svn: 374320
      c2e48167
    • Thomas Preud'homme's avatar
      [test] Use system locale for mri-utf8.test · b6f1d1fa
      Thomas Preud'homme authored
      Summary:
      llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be
      installed for its last RUN line to work. If not installed, the unicode
      string gets encoded (interpreted) as ascii which fails since the most
      significant byte is non zero. This commit changes the test to only rely
      on the system being able to encode the pound sign in its default
      encoding (e.g. UTF-16 for Microsoft Windows) by always opening the file
      via input/output redirection. This avoids forcing a given locale to be
      present and supported. A Byte Order Mark is also added to help
      recognizing the encoding of the file and its endianness.
      
      Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb
      
      Subscribers: dexonsmith, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D68472
      
      llvm-svn: 374318
      b6f1d1fa
    • Roman Lebedev's avatar
      [UBSan] Appease linter · 6430adbe
      Roman Lebedev authored
      llvm-svn: 374316
      6430adbe
    • David Carlier's avatar
      [Sanitizers] Porting getrandom/getentropy interceptors to FreeBSD · 90c8b59c
      David Carlier authored
      - Available from 12.x branch, by the time it lands next year in FreeBSD tree, the 11.x's might be EOL.
      - Intentionally changed the getrandom test to C code as with 12.0 (might be fixed in CURRENT since), there is a linkage issue in C++ context.
      
      Reviewers: emaste, dim, vitalybuka
      
      Reviewed-By: vitalybuka
      
      Differential Revision: https://reviews.llvm.org/D68451
      
      llvm-svn: 374315
      90c8b59c
    • Fangrui Song's avatar
      [COFF] Wrap definitions in namespace lld { namespace coff {. NFC · d79c3be6
      Fangrui Song authored
      Similar to D67323, but for COFF. Many lld/COFF/ files already use
      `namespace lld { namespace coff {`. Only a few need changing.
      
      Reviewed By: ruiu
      
      Differential Revision: https://reviews.llvm.org/D68772
      
      llvm-svn: 374314
      d79c3be6
    • Raphael Isemann's avatar
      [lldb][NFC] Remove strange bool parameter from Searcher::SearchCallback · 95e264fc
      Raphael Isemann authored
      Summary:
      The SearchCallback has a bool parameter that we always set to false, we never use in any callback implementation and that also changes its name
      from one file to the other (either `containing` and `complete`). It was added in the original LLDB check in, so there isn't any history what
      this was supposed to be, so let's just remove it.
      
      Reviewers: jingham, JDevlieghere, labath
      
      Reviewed By: jingham, labath
      
      Subscribers: lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D68696
      
      llvm-svn: 374313
      95e264fc
    • Raphael Isemann's avatar
      [lldb] Fix out of bounds read in DataExtractor::GetCStr and add unit test that function. · 067bb1f5
      Raphael Isemann authored
      Summary:
      The `if (*cstr_end == '\0')` in the previous code checked if the previous loop terminated because it
      found a null terminator or because it reached the end of the data. However, in the case that we hit
      the end of the data before finding a null terminator, `cstr_end` points behind the last byte in our
      data and `*cstr_end` reads the memory behind the array (which may be uninitialised)
      
      This patch just rewrites that function use `std::find` and adds the relevant unit tests.
      
      Reviewers: labath
      
      Reviewed By: labath
      
      Subscribers: abidh, JDevlieghere, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D68773
      
      llvm-svn: 374311
      067bb1f5
    • Roman Lebedev's avatar
      eb8b6fe7
    • Russell Gallop's avatar
      Revert "[ASan] Do not misrepresent high value address dereferences as null dereferences" · c48e0873
      Russell Gallop authored
      As it was breaking bots running sanitizer lint check
      
      This reverts r374265 (git b577efe4)
      
      llvm-svn: 374308
      c48e0873
    • Raphael Isemann's avatar
      186f1c58