[llvm-bugs] [Bug 35814] New: After r316416, Assertion failed: ((size_t)StackDisp < Context.MovVector.size() && "Function call has more parameters than the stack is adjusted for."), function collectCallInfo, file lib/Target/X86/X86CallFrameOptimization.c

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 3 15:42:08 PST 2018


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

            Bug ID: 35814
           Summary: After r316416, Assertion failed: ((size_t)StackDisp <
                    Context.MovVector.size() && "Function call has more
                    parameters than the stack is adjusted for."), function
                    collectCallInfo, file
                    lib/Target/X86/X86CallFrameOptimization.c
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org

As reported in https://bugs.freebsd.org/224863, clang 6.0.0 (trunk r321545)
asserts on compiling oleacc_classes_p.c of the emulators/wine port:


Starting program: /usr/bin/clang -cc1 -triple x86_64-unknown-freebsd12.0
-emit-obj -disable-free -main-file-name oleacc_classes_p.c -mrelocation-model
pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/wrkdirs/usr/ports/emulators/wine-devel/work/wine-3.0-rc4/dlls/oleacc/oleacc_classes_p.gcno
-D __WINESRC__ -D _REENTRANT -O2 -Wall -Wdeclaration-after-statement
-Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits -Wvla
-Wwrite-strings -Wpointer-arith -fconst-strings -ferror-limit 19
-fmessage-length 101 -stack-protector 1 -fobjc-runtime=gnustep
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-x c oleacc_classes_p-3e201b.c
Assertion failed: ((size_t)StackDisp < Context.ArgStoreVector.size() &&
"Function call has more parameters than the stack is adjusted for."), function
collectCallInfo, file
/share/dim/src/freebsd/clang600-import/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp,
line 449.

Program received signal SIGABRT, Aborted.
thr_kill () at thr_kill.S:3
3       thr_kill.S: No such file or directory.
(gdb) bt
#0  thr_kill () at thr_kill.S:3
#1  0x00000000041090bf in __raise (s=6) at
/share/dim/src/freebsd/clang600-import/lib/libc/gen/raise.c:54
#2  0x0000000004109039 in abort () at
/share/dim/src/freebsd/clang600-import/lib/libc/stdlib/abort.c:67
#3  0x000000000417864a in __assert (func=<optimized out>, file=<optimized out>,
line=<optimized out>, failedexpr=<optimized out>) at
/share/dim/src/freebsd/clang600-import/lib/libc/gen/assert.c:53
#4  0x00000000029d5577 in collectCallInfo () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp:448
#5  runOnMachineFunction () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp:264
#6  0x0000000003c96876 in runOnFunction () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp:62
#7  0x000000000374326a in runOnFunction () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/lib/IR/LegacyPassManager.cpp:1520
#8  0x0000000003743553 in runOnModule () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/lib/IR/LegacyPassManager.cpp:1541
#9  0x0000000003743a82 in runOnModule () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/lib/IR/LegacyPassManager.cpp:1597
#10 run () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/lib/IR/LegacyPassManager.cpp:1700
#11 0x00000000015c9518 in EmitAssembly () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:815
#12 EmitBackendOutput () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1181
#13 0x00000000015c3894 in HandleTranslationUnit () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292
#14 0x0000000001fbd372 in ParseAST () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp:159
#15 0x00000000019d236e in Execute () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:897
#16 0x00000000027b7b71 in ExecuteAction () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:991
#17 0x00000000015a1a33 in ExecuteCompilerInvocation () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252
#18 0x00000000015967d0 in cc1_main () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp:221
#19 0x000000000159effa in ExecuteCC1Tool () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/tools/driver/driver.cpp:309
#20 main () at
/share/dim/src/freebsd/clang600-import/contrib/llvm/tools/clang/tools/driver/driver.cpp:388

The test case minimizes to:

/* clang -cc1 -triple x86_64 -S -O1 oleacc_classes_p-minimized.c */
struct {
  struct {
    struct {
      short a;
      struct {
        struct {
          void *b;
          int c;
        };
      };
    };
  };
} d;
int e, f;
void g() __attribute__((ms_abi));
void h() { g(d, f, e, d, d); }

This regressed with https://reviews.llvm.org/rL316416, which is a fix for bug
34903.

-- 
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/20180103/77b7c6f7/attachment-0001.html>


More information about the llvm-bugs mailing list