[PATCH] D16697: Updating .debug_line section version information to match DWARF version.

Katya Romanova via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 00:37:36 PDT 2016


kromanova reopened this revision.
kromanova added a comment.
This revision is now accepted and ready to land.

I have committed this patch today r285355 and have to revert it shortly in r285362 because of two reasons:

(1) Unfortunately, some of the sanitizer tests failed with the following error.

  Command Output (stdout):
  --
  while processing /var/folders/09/r4vw4v8n5kb67jl66zvlbljw0000gn/T/lit_tmp_XSTjqx/closed-fds-412f78.o:
  warning: line table paramters mismatch. Cannot emit.
  Closing streams.
  
  --
  Command Output (stderr):
  --
  /Users/buildslave/jenkins/sharedspace/phase1 at 2/llvm/projects/compiler-rt/test/asan/TestCases/Posix/closed-fds.cc:31:17: error: expected string not found in input
  // CHECK-FILE: {{ #0 0x.* in main .*closed-fds.cc:}}[[@LINE-4]]
                  ^
  <stdin>:25:2: note: scanning from here
  #0 0x49b2d in main (/Users/buildslave/jenkins/sharedspace/phase1 at 2/clang-build/projects/compiler-rt/test/asan/I386DarwinConfig/TestCases/Posix/Output/closed-fds.cc.tmp+0x1b2d)
  ^

Here is the link with the failure that buildbot sent me:
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/22826/
I'm not sure why these tests are failing. I have re-run all the sanitizer tests on my machines (x86-64 linux) and I didn't see any failures. Any clues?

(2) Some tests failed because the generated length of the line table was different from the expected value of 
// DWARF2-NEXT: total_length: 0x00000077
For some of the tested configurations the generated total_length was 0x0000008c, 0x00000091 or 0x00000089.

There are lot of tests in LLVM regression test suite that check against hardcoded value of line table length, so I used similar strategy. I wonder what's so special about this particular case and why is the length of line table is different.

I guess, in this particular test it's not necessary to check against a hardcoded value of the line table length. Instead, I could just make sure that for DWARF2 and DWARF3 we generate the length of the table 'X' and for DWARF4, we generate length 'X+1'. I'm not sure if it's easy to do with FileCheck. Can we use pattern matching in FileCheck to capture [[X]], when patterns are in different test configuration (i.e. being tested with different -check-prefix)? Can we use captured value in expressions to calculate [[X+1]] similar to how it's done with [[@LINE]]?

  Script:
  --
  /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/llvm-mc -g -dwarf-version 2 -triple  i686-pc-linux-gnu /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/test/DebugInfo/X86/debug-line-version.s -filetype=obj -o - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/llvm-dwarfdump - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/FileCheck --check-prefix=DWARF2 /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/test/DebugInfo/X86/debug-line-version.s
  /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/llvm-mc -g -dwarf-version 3 -triple  i686-pc-linux-gnu /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/test/DebugInfo/X86/debug-line-version.s -filetype=obj -o -  |/home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/llvm-dwarfdump - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/FileCheck --check-prefix=DWARF3 /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/test/DebugInfo/X86/debug-line-version.s
  /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/llvm-mc -g -dwarf-version 4 -triple  i686-pc-linux-gnu /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/test/DebugInfo/X86/debug-line-version.s -filetype=obj -o - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/llvm-dwarfdump - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/./bin/FileCheck  --check-prefix=DWARF4 /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/test/DebugInfo/X86/debug-line-version.s
  --
  Exit Code: 1
  
  Command Output (stderr):
  --
  /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/test/DebugInfo/X86/debug-line-version.s:20:17: error: expected string not found in input
  // DWARF2-NEXT: total_length: 0x00000077
                  ^
  <stdin>:67:2: note: scanning from here
   total_length: 0x00000091
   ^


Repository:
  rL LLVM

https://reviews.llvm.org/D16697





More information about the llvm-commits mailing list