llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.6k stars 11.82k forks source link

Assertion failed: isRegBase() && "Invalid base register access!" #46384

Closed yowl closed 4 years ago

yowl commented 4 years ago
Bugzilla Link 47040
Resolution FIXED
Resolved on Aug 09, 2020 15:15
Version 11.0
OS Windows NT
Attachments Source LLVM produced by CoreRT compiler (I work occasionally on CoreRT)
CC @dschuff,@zygoloid,@tlively
Fixed by commit(s) cc612c29084e907900ce63ad9031ab573a64e942

Extended Description

Compiling the attached LLVM bitcode fails with the message in summary.

clang++ is version 11.0.0 Stack is

  1. Code generation
  2. Running pass 'Function Pass Manager' on module 'e:\b.bc'.
  3. Running pass 'WebAssembly Instruction Selection' on function '@System_Net_NameResolution_Interop_Sys_IPAddress__Equals'

    ​0 0x00007ff789c88146 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x10a8146)

    ​1 0x00007ffe6ef81861 (C:\WINDOWS\System32\ucrtbase.dll+0x71861)

    ​2 0x00007ffe6ef82831 (C:\WINDOWS\System32\ucrtbase.dll+0x72831)

    ​3 0x00007ffe6ef8424e (C:\WINDOWS\System32\ucrtbase.dll+0x7424e)

    ​4 0x00007ffe6ef84145 (C:\WINDOWS\System32\ucrtbase.dll+0x74145)

    ​5 0x00007ffe6ef844d1 (C:\WINDOWS\System32\ucrtbase.dll+0x744d1)

    ​6 0x00007ff789014300 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x434300)

    ​7 0x00007ff789014219 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x434219)

    ​8 0x00007ff789013872 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x433872)

    ​9 0x00007ff789013872 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x433872)

    ​10 0x00007ff78900a597 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x42a597)

    ​11 0x00007ff78aa62bcf (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x1e82bcf)

    ​12 0x00007ff78a8c4366 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x1ce4366)

    ​13 0x00007ff78a8c09df (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x1ce09df)

    ​14 0x00007ff788fed8e0 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x40d8e0)

    ​15 0x00007ff7892bbbce (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x6dbbce)

    ​16 0x00007ff7895ef8b4 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0xa0f8b4)

    ​17 0x00007ff7895efc03 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0xa0fc03)

    ​18 0x00007ff7895f02ed (E:\GitHub\emsdk\upstream\bin\clang++.exe+0xa102ed)

    ​19 0x00007ff789f65920 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x1385920)

    ​20 0x00007ff78c6cffdd (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x3aeffdd)

    ​21 0x00007ff78a53d215 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x195d215)

    ​22 0x00007ff78a4f9f2c (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x1919f2c)

    ​23 0x00007ff78a5b1c0d (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x19d1c0d)

    ​24 0x00007ff788be75fa (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x75fa)

    ​25 0x00007ff788be4914 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x4914)

    ​26 0x00007ff78a48e396 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x18ae396)

    ​27 0x00007ff789c71543 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x1091543)

    ​28 0x00007ff78a48dbd3 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x18adbd3)

    ​29 0x00007ff78a38f8a5 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x17af8a5)

    ​30 0x00007ff78a38fc4b (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x17afc4b)

    ​31 0x00007ff78a37c2a7 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x179c2a7)

    ​32 0x00007ff788be42cf (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x42cf)

    ​33 0x00007ff78c6f9650 (E:\GitHub\emsdk\upstream\bin\clang++.exe+0x3b19650)

    ​34 0x00007ffe6ff96fd4 (C:\WINDOWS\System32\KERNEL32.DLL+0x16fd4)

    ​35 0x00007ffe7101cec1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x4cec1)

    clang++: error: clang frontend command failed due to signal (use -v to see invocation)

Commands to produce the error are (assuming input file in e:\b.ll)

emcc e:\b.bc -c -o e:\b.o

E:/GitHub/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -DEMSCRIPTEN_major=1 -DEMSCRIPTEN_minor=39 -DEMSCRIPTEN_tiny__=19 -D_LIBCPP_ABI_VERSION=2 -Dunix -Dunix -Dunix -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\include\libcxx -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\lib\libunwind\include -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\include\compat -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\include -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\include\libc -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\local\include -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\include\SSE -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\cache\wasm\include -DEMSCRIPTEN -fignore-exceptions -c e:\b.bc -Xclang -isystemE:\GitHub\emsdk\upstream\emscripten\system\include\SDL -c -o e:\b.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr

yowl commented 4 years ago

Thanks, confirmed that the original bitcode file compiles with this fix.

yowl commented 4 years ago

assigned to @tlively