Bug 263870 - cad/horizon-eda: Crashes clang 13 on aarch64, amd64, i386 (and probably on all architectures): Assertion failed: (IRFuncTy == TypeFromVal), function EmitCall
Summary: cad/horizon-eda: Crashes clang 13 on aarch64, amd64, i386 (and probably on al...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-toolchain (Nobody)
URL: http://ampere2.nyi.freebsd.org/data/m...
Keywords: crash, needs-qa
Depends on:
Blocks:
 
Reported: 2022-05-08 19:18 UTC by Yuri Victorovich
Modified: 2022-05-09 16:36 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback? (toolchain)
koobs: mfc-stable13?
koobs: mfc-stable12?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2022-05-08 19:18:58 UTC
Assertion failed: (IRFuncTy == TypeFromVal), function EmitCall, file /usr/local/poudriere/jails/main-arm64/usr/src/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp, line 4648.
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: c++ -c -Isrc -isystem 3rd_party -Ibuild/gen -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -D_USE_MATH_DEFINES -DGLM_ENABLE_EXPERIMENTAL -DJSON_USE_IMPLICIT_CONVERSIONS=0 -I/usr/local/include -I/usr/local/include/uuid -I/usr/local/include/gtkmm-3.0 -I/usr/local/lib/gtkmm-3.0/include -I/usr/local/include/atkmm-1.6 -I/usr/local/include/atk-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/glibmm-2.4 -I/usr/local/lib/glibmm-2.4/include -I/usr/local/include/sigc++-2.0 -I/usr/local/lib/sigc++-2.0/include -I/usr/local/include/giomm-2.4 -I/usr/local/lib/giomm-2.4/include -I/usr/local/include/pangomm-1.4 -I/usr/local/lib/pangomm-1.4/include -I/usr/local/include/cairomm-1.0 -I/usr/local/lib/cairomm-1.0/include -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/pango-1.0 -I/usr/local
 /include/harfbuzz -I/usr/local/include/fribidi -I/usr/local/include/gtk-3.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/libepoll-shim -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/include/at-spi-2.0 -I/usr/local/include/gtk-3.0/unix-print -I/usr/local/include/gdkmm-3.0 -I/usr/local/lib/gdkmm-3.0/include -I/usr/local/include/librsvg-2.0 -D_THREAD_SAFE -pthread -I/usr/local/include/pgm-5.2 -MP -MD -pthread -Wall -Wshadow -std=c++17 -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR src/core/tools/tool_move.cpp -o build/obj/src/core/tools/tool_move.o
1.	<eof> parser at end of file
2.	src/core/tools/tool_move.cpp:21:11: LLVM IR generation of declaration 'horizon'
3.	src/core/tools/tool_move.cpp:23:11: Generating code for declaration 'horizon::ToolMove::ToolMove'
#0 0x000000000489ce4c (/usr/bin/c+++0x489ce4c)
#1 0x000000000489b14c (/usr/bin/c+++0x489b14c)
#2 0x000000000483ad44 (/usr/bin/c+++0x483ad44)
#3 0x000000000483af2c (/usr/bin/c+++0x483af2c)
#4 0x000000008b422fc8 (/lib/libthr.so.3+0x29fc8)
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Comment 1 Yuri Victorovich freebsd_committer 2022-05-08 19:49:35 UTC
Problem exists in cad/horizon-eda 7314f1602d92b7a8965a01372be2f72650b3e3e4.

After this the port uses clang-12.
Comment 2 Ed Maste freebsd_committer 2022-05-09 16:02:18 UTC
(In reply to Yuri Victorovich from comment #1)

I want to clarify the clang version - 7314f1602d92 has

-LLVM_VER=      12 # workaround for bug#253551
-BUILD_DEPENDS+=        clang${LLVM_VER}:devel/llvm${LLVM_VER}
-CPP=           clang-cpp${LLVM_VER}
-CC=            clang${LLVM_VER}
-CXX=           clang++${LLVM_VER}

so I would expect that the port used Clang 12 before that commit, and now uses the default?
Comment 3 Yuri Victorovich freebsd_committer 2022-05-09 16:36:40 UTC
(In reply to Ed Maste from comment #2)

Hi Ed,

The problem exists with the default clang-13 compiler.

In 7314f1602d92b7a8965a01372be2f72650b3e3e4 it was switched to the default compiler and many builds began to fail.

After this it was switched back to clang-12 from ports.


Yuri