[llvm-bugs] [Bug 50981] New: Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jul 4 18:10:46 PDT 2021


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

            Bug ID: 50981
           Summary: Assertion `(i >= FTy->getNumParams() ||
                    FTy->getParamType(i) == Args[i]->getType()) &&
                    "Calling a function with a bad signature!"' failed
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bero at lindev.ch
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Building darktable 3.6.0 with clang 12.0.1-rc4 on x86_64 linux with OpenMP
support and -g enabled results in:

clang:
/builddir/build/BUILD/llvm-project-release-12.x/llvm/lib/IR/Instructions.cpp:446:
void llvm::CallInst::init(llvm::FunctionType *, llvm::Value *,
ArrayRef<llvm::Value *>, ArrayRef<llvm::OperandBundleDef>, const llvm::Twine
&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) ==
Args[i]->getType()) && "Calling a function with a bad signature!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/bin/clang -DAVIF_DLL -DGDK_DISABLE_DEPRECATED
-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_22
-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_MIN_REQUIRED
-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGTK_DISABLE_DEPRECATED
-DGTK_DISABLE_SINGLE_INCLUDES -DHAVE_BUILTIN_CPU_SUPPORTS -DHAVE_CONFIG_H
-DHAVE_GAME -DHAVE_GPHOTO2 -DHAVE_GPHOTO_25_OR_NEWER -DHAVE_GRAPHICSMAGICK
-DHAVE_HTTP_SERVER -DHAVE_ICU -DHAVE_ISO_CODES -DHAVE_KWALLET -DHAVE_LENSFUN
-DHAVE_LIBAVIF=1 -DHAVE_LIBSECRET -DHAVE_MAP -DHAVE_OPENCL -DHAVE_OPENEXR
-DHAVE_OPENJPEG -DHAVE_OSMGPSMAP_110_OR_NEWER -DHAVE_PRINT
-DHAVE_SQLITE_324_OR_NEWER -DSQLITE_CORE -DSQLITE_ENABLE_ICU -DUSE_COLORDGTK
-D_RELEASE -D_XOPEN_SOURCE=700 -D__GDK_KEYSYMS_COMPAT_H__ -Dliquify_EXPORTS
-Ilib64/darktable/plugins -I../src/iop -I../src -Ibin -isystem ../src/external
-isystem ../src/external/OpenCL -isystem /usr/include/glib-2.0 -isystem
/usr/lib64/glib-2.0/include -isystem /usr/include/gtk-3.0 -isystem
/usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem
/usr/include/freetype2 -isystem /usr/include/libpng16 -isystem
/usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi
-isystem /usr/include/uuid -isystem /usr/include/cairo -isystem
/usr/include/pixman-1 -isystem /usr/include/gdk-pixbuf-2.0 -isystem
/usr/include/gio-unix-2.0 -isystem /usr/include/atk-1.0 -isystem
/usr/include/at-spi2-atk/2.0 -isystem /usr/include/dbus-1.0 -isystem
/usr/lib64/dbus-1.0/include -isystem /usr/include/at-spi-2.0 -isystem
/usr/include/libxml2 -isystem /usr/include/libsoup-2.4 -isystem
/usr/include/sysprof-4 -isystem /usr/include/OpenEXR -isystem
/usr/include/lensfun -isystem /usr/include/librsvg-2.0 -isystem
/usr/include/json-glib-1.0 -isystem /usr/include/openjpeg-2.4 -isystem
/usr/include/libsecret-1 -isystem /usr/include/GraphicsMagick -isystem
/usr/include/osmgpsmap-1.0 -isystem /usr/include/colord-1 -Os
-fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all
--param=ssp-buffer-size=4 -O3 -m64 -march=znver1 -mtune=znver1 -mmmx -msse
-msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt
-mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave
-mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -flto
-fopenmp-version=50 -Wall -Wformat -Wformat-security -Wshadow -Wtype-limits
-Wvla -Wthread-safety -Wno-unknown-pragmas -Wno-error=varargs
-Wno-error=address-of-packed-member -std=c99 -fopenmp=libomp -mtune=generic
-msse2 -g -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all
--param=ssp-buffer-size=4 -O3 -m64 -march=znver1 -mtune=znver1 -mmmx -msse
-msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt
-mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave
-mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -flto -DNDEBUG -O3
-ffast-math -fno-finite-math-only -fPIC -fvisibility=hidden
-Wno-error=pass-failed -include common/module_api.h -include iop/iop_api.h -MD
-MT lib64/darktable/plugins/CMakeFiles/liquify.dir/introspection_liquify.c.o
-MF lib64/darktable/plugins/CMakeFiles/liquify.dir/introspection_liquify.c.o.d
-o lib64/darktable/plugins/CMakeFiles/liquify.dir/introspection_liquify.c.o -c
lib64/darktable/plugins/introspection_liquify.c
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.     
/home/bero/abf/darktable/BUILD/darktable-3.6.0/src/iop/liquify.c:878:13:
Generating code for declaration 'build_round_stamp'
 #0 0x00007f317bd36201 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/usr/lib64/libLLVMSupport.so.12.0+0x232201)
 #1 0x00007f317bd364dd (/usr/lib64/libLLVMSupport.so.12.0+0x2324dd)
 #2 0x00007f317bd33e2a llvm::sys::RunSignalHandlers()
(/usr/lib64/libLLVMSupport.so.12.0+0x22fe2a)
 #3 0x00007f317bd3541b llvm::sys::CleanupOnSignal(unsigned long)
(/usr/lib64/libLLVMSupport.so.12.0+0x23141b)
 #4 0x00007f317bc443a5 (/usr/lib64/libLLVMSupport.so.12.0+0x1403a5)
 #5 0x00007f317bc445b5 (/usr/lib64/libLLVMSupport.so.12.0+0x1405b5)
 #6 0x00007f317b733360 (/lib64/libc.so.6+0x40360)
 #7 0x00007f317b7332dc raise (/lib64/libc.so.6+0x402dc)
 #8 0x00007f317b719538 abort (/lib64/libc.so.6+0x26538)
 #9 0x00007f317b719421 (/lib64/libc.so.6+0x26421)
#10 0x00007f317b72a772 (/lib64/libc.so.6+0x37772)
#11 0x00007f317c224000 llvm::CallInst::init(llvm::FunctionType*, llvm::Value*,
llvm::ArrayRef<llvm::Value*>,
llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&)
(/usr/lib64/libLLVMCore.so.12.0+0x3b5000)
#12 0x00007f317f499f5a (/usr/lib64/libclangCodeGen.so.12.0+0x377f5a)
#13 0x00007f317f4c835b (/usr/lib64/libclangCodeGen.so.12.0+0x3a635b)
#14 0x00007f317f4bf2cd
clang::CodeGen::CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee,
llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)
(/usr/lib64/libclangCodeGen.so.12.0+0x39d2cd)
#15 0x00007f317f4bf1f8
clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(llvm::FunctionCallee,
llvm::ArrayRef<llvm::Value*>, llvm::Twine const&)
(/usr/lib64/libclangCodeGen.so.12.0+0x39d1f8)
#16 0x00007f317f665b25
clang::CodeGen::CGOpenMPRuntime::emitCall(clang::CodeGen::CodeGenFunction&,
clang::SourceLocation, llvm::FunctionCallee, llvm::ArrayRef<llvm::Value*>)
const (/usr/lib64/libclangCodeGen.so.12.0+0x543b25)
#17 0x00007f317f665c32
clang::CodeGen::CGOpenMPRuntime::emitOutlinedFunctionCall(clang::CodeGen::CodeGenFunction&,
clang::SourceLocation, llvm::FunctionCallee, llvm::ArrayRef<llvm::Value*>)
const (/usr/lib64/libclangCodeGen.so.12.0+0x543c32)
#18 0x00007f317f6d94e5
clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(clang::CapturedStmt
const&, clang::SourceLocation) (/usr/lib64/libclangCodeGen.so.12.0+0x5b74e5)
#19 0x00007f317f634c9c (/usr/lib64/libclangCodeGen.so.12.0+0x512c9c)
#20 0x00007f317f634a89
clang::CodeGen::CGOpenMPRuntime::emitParallelOutlinedFunction(clang::OMPExecutableDirective
const&, clang::VarDecl const*, llvm::omp::Directive,
clang::CodeGen::RegionCodeGenTy const&)
(/usr/lib64/libclangCodeGen.so.12.0+0x512a89)
#21 0x00007f317f6e36d6 (/usr/lib64/libclangCodeGen.so.12.0+0x5c16d6)
#22 0x00007f317f6ef7ae
clang::CodeGen::CodeGenFunction::EmitOMPParallelForDirective(clang::OMPParallelForDirective
const&) (/usr/lib64/libclangCodeGen.so.12.0+0x5cd7ae)
#23 0x00007f317f6c5eef clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/usr/lib64/libclangCodeGen.so.12.0+0x5a3eef)
#24 0x00007f317f6d1770
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
(/usr/lib64/libclangCodeGen.so.12.0+0x5af770)
#25 0x00007f317f7389e3
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*)
(/usr/lib64/libclangCodeGen.so.12.0+0x6169e3)
#26 0x00007f317f739472
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
(/usr/lib64/libclangCodeGen.so.12.0+0x617472)
#27 0x00007f317f75b96f
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/lib64/libclangCodeGen.so.12.0+0x63996f)
#28 0x00007f317f752393
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/lib64/libclangCodeGen.so.12.0+0x630393)
#29 0x00007f317f746b0f clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/lib64/libclangCodeGen.so.12.0+0x624b0f)
#30 0x00007f317f746b3f clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/lib64/libclangCodeGen.so.12.0+0x624b3f)
#31 0x00007f317f746b3f clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/lib64/libclangCodeGen.so.12.0+0x624b3f)
#32 0x00007f317f746b3f clang::CodeGen::CodeGenModule::EmitDeferred()
(/usr/lib64/libclangCodeGen.so.12.0+0x624b3f)
#33 0x00007f317f74543a clang::CodeGen::CodeGenModule::Release()
(/usr/lib64/libclangCodeGen.so.12.0+0x62343a)
#34 0x00007f317f8180cc (/usr/lib64/libclangCodeGen.so.12.0+0x6f60cc)
#35 0x00007f317f72e227 (/usr/lib64/libclangCodeGen.so.12.0+0x60c227)
#36 0x00007f31793c1e55 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib64/libclangParse.so.12.0+0x6de55)
#37 0x00007f317d99a0af clang::ASTFrontendAction::ExecuteAction()
(/usr/lib64/libclangFrontend.so.12.0+0x1d20af)
#38 0x00007f317f727fc0 clang::CodeGenAction::ExecuteAction()
(/usr/lib64/libclangCodeGen.so.12.0+0x605fc0)
#39 0x00007f317d999766 clang::FrontendAction::Execute()
(/usr/lib64/libclangFrontend.so.12.0+0x1d1766)
#40 0x00007f317d8fdc6a
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib64/libclangFrontend.so.12.0+0x135c6a)
#41 0x00007f31802ade26
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib64/libclangFrontendTool.so.12.0+0x5e26)
#42 0x00000000002196eb cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang+0x2196eb)
#43 0x0000000000216e1f (/usr/bin/clang+0x216e1f)
#44 0x00007f317d618fe4 (/usr/lib64/libclangDriver.so.12.0+0x113fe4)
#45 0x00007f317bc4428a
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/usr/lib64/libLLVMSupport.so.12.0+0x14028a)
#46 0x00007f317d6188df
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
(/usr/lib64/libclangDriver.so.12.0+0x1138df)
#47 0x00007f317d5d92ac
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/usr/lib64/libclangDriver.so.12.0+0xd42ac)
#48 0x00007f317d5d95ba
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/usr/lib64/libclangDriver.so.12.0+0xd45ba)
#49 0x00007f317d5f41b1
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/usr/lib64/libclangDriver.so.12.0+0xef1b1)
#50 0x00000000002160d4 main (/usr/bin/clang+0x2160d4)
#51 0x00007f317b71b3ad __libc_start_main (/lib64/libc.so.6+0x283ad)
#52 0x0000000000212baa _start (/usr/bin/clang+0x212baa)
clang-12: error: clang frontend command failed with exit code 134 (use -v to
see invocation)
OpenMandriva 12.0.1-0.20210703.1 clang version 12.0.1
(/builddir/build/BUILD/llvm-project-release-12.x/clang
e4fa6dd46578aa865b61b8c567dbab6357d19443)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-12: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/introspection_liquify-bb31ff.c
clang-12: note: diagnostic msg: /tmp/introspection_liquify-bb31ff.sh
clang-12: note: diagnostic msg: 

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


Reduced test case:


$ cat test.c
#define a(...) firstprivate(__VA_ARGS__)
b() {
  float _Complex c;
#pragma omp parallel a(c)
  ;
}
$ clang -o test.o -c test.c -fopenmp -g

-- 
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/20210705/b8fd5661/attachment-0001.html>


More information about the llvm-bugs mailing list