[Lldb-commits] [lldb] r367549 - [lit] Use ld.lld -z separate-code to work around a debug_line parsing bug

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 1 13:44:30 PDT 2019


This breaks the tests on my machine:

********************
FAIL: LLDB :: SymbolFile/DWARF/dir-separator-no-comp-dir.s (114 of 1660)
******************** TEST 'LLDB ::
SymbolFile/DWARF/dir-separator-no-comp-dir.s' FAILED
********************
Script:
--
: 'RUN: at line 6';   /home/teemperor/work/3llvm/rel/bin/llvm-mc
-triple x86_64-pc-linux
/home/teemperor/work/3llvm/llvm/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s
-filetype=obj >
/home/teemperor/work/3llvm/rel/tools/lldb/lit/SymbolFile/DWARF/Output/dir-separator-no-comp-dir.s.tmp.o
: 'RUN: at line 7';   /usr/bin/ld.lld -z separate-code
/home/teemperor/work/3llvm/rel/tools/lldb/lit/SymbolFile/DWARF/Output/dir-separator-no-comp-dir.s.tmp.o
-o /home/teemperor/work/3llvm/re
l/tools/lldb/lit/SymbolFile/DWARF/Output/dir-separator-no-comp-dir.s.tmp
: 'RUN: at line 8';   /home/teemperor/work/3llvm/rel/bin/lldb
--no-lldbinit -S
/home/teemperor/work/3llvm/rel/tools/lldb/lit/lit-lldb-init
/home/teemperor/work/3llvm/rel/tools/lldb/lit/Symbol
File/DWARF/Output/dir-separator-no-comp-dir.s.tmp -s
/home/teemperor/work/3llvm/llvm/lldb/lit/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit
-o exit | /home/teemperor/work/3llvm/rel/b
in/FileCheck /home/teemperor/work/3llvm/llvm/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s
--
Exit Code: 1

Command Output (stderr):
--
ld.lld: error: unknown -z value: separate-code

--

> ld.lld -v
LLD 8.0.1 (compatible with GNU linkers)

Do I need 9.0.0 for this to pass?

Am Do., 1. Aug. 2019 um 14:38 Uhr schrieb Pavel Labath via
lldb-commits <lldb-commits at lists.llvm.org>:
>
> On 01/08/2019 14:34, Fangrui Song via lldb-commits wrote:
> > Author: maskray
> > Date: Thu Aug  1 05:34:43 2019
> > New Revision: 367549
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=367549&view=rev
> > Log:
> > [lit] Use ld.lld -z separate-code to work around a debug_line parsing bug
> >
> > The issue was exposed by D64903/r367537.
> > http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/7321/
> >
> > In these tests, .debug_str immediately follows .text.
> > The last section of last RX PT_LOAD was originally padded with trap
> > instructions and .debug_str started at a new page (actually
> > common-page-size). Now, .debug_str immediately follows .test.
> > Add -z separate-code to use the old layout.
> >
>
>
> Thanks, I was about to commit the same patch.
>
> For future reference, here is my analysis I was going to put into the
> commit message:
>
> ---
> The lld patch changed how it lays out data in segments, which was
> resulted in the tiny test funclets being at the very end of a PT_LOAD
> segment. This exposed a bug where lldb does not correctly handle line
> table end-of-sequence entries to the very end of a section (so the byte
> they point to does not actually belong to any section).
>
> This is mostly bening in practice, as the code handling line tables will
> terminate as soon as it is not able to resolve an address, which is
> something that would happen after reading the end-of-sequence entry
> anyway. However, these tests assert that we are actually able to parse
> and display the end entry itself, and so they fail.
> ---
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


More information about the lldb-commits mailing list