Bug 276824 - clang crashes on powerpc: Assertion failed: (count_if(VPlans, [VF](const VPlanPtr &Plan) { return Plan->hasVF(VF); }) == 1 && "Best VF has not a single VPlan."), function getBestPlanFor (port devel/quickcpplib)
Summary: clang crashes on powerpc: Assertion failed: (count_if(VPlans, [VF](const VPla...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL: https://pkg-status.freebsd.org/foul1/...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-04 18:55 UTC by Yuri Victorovich
Modified: 2024-02-04 23:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2024-02-04 18:55:23 UTC
See the URL for the log link.

Assertion failed: (count_if(VPlans, [VF](const VPlanPtr &Plan) { return Plan->hasVF(VF); }) == 1 && "Best VF has not a single VPlan."), function getBestPlanFor, file /usr/local/poudriere/jails/main-powerpc/usr/src/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp, line 7686.
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: /usr/bin/c++ -I/wrkdirs/usr/ports/devel/quickcpplib/work/quickcpplib-f9ab259/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -fPIE -fexceptions -frtti -fstack-protector-strong -Wall -Wextra -MD -MT CMakeFiles/quickcpplib_hl--bit_interleave.dir/test/bit_interleave.cpp.o -MF CMakeFiles/quickcpplib_hl--bit_interleave.dir/test/bit_interleave.cpp.o.d -o CMakeFiles/quickcpplib_hl--bit_interleave.dir/test/bit_interleave.cpp.o -c /wrkdirs/usr/ports/devel/quickcpplib/work/quickcpplib-f9ab259/test/bit_interleave.cpp
1.	<eof> parser at end of file
2.	Optimizer
#0 0x15bb72d0 (/usr/bin/c+++0x15bb72d0)
#1 0x15bb7958 (/usr/bin/c+++0x15bb7958)
#2 0x15bb4d14 (/usr/bin/c+++0x15bb4d14)
#3 0x15bb6408 (/usr/bin/c+++0x15bb6408)
#4 0x15b6d6ac (/usr/bin/c+++0x15b6d6ac)
#5 0x57eedffc (/lib/libthr.so.3+0x2dffc)
c++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git llvmorg-17.0.6-0-g6009708b4367)
Target: powerpc-unknown-freebsd15.0
Thread model: posix
InstalledDir: /usr/bin
c++: note: diagnostic msg: 
********************
Comment 1 Mark Millard 2024-02-04 20:26:55 UTC
I'll note that the prior source file got an "Unsupported platform" error
(via a #error directive) and an undeclared identifier 'rdtscp' error:

/wrkdirs/usr/ports/devel/quickcpplib/work/quickcpplib-f9ab259/test/bitwise_trie.cpp
In file included from /wrkdirs/usr/ports/devel/quickcpplib/work/quickcpplib-f9ab259/test/bitwise_trie.cpp:33:
/wrkdirs/usr/ports/devel/quickcpplib/work/quickcpplib-f9ab259/test/timing.h:113:2: error: Unsupported platform
  113 | #error Unsupported platform
      |  ^
/wrkdirs/usr/ports/devel/quickcpplib/work/quickcpplib-f9ab259/test/timing.h:115:10: error: use of undeclared identifier 'rdtscp'
  115 |   return rdtscp();
      |          ^

So, even if the Assertion failure is fixed, the port might well be
not buildable for the powerpc context.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-02-04 20:35:52 UTC
> So, even if the Assertion failure is fixed, the port might well be
> not buildable for the powerpc context.

No, these two are completely unrelated.
Compiler crash prevents it from building.
Missing function for powerpc can potentially be fixed in some way.
These have noting to do with each other.
Comment 3 Mark Millard 2024-02-04 23:09:49 UTC
(In reply to Yuri Victorovich from comment #2)

I think that you may have read more into my
note than intended: it was more about the
unusual overall context than the specific
error you reported. Your report is valid
as is, for sure.

The 2 other errors just make normal
"quickcpplib use now works" testing
activity messier.