Bug 224995

Summary: mail/alpine and editors/pico-alpine: clang 6 crashes during build
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Dimitry Andric <dim>
Status: Closed FIXED    
Severity: Affects Only Me CC: dim, mbeis
Priority: --- Keywords: toolchain
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 224669    
Attachments:
Description Flags
imap/src/imapd/imapd.c (compressed, preprocessed)
none
command line args (for clang 6.0) none

Description Jan Beich freebsd_committer freebsd_triage 2018-01-08 13:11:49 UTC
Created attachment 189515 [details]
imap/src/imapd/imapd.c (compressed, preprocessed)

cc  -I../c-client `cat ../c-client/CFLAGS`   -DANOFILE=\"/etc/anonymous.newsgroups\"  -DALERTFILE=\"/etc/imapd.alert\" -DNNTPFILE=\"/etc/imapd.nntp\"  -DUSERALERTFILE=\".imapalert\" -DSHUTDOWNFILE=\"/etc/nologin\" -c imapd.c -o imapd.o
[...]
Assertion failed: (ScaledReg == nullptr), function SetCombinedField, file /poudriere/jails/headi386PR224669/usr/src/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp, line 1963.
cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 6.0.0 (branches/release_60 321788) (based on LLVM 6.0.0)
Target: i386-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

http://package18.nyi.freebsd.org/data/headi386PR224669-default/2018-01-07_22h53m03s/logs/errors/alpine-2.21_1.log
http://package18.nyi.freebsd.org/data/headi386PR224669-default/2018-01-07_22h53m03s/logs/errors/pico-alpine-2.21.l
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-01-08 13:12:16 UTC
Created attachment 189516 [details]
command line args (for clang 6.0)
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2018-01-08 21:54:35 UTC
This bug has the same assertion, but is different from bug 224866.  Reported upstream here: https://bugs.llvm.org/show_bug.cgi?id=35864
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-01-09 17:42:14 UTC
A commit references this bug:

Author: dim
Date: Tue Jan  9 17:41:35 UTC 2018
New revision: 327734
URL: https://svnweb.freebsd.org/changeset/base/327734

Log:
  Pull in r322056 from upstream llvm trunk (by Serguei Katkov):

    [CGP] Fix Complex addressing mode for offset

    If the offset is differ in two addressing mode we can continue only
    if ScaleReg is not set due to we will use it as merge of different
    offsets.

    It should fix PR35799 and PR35805.

    Reviewers: john.brawn, reames
    Reviewed By: reames
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D41227

  This should fix "ScaledReg == nullptr" assertions when building the
  graphics/xpx, mail/alpine and editors/pico-alpine ports.

  Reported by:	jbeich
  PR:		224866, 224995

Changes:
  projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2018-01-15 18:19:45 UTC
Assuming this is fixed now.