Issue 182337
Summary Unreachable hit in DwarfCompileUnit.cpp
Labels crash-on-valid
Assignees
Reporter ilovepi
    We're seeing an ICE when building Fuchsia code on arm platforms.

Bot: https://ci.chromium.org/ui/p/fuchsia/builders/global.ci/clang_toolchain.ci.core.arm64-release-subbuild/b8689426228706026321/overview

Logs: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8689426228706026321/+/u/build/ninja/stdout

```
DWARF5 attribute with no GNU analog
UNREACHABLE executed at /usr/local/google/home/paulkirth/llvm-fork/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:1307!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang++ -cc1 -triple aarch64-unknown-fuchsia -O2 -emit-obj -massembler-fatal-warnings -disable-free -clear-ast-before-backend -main-file-name relocation_tests.cc -mrelocation-model pic -pic-level 1 -pic-is-pie -mframe-pointer=non-leaf-no-reserve -ffp-contract=on -fno-rounding-math -mconstructor-aliases -ffreestanding -enable-tlsdesc -target-cpu generic -target-feature +v8a -target-feature -aes -target-feature +crc -target-feature -crypto -target-feature -fp-armv8 -target-feature -neon -target-feature -sha2 -target-feature +tpidr-el1 -target-feature +reserve-x20 -target-feature +fix-cortex-a53-835769 -target-abi aapcs -tune-cpu generic -gkey-instructions -debug-info-kind=constructor -dwarf-version=4 -debugger-tuning=gdb --compress-debug-sections=zstd -fdebug-compilation-dir=. -mllvm -crash-diagnostics-dir=clang-crashreports -ffunction-sections -fdata-sections -fcoverage-compilation-dir=. -sys-header-deps -D _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D SMP_MAX_CPUS=16 -D _KERNEL -D LK -D ENABLE_PANIC_SHELL -D ZIRCON_TOOLCHAIN -D LK_DEBUGLEVEL=2 -D DEBUG_PRINT_LEVEL=2 -D VM_TRACING_LEVEL=0 -D FUTEX_BLOCK_TRACING_ENABLED=false -D LOCK_NAME_TRACING_ENABLED=false -D EXPERIMENTAL_THREAD_SAMPLER_ENABLED=false -D EXPERIMENTAL_KTRACE_STREAMING_ENABLED=true -D EXPERIMENTAL_CHANNEL_CALL_PROPAGATION_ENABLED=false -D EXPERIMENTAL_FORCE_NEW_WAKEUP_ACCOUNTING=false -D EXPERIMENTAL_CONTINUOUS_PER_VMO_ATTRIBUTION_ENABLED=false -D CHANNEL_MESSAGE_BODY_TRACING_ENABLED=false -D JTRACE_TARGET_BUFFER_SIZE=0 -D SCHEDULER_TRACING_LEVEL=0 -D SCHEDULER_QUEUE_TRACING_ENABLED=false -D SCHEDULER_EXTRA_INVARIANT_VALIDATION=false -D SCHEDULER_LOCK_SPIN_TRACING_COMPRESSED=false -D SCHEDULER_LOCK_SPIN_TRACING_ENABLED=false -D WAIT_QUEUE_DEPTH_TRACING_ENABLED=false -D ARCH_ARM64 -D KERNEL_IMAGE_MAX_SIZE=14680064 -D WITH_FRAME_POINTERS=1 -D ZX_ASSERT_LEVEL=2 -D LIB_ARCH_PAGING_CONFIGURATION=\"4k-48bit\" -Wall -Wextra -Wconversion -Wextra-semi -Wimplicit-fallthrough -Wnewline-eof -Wstrict-prototypes -Wwrite-strings -Wno-sign-conversion -Wno-unused-parameter -Wnonportable-system-include-path -Wno-missing-field-initializers -Wno-extra-qualification -Wno-cast-function-type-mismatch -Wno-unknown-warning-option -Wno-missing-template-arg-list-after-template-kw -Wno-deprecated-pragma -Wno-nontrivial-memaccess -Wthread-safety -Wno-unknown-warning-option -Wno-thread-safety-reference-return -Werror -Wformat=2 -Wmissing-declarations -Wvla -Wshadow -Wno-deprecated-this-capture -ffuchsia-api-level=4293918720 -std=c++20 -fdeprecated-macro -fstack-size-section -ferror-limit 19 -ftemplate-backtrace-limit=0 -fvisibility=hidden -fvisibility-inlines-hidden -fno-finite-loops -stack-protector 2 -ftrivial-auto-var-init=pattern -fno-builtin -fno-rtti -fno-signed-char -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fsized-deallocation -faligned-allocation -fnew-alignment=8 -fcolor-diagnostics -vectorize-loops -vectorize-slp -debug-info-kind=constructor -fexperimental-omit-vtable-rtti -fsanitize=shadow-call-stack -fno-sanitize-memory-param-retval -fno-sanitize-address-use-odr-indicator -target-feature -outline-atomics -faddrsig -fdwarf2-cfi-asm -x c++ relocation_tests-3704d1.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'relocation_tests-3704d1.cpp'.
4. Running pass 'AArch64 Assembly Printer' on function '@_ZN12_GLOBAL__N_121test_virtual_dispatchEv'
#0 0x000055adcdcccc48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/local/google/home/paulkirth/llvm-fork/llvm/lib/Support/Unix/Signals.inc:880:13
relocation_tests-3704d1.sh: line 4: 2301366 Aborted                    (core dumped) "clang++" "-cc1" "-triple" "aarch64-unknown-fuchsia" "-O2" "-emit-obj" "-massembler-fatal-warnings" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "relocation_tests.cc" "-mrelocation-model" "pic" "-pic-level" "1" "-pic-is-pie" "-mframe-pointer=non-leaf-no-reserve" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-ffreestanding" "-enable-tlsdesc" "-target-cpu" "generic" "-target-feature" "+v8a" "-target-feature" "-aes" "-target-feature" "+crc" "-target-feature" "-crypto" "-target-feature" "-fp-armv8" "-target-feature" "-neon" "-target-feature" "-sha2" "-target-feature" "+tpidr-el1" "-target-feature" "+reserve-x20" "-target-feature" "+fix-cortex-a53-835769" "-target-abi" "aapcs" "-tune-cpu" "generic" "-gkey-instructions" "-debug-info-kind=constructor" "-dwarf-version=4" "-debugger-tuning=gdb" "--compress-debug-sections=zstd" "-fdebug-compilation-dir=." "-mllvm" "-crash-diagnostics-dir=clang-crashreports" "-ffunction-sections" "-fdata-sections" "-fcoverage-compilation-dir=." "-sys-header-deps" "-D" "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS" "-D" "_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1" "-D" "SMP_MAX_CPUS=16" "-D" "_KERNEL" "-D" "LK" "-D" "ENABLE_PANIC_SHELL" "-D" "ZIRCON_TOOLCHAIN" "-D" "LK_DEBUGLEVEL=2" "-D" "DEBUG_PRINT_LEVEL=2" "-D" "VM_TRACING_LEVEL=0" "-D" "FUTEX_BLOCK_TRACING_ENABLED=false" "-D" "LOCK_NAME_TRACING_ENABLED=false" "-D" "EXPERIMENTAL_THREAD_SAMPLER_ENABLED=false" "-D" "EXPERIMENTAL_KTRACE_STREAMING_ENABLED=true" "-D" "EXPERIMENTAL_CHANNEL_CALL_PROPAGATION_ENABLED=false" "-D" "EXPERIMENTAL_FORCE_NEW_WAKEUP_ACCOUNTING=false" "-D" "EXPERIMENTAL_CONTINUOUS_PER_VMO_ATTRIBUTION_ENABLED=false" "-D" "CHANNEL_MESSAGE_BODY_TRACING_ENABLED=false" "-D" "JTRACE_TARGET_BUFFER_SIZE=0" "-D" "SCHEDULER_TRACING_LEVEL=0" "-D" "SCHEDULER_QUEUE_TRACING_ENABLED=false" "-D" "SCHEDULER_EXTRA_INVARIANT_VALIDATION=false" "-D" "SCHEDULER_LOCK_SPIN_TRACING_COMPRESSED=false" "-D" "SCHEDULER_LOCK_SPIN_TRACING_ENABLED=false" "-D" "WAIT_QUEUE_DEPTH_TRACING_ENABLED=false" "-D" "ARCH_ARM64" "-D" "KERNEL_IMAGE_MAX_SIZE=14680064" "-D" "WITH_FRAME_POINTERS=1" "-D" "ZX_ASSERT_LEVEL=2" "-D" "LIB_ARCH_PAGING_CONFIGURATION=\"4k-48bit\"" "-Wall" "-Wextra" "-Wconversion" "-Wextra-semi" "-Wimplicit-fallthrough" "-Wnewline-eof" "-Wstrict-prototypes" "-Wwrite-strings" "-Wno-sign-conversion" "-Wno-unused-parameter" "-Wnonportable-system-include-path" "-Wno-missing-field-initializers" "-Wno-extra-qualification" "-Wno-cast-function-type-mismatch" "-Wno-unknown-warning-option" "-Wno-missing-template-arg-list-after-template-kw" "-Wno-deprecated-pragma" "-Wno-nontrivial-memaccess" "-Wthread-safety" "-Wno-unknown-warning-option" "-Wno-thread-safety-reference-return" "-Werror" "-Wformat=2" "-Wmissing-declarations" "-Wvla" "-Wshadow" "-Wno-deprecated-this-capture" "-ffuchsia-api-level=4293918720" "-std=c++20" "-fdeprecated-macro" "-fstack-size-section" "-ferror-limit" "19" "-ftemplate-backtrace-limit=0" "-fvisibility=hidden" "-fvisibility-inlines-hidden" "-fno-finite-loops" "-stack-protector" "2" "-ftrivial-auto-var-init=pattern" "-fno-builtin" "-fno-rtti" "-fno-signed-char" "-fgnuc-version=4.2.1" "-fno-implicit-modules" "-fskip-odr-check-in-gmf" "-fsized-deallocation" "-faligned-allocation" "-fnew-alignment=8" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-debug-info-kind=constructor" "-fexperimental-omit-vtable-rtti" "-fsanitize=shadow-call-stack" "-fno-sanitize-memory-param-retval" "-fno-sanitize-address-use-odr-indicator" "-target-feature" "-outline-atomics" "-faddrsig" "-fdwarf2-cfi-asm" "-x" "c++" "relocation_tests-3704d1.cpp"
```

Reproducer (unreduced): https://storage.mtls.cloud.google.com/fuchsia-artifacts/builds/8689426278085384737/build-debug/clang-crashreports/relocation_tests-3704d1.tar


Looking at the blamelist: https://github.com/llvm/llvm-project/pull/167666 seems potentially related, though I haven't had a chance to test w/ a revert or bisect. @CarlosAlbertoEnciso would you mind taking a look while I kick off a reduction and bisect? It may be obvious to you if this is related. I just assumed it could be since that PR is debug related and the error seems to be in DWARF handling.

CC: @dwblaikie @felipepiovezan 


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to