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

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@lists.llvm.org
Reporter jansvoboda11@gmail.com
CC llvm-bugs@lists.llvm.org

Created attachment 21673 [details]
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,

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/](http://apt.llvm.org/)
* Build Clang with LLVM 8 toolchain as (partially) described here:
* 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.

Johannes Altmanninger changed bug 41237