[llvm-bugs] [Bug 43950] New: Segfault while building zircon

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 8 17:56:53 PST 2019


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

            Bug ID: 43950
           Summary: Segfault while building zircon
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: leonardchan at google.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Created attachment 22787
  --> https://bugs.llvm.org/attachment.cgi?id=22787&action=edit
reproducer.tar.gz

We hit the following segfault when building zircon:

```
[2806/49927] CXX
kernel-arm64-clang/obj/kernel/dev/interrupt/arm_gic/v3/v3.arm_gicv3.cc.o
FAILED:
kernel-arm64-clang/obj/kernel/dev/interrupt/arm_gic/v3/v3.arm_gicv3.cc.o 
../../../../llvm-monorepo/llvm-build-2-master-fuchsia-toolchain/install/bin//clang++
-MD -MF
kernel-arm64-clang/obj/kernel/dev/interrupt/arm_gic/v3/v3.arm_gicv3.cc.o.d -o
kernel-arm64-clang/obj/kernel/dev/interrupt/arm_gic/v3/v3.arm_gicv3.cc.o
-DTOOLCHAIN_VERSION=/usr/local/google/home/leonardchan/llvm-monorepo/llvm-build-2-master-fuchsia-toolchain/install/bin/
-DZX_DEBUGLEVEL=2 -DLK_DEBUGLEVEL=2 -DWITH_FRAME_POINTERS=1
-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -DKERNEL_BASE=0xffffffff00000000
-DSMP_MAX_CPUS=16 -D_KERNEL -DLK -DENABLE_PANIC_SHELL -DWITH_DEBUG_LINEBUFFER
-DZIRCON_TOOLCHAIN -DWITH_KERNEL_PCIE -DWITH_FAIR_SCHEDULER=1 -DARCH_ARM64
-DKERNEL_ASPACE_BASE=0xffff000000000000 -DKERNEL_ASPACE_SIZE=0x0001000000000000
-DUSER_ASPACE_BASE=0x0000000001000000 -DUSER_ASPACE_SIZE=0x0000fffffe000000
-I../../zircon/kernel/include -I../../zircon/kernel/lib/libc/include
-I../../zircon/kernel/lib/io/include -I../../zircon/kernel/lib/heap/include
-I../../zircon/system/ulib/lazy_init/include
-I../../zircon/system/ulib/lockdep/include
-I../../zircon/system/ulib/ffl/include -I../../zircon/kernel/vm/include
-I../../zircon/kernel/lib/user_copy/include
-I../../zircon/system/ulib/zircon-internal/include
-I../../zircon/kernel/lib/ktrace/include -I../../zircon/system/ulib/fbl/include
-I../../zircon/kernel/lib/fbl/include -I../../zircon/system/public
-I../../zircon/kernel/arch/arm64/include
-I../../zircon/kernel/dev/interrupt/arm_gic/v3/include
-I../../zircon/kernel/dev/interrupt/include
-I../../zircon/kernel/dev/interrupt/arm_gic/common/include
-I../../zircon/kernel/dev/interrupt/arm_gic/v2/include
-I../../zircon/system/ulib/region-alloc/include
-I../../zircon/kernel/dev/pcie/include -I../../zircon/kernel/dev/pdev/include
-idirafter ../../zircon/kernel/lib/libc/limits-dummy -fno-common
--target=aarch64-fuchsia -mcpu=cortex-a53 -ffixed-x18
-fcrash-diagnostics-dir=clang-crashreports -fcolor-diagnostics
-fdebug-prefix-map=/usr/local/google/home/leonardchan/other-fuchsia-checkouts/fuchsia/out/default.zircon=.
-fdebug-prefix-map=/usr/local/google/home/leonardchan/other-fuchsia-checkouts/fuchsia/out=..
-fdebug-prefix-map=/usr/local/google/home/leonardchan/other-fuchsia-checkouts/fuchsia=../..
-no-canonical-prefixes -O2 -g3 -Wall -Wextra -Wno-unused-parameter
-Werror=unused-label -Werror=return-type -Wno-address-of-packed-member
-Wnewline-eof -Wno-unknown-warning-option -Wno-c99-designator
-Wno-int-in-bool-context -fno-omit-frame-pointer -ffunction-sections
-fdata-sections -Wthread-safety -Wimplicit-fallthrough -fvisibility=hidden
-ftrivial-auto-var-init=pattern -Werror -Wno-error=deprecated-declarations
-fpie -ffreestanding -include ../../zircon/kernel/include/hidden.h
-fno-unwind-tables -mgeneral-regs-only -Wformat=2 -Wvla -ffixed-x15
-mcmodel=kernel -fno-sanitize=safe-stack -fsanitize=shadow-call-stack
-fdata-sections -Wno-gnu-string-literal-operator-template -std=c++17
-Wconversion -Wno-sign-conversion -Wextra-semi -Wno-deprecated-copy
-ftemplate-backtrace-limit=0 -fno-exceptions -fno-rtti -fno-threadsafe-statics
-fvisibility-inlines-hidden -faligned-new=8 -fno-exceptions -c
../../zircon/kernel/dev/interrupt/arm_gic/v3/arm_gicv3.cc
clang++: error: unable to execute command: Segmentation fault
clang++: error: clang frontend command failed due to signal (use -v to see
invocation)
Fuchsia clang version 10.0.0 (https://github.com/llvm/llvm-project.git
01b10bc7b14963902405d202ac78cd88d44adbc5) (based on LLVM 10.0.0svn)
Target: aarch64-unknown-fuchsia
Thread model: posix
InstalledDir:
../../../../llvm-monorepo/llvm-build-2-master-fuchsia-toolchain/install/bin
clang++: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: clang-crashreports/arm_gicv3-6dd0ee.cpp
clang++: note: diagnostic msg: clang-crashreports/arm_gicv3-6dd0ee.sh
clang++: note: diagnostic msg: 

********************

```

We have bisected the faulty commit to https://reviews.llvm.org/D69664.

Reproducer attached.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191109/5435d34c/attachment.html>


More information about the llvm-bugs mailing list