[lldb-dev] [Bug 41237] New: SIGSEGV on call expression evaluation when debugging Clang

via lldb-dev lldb-dev at lists.llvm.org
Tue Mar 26 04:35:14 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41237

            Bug ID: 41237
           Summary: SIGSEGV on call expression evaluation when debugging
                    Clang
           Product: lldb
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: jansvoboda11 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 21673
  --> https://bugs.llvm.org/attachment.cgi?id=21673&action=edit
Command line output with expression logging enabled, reproducer output.

I'm trying to debug Clang trunk, but when I try to evaluate any function call
via LLDB's 'expression' command, I get the following error:

error: Execution was interrupted, reason: signal SIGSEGV: invalid address
(fault address: 0x0).
The process has been returned to the state before expression evaluation.

When the function call is used in the Clang binary itself, it executes fine,
without any segmentation faults.
GDB evaluates the expression without any problems as well.
That's why I think this is an LLDB bug.
I wasn't able to quickly reproduce the bug with a binary smaller than Clang,
unfortunately.

The Clang binary was built in debug mode with Clang 8 using libc++ 8 and linked
with LLD 8.
I've encoutered this bug with LLDB 8 and 7 on x64 Linux (Ubuntu 18.04 LTS) with
all LLVM tools installed from the official APT repository.

Steps to reproduce:
* Install Ubuntu 18.04 on x64 machine
* Install LLVM 8 toolchain from: http://apt.llvm.org/
* Build Clang with LLVM 8 toolchain as (partially) described here:
http://clang.llvm.org/get_started.html
* Run $ lldb-8 ./llvm-project/build/bin/clang
  (lldb) b main
  (lldb) r
  (lldb) n
  (lldb) n
  (lldb) expr args.size()
* See the SIGSEGV error

I'm attaching the whole command line output with LLDB expression logging
enabled and with output of LLDB reproducer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190326/b8a2bccd/attachment.html>


More information about the lldb-dev mailing list