Summary: | security/openssl111: Clang crashes building on 13.0-CURRENT (r354143): Assertion failed: (isSimple() && "Expected a SimpleValueType!"), function getSimpleVT | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Kubilay Kocak <koobs> | ||||||
Component: | bin | Assignee: | Dimitry Andric <dim> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | brnrd, dim, emaste, toolchain | ||||||
Priority: | --- | Keywords: | crash, toolchain | ||||||
Version: | CURRENT | Flags: | koobs:
maintainer-feedback+
koobs: mfc-stable12? koobs: mfc-stable11? |
||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
See Also: |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213865 https://bugs.llvm.org/show_bug.cgi?id=43916 |
||||||||
Attachments: |
|
Also found bug 213865 and the following freebsd-multimedia thread which looks similar: https://lists.freebsd.org/pipermail/freebsd-multimedia/2018-November/019343.html Created attachment 208904 [details]
dmesg.boot
Isolation tests:
- Commenting out CPUTYPE?=corei7-avx (all else the same) results in a successful build, / no assertion error.
- Removing -O2 (leaving CPUTYPE?=corei7-avx, and all else the same) results in a successful build / no assertion error.
- Using -O1 (leaving CPUTYPE?=corei7-avx, and all else the same) results in a successful build / no assertion error.
- Changing CPUTYPE?=corei7-avx -> sandybridge (all else the same), results in assertion error
Additional environment information:
- CPU: Intel Core i7-2600K
- FreeBSD is VirtualBox guest (dmest.boot attached)
Reproduced and reported upstream: https://bugs.llvm.org/show_bug.cgi?id=43916 A commit references this bug: Author: dim Date: Thu Nov 7 06:59:10 UTC 2019 New revision: 354429 URL: https://svnweb.freebsd.org/changeset/base/354429 Log: Merge commit 8e34dd941 from llvm git (by Sanjay Patel): [x86] avoid crashing when splitting AVX stores with non-simple type (PR43916) The store splitting transform was assuming a simple type (MVT), but that's not necessarily the case as shown in the test. This should fix 'Assertion failed: (isSimple() && "Expected a SimpleValueType!")' when building the security/openssl111 port targeting a CPU that supports AVX, but not AVX2, such as sandybridge. PR: 241747 MFC after: 1 month X-MFC-With: r353358 Changes: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Thank you Dimitry Any workarounds/changes that can be made to openssl111 in the meantime? (In reply to Kubilay Kocak from comment #5) Yes, just make sure the CPU type is not set, or set to something other than: sandybridge, core-avx-i or corei7-avx. Thanks Dimitry :) Will leave this in progress pending MFC If MFC is not required in stable/11 (due to it being a recent regression), just set the flag value to - This got fixed for stable/12 with the MFC of clang 9.0.1. |
Created attachment 208902 [details] security-openssl111-clang.tar.gz security/openssl111 fails to build on 13.0-CURRENT r354143 with error: Assertion failed: (isSimple() && "Expected a SimpleValueType!"), function getSimpleVT, file /usr/src/contrib/llvm/include/llvm/CodeGen/ValueTypes.h, line 253. - Latest ports tree, default port OPTIONS - DEFAULT_VERSIONS= perl5=5.30 ssl=openssl111 python=2.7 - make.conf: CPUTYPE?= corei7-avx .if !empty(.CURDIR:M/*/ports/*) CFLAGS= -O2 -pipe -fcolor-diagnostics SSP_CFLAGS= -fstack-protector-strong .endif Build log tail/backtrace, sources and script attached