[PATCH] D108770: [OptTable] Improve error message output for grouped short options

Kevin Athey via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 31 13:57:06 PDT 2021


kda added a comment.

This looks like it broke the sanitizer build blocks.
https://lab.llvm.org/buildbot/#/builders/5/builds/11210

A guide to reproducing sanitizer bots can be found here: https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild

relevant log snippet below:

  FAIL: LLVM-Unit :: Option/./OptionTests/Option.FlagsWithoutValues (73786 of 78710)
  ******************** TEST 'LLVM-Unit :: Option/./OptionTests/Option.FlagsWithoutValues' FAILED ********************
  Script:
  --
  /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/unittests/Option/./OptionTests --gtest_filter=Option.FlagsWithoutValues
  --
  Note: Google Test filter = Option.FlagsWithoutValues
  [==========] Running 1 test from 1 test suite.
  [----------] Global test environment set-up.
  [----------] 1 test from Option
  [ RUN      ] Option.FlagsWithoutValues
  [       OK ] Option.FlagsWithoutValues (0 ms)
  [----------] 1 test from Option (0 ms total)
  [----------] Global test environment tear-down
  [==========] 1 test from 1 test suite ran. (1 ms total)
  [  PASSED  ] 1 test.
  =================================================================
  ==28024==ERROR: LeakSanitizer: detected memory leaks
  Direct leak of 176 byte(s) in 2 object(s) allocated from:
      #0 0x37e7fd in operator new(unsigned long) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cpp:95:3
      #1 0x3c88e6 in llvm::opt::Option::accept(llvm::opt::ArgList const&, llvm::StringRef, bool, unsigned int&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Option/Option.cpp:236:32
      #2 0x3cd195 in llvm::opt::OptTable::parseOneArgGrouped(llvm::opt::InputArgList&, unsigned int&) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Option/OptTable.cpp:378:22
      #3 0x3cf4f2 in llvm::opt::OptTable::ParseArgs(llvm::ArrayRef<char const*>, unsigned int&, unsigned int&, unsigned int, unsigned int) const /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Option/OptTable.cpp:485:20
      #4 0x3a8ce0 in Option_FlagsWithoutValues_Test::TestBody() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/Option/OptionParsingTest.cpp:385:23
      #5 0x4d60db in HandleExceptionsInMethodIfSupported<testing::Test, void> /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc
      #6 0x4d60db in testing::Test::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2508:5
      #7 0x4d890c in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2684:11
      #8 0x4d9cc0 in testing::TestSuite::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2816:28
      #9 0x508c51 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:5338:44
      #10 0x50710c in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc
      #11 0x50710c in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4925:10
      #12 0x4b92b0 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:2473:46
      #13 0x4b92b0 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/UnitTestMain/TestMain.cpp:50:10
      #14 0x7fc2d313b09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
  SUMMARY: AddressSanitizer: 176 byte(s) leaked in 2 allocation(s).
  ********************
  Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
  ********************
  Failed Tests (1):
    LLVM-Unit :: Option/./OptionTests/Option.FlagsWithoutValues


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108770/new/

https://reviews.llvm.org/D108770



More information about the llvm-commits mailing list