Bug 225268

Summary: graphics/libsixel: 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, sue
Priority: --- Keywords: toolchain
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225269
Bug Depends on:    
Bug Blocks: 224669    
Description Flags
src/scale.c (compressed, preprocessed)
command line args (for clang 6.0) none

Description Jan Beich freebsd_committer 2018-01-17 17:26:23 UTC
Created attachment 189841 [details]
src/scale.c (compressed, preprocessed)

/bin/sh ../libtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I..  -I../include/  -O2 -pipe  -fstack-protector -fno-strict-aliasing -Wall -Wextra -Wpedantic -Wformat=2 -Wsign-conversion -Wuninitialized -Wstrict-overflow -Wshadow -Wdouble-promotion -Wswitch-default            -O2 -pipe  -fstack-protector -fno-strict-aliasing -MT libsixel_la-scale.lo -MD -MP -MF .deps/libsixel_la-scale.Tpo -c -o libsixel_la-scale.lo `test -f 'scale.c' || echo './'`scale.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../include/ -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -Wextra -Wpedantic -Wformat=2 -Wsign-conversion -Wuninitialized -Wstrict-overflow -Wshadow -Wdouble-promotion -Wswitch-default -O2 -pipe -fstack-protector -fno-strict-aliasing -MT libsixel_la-scale.lo -MD -MP -MF .deps/libsixel_la-scale.Tpo -c scale.c  -fPIC -DPIC -o .libs/libsixel_la-scale.o
Bad flavor while matching min/max
UNREACHABLE executed at /usr/local/poudriere/jails/head-amd64/usr/src/contrib/llvm/lib/Analysis/ValueTracking.cpp:4217!
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: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

Comment 1 Jan Beich freebsd_committer 2018-01-17 17:26:56 UTC
Created attachment 189842 [details]
command line args (for clang 6.0)
Comment 2 Dimitry Andric freebsd_committer 2018-01-17 22:15:29 UTC
This seems to be fallout of https://bugs.llvm.org/show_bug.cgi?id=35717, I'm investigating whether https://reviews.llvm.org/rL322016 helps.
Comment 3 commit-hook freebsd_committer 2018-01-18 21:44:15 UTC
A commit references this bug:

Author: dim
Date: Thu Jan 18 21:44:07 UTC 2018
New revision: 328145
URL: https://svnweb.freebsd.org/changeset/base/328145

  Pull in r322016 from upstream llvm trunk (by Sanjay Patel):

    [ValueTracking] remove overzealous assert

    The test is derived from a failing fuzz test:

    Credit to @rksimon for pointing out the problem.

  This should fix "Bad flavor while matching min/max" errors when building
  the graphics/libsixel and science/kst2 ports.

  Reported by:	jbeich
  PR:		225268, 225269