[llvm-bugs] [Bug 45366] New: [PPC] Assertion failed:`isVariable() && "Invalid accessor!"'

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 30 21:03:05 PDT 2020


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

            Bug ID: 45366
           Summary: [PPC] Assertion failed:`isVariable() && "Invalid
                    accessor!"'
           Product: tools
           Version: 10.0
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: unassignedbugs at nondot.org
          Reporter: v.churavy at gmail.com
                CC: llvm-bugs at lists.llvm.org

We are observing segmentation faults and corresponding assertion errors on PPC
since upgrading to LLVM 8/9/10 from LLVM 6.

Corresponding downstream issue: https://github.com/JuliaLang/julia/issues/35025

The assertion error for LLVM 9 is:

```
julia-debug:
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/include/llvm/MC/MCSymbol.h:303:
const llvm::MCExpr* llvm::MCSymbol::getVariableValue(bool) const: Assertion
`isVariable() && "Invalid accessor!"' failed.

signal (6): Aborted
in expression starting at none:0
gsignal at /lib64/libc.so.6 (unknown line)
abort at /lib64/libc.so.6 (unknown line)
__assert_fail_base at /lib64/libc.so.6 (unknown line)
__assert_fail at /lib64/libc.so.6 (unknown line)
getVariableValue at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/include/llvm/MC/MCSymbol.h:303
finish at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp:199
Finish at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/lib/MC/MCStreamer.cpp:911
doFinalization at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1666
doFinalization at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/lib/Target/PowerPC/PPCAsmPrinter.cpp:1386
doFinalization at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/lib/IR/LegacyPassManager.cpp:1703
runOnModule at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/lib/IR/LegacyPassManager.cpp:1779
run at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/lib/IR/LegacyPassManager.cpp:1863
run at
/home/vchuravy/julia/deps/srccache/llvm-9.0.1/lib/IR/LegacyPassManager.cpp:1894
operator() at /home/vchuravy/julia/src/jitlayers.cpp:1025
jl_dump_native at /home/vchuravy/julia/src/jitlayers.cpp:1064
jl_write_compiler_output at /home/vchuravy/julia/src/precompile.c:93
jl_atexit_hook at /home/vchuravy/julia/src/init.c:227
main at /home/vchuravy/julia/ui/repl.c:218
generic_start_main.isra.0 at /lib64/libc.so.6 (unknown line)
__libc_start_main at /lib64/libc.so.6 (unknown line)
Allocations: 160184348 (Pool: 160149044; Big: 35304); GC: 158
```

I was unsuccessful in reproducing it outside Julia sofar.

A corresponding segmentation fault in LLVM10 looks like:

```
signal (11): Segmentation fault
in expression starting at none:0
_ZN12_GLOBAL__N_120PPCTargetELFStreamer6finishEv at
/buildworker/worker/package_linuxppc64le/build/usr/bin/../lib/libLLVM-10jl.so
(unknown line)
Allocations: 159123504 (Pool: 159085215; Big: 38289); GC: 131
Segmentation fault (core dumped)
make[1]: ***
[/buildworker/worker/package_linuxppc64le/build/usr/lib/julia/sys-o.a] Error 1
```

To reproduce with Julia:

```
git clone https://github.com/JuliaLang/julia
git checkout vc/upgrade_llvm_10

cat <<EOT >> Make.user
USE_BINARYBUILDER=0
LLVM_DEBUG=1
LLVM_ASSERTIONS=1
FORCE_ASSERTIONS=1
EOT
```

I will continue to try to reproduce this outside Julia

-- 
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/20200331/3f588aaf/attachment-0001.html>


More information about the llvm-bugs mailing list