Bug 247665 - emulators/rpcs3: clang 10 crashes during build
Summary: emulators/rpcs3: clang 10 crashes during build
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-toolchain (Nobody)
Keywords: crash, needs-patch
Depends on:
Reported: 2020-06-30 18:23 UTC by Jan Beich
Modified: 2020-08-08 00:49 UTC (History)
2 users (show)

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

command line args (for clang 10) (8.17 KB, text/plain)
2020-06-30 18:30 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2020-06-30 18:23:08 UTC
Assertion failed: (getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!"), function setIncomingValue, file /usr/src/contrib/llvm-project/llvm/include/llvm/IR/Instructions.h, line 2656.
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
3.      Utilities/Thread.h:401:16: Generating code for declaration 'named_thread<(lambda at rpcs3/Emu/System.cpp:965:47)>::operator='
#0 0x0000000003e42fce PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13
#1 0x0000000003e41155 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:69:18
#2 0x0000000003e450fe HandleCrash /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:77:5
#3 0x0000000003e45281 CrashRecoverySignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:51
#4 0x000000080506cb10 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-129-gd24d5c8e308)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin
Comment 1 Jan Beich freebsd_committer 2020-06-30 18:30:58 UTC
Created attachment 216074 [details]
command line args (for clang 10)

The preprocessed source file is larger than 1Mb even compressed (by xz -9e), so run the following to get it.

$ fetch -qo- https://reviews.freebsd.org/paste/raw/404/ | b64decode -o /dev/stdout | xz -dc >System-095a42.cpp
Comment 2 Dimitry Andric freebsd_committer 2020-06-30 20:27:53 UTC
I have been able to reproduce this with the most recent upstream llvm-project checkout, and am now reducing the test case for submission into their bugzilla.
Comment 3 Dimitry Andric freebsd_committer 2020-07-02 13:51:00 UTC
Reduced and reported upstream: https://bugs.llvm.org/show_bug.cgi?id=46557
Comment 4 Jan Beich freebsd_committer 2020-07-03 08:31:12 UTC
I can't reproduce on 11.4 and 12.1: upstreamed sample and the port build fine. Tested base Clang 8.0.1, base Clang 10.0.0 and ports Clang 10.0.1 rc2.
Note, on -CURRENT even ports Clang 10.0.1 rc2 does NOT crash but it's built with -DNDEBUG due to bug 233506.
Comment 5 commit-hook freebsd_committer 2020-08-08 00:49:25 UTC
A commit references this bug:

Author: jbeich
Date: Sat Aug  8 00:48:51 UTC 2020
New revision: 544351
URL: https://svnweb.freebsd.org/changeset/ports/544351

  emulators/rpcs3: switch to clang from ports

  PR:		247665