Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2018 01:13:39 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Dimitry Andric <dim@freebsd.org>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, multimedia@FreeBSD.org, ports-list freebsd <freebsd-ports@freebsd.org>
Subject:   Re: head -r340287 based powerpc64: multimedia/ffmpeg -r484273 gets a system-clang assert failure [reduced to 15 program]
Message-ID:  <420A14D5-270D-4360-963C-673A59A2F7D8@yahoo.com>
In-Reply-To: <A27C8775-139E-4DDF-8EDF-2DCFB3B03AD1@yahoo.com>
References:  <A27C8775-139E-4DDF-8EDF-2DCFB3B03AD1@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[I isolated the compiler crash down to a 20 line program
that makes the assert fail.]

On 2018-Nov-22, at 13:03, Mark Millard <marklmi at yahoo.com> wrote:

> During a (native) poudriere-devel run I got the following failure.
> [Unfortunately clang and poudriere are mismatched for where the
> preprocessed source(s) and run script(s) are placed as far as
> what is in the poudriere tar archive produced. But I did have
> kern.corefile set so that the core file was captured.]
>=20
> This happens to be on powerpc64 where I experiment with using
> fairly modern cc/c++ and the like. devel/powerpc64-xtoolchain-gcc
> was used for buildworld buildkernel and clang was built as cc.
> But the system binutils is from base/binutils . So not an official
> gcc 4.2.1 toolchain context, more of a futures-testing context.
>=20
> The error report from clang (after 332 other ports had built):
>=20
> 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.1 (tags/RELEASE_601/final 335540) (based on =
LLVM 6.0.1)
> Target: powerpc64-unknown-freebsd13.0
> Thread model: posix
> InstalledDir: /usr/bin
> cc: note: diagnostic msg: PLEASE submit a bug report to =
https://bugs.freebsd.org/submit/ and include the crash backtrace, =
preprocessed source, and associated run script.
> cc: note: diagnostic msg:=20
> ********************
>=20
> PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> Preprocessed source(s) and associated run script(s) are located at:
> cc: note: diagnostic msg: /tmp/vf_convolution-9639c0.c
> cc: note: diagnostic msg: /tmp/vf_convolution-9639c0.sh
> cc: note: diagnostic msg:=20
>=20
> ********************
> gmake[1]: *** [ffbuild/common.mak:60: libavfilter/vf_convolution.o] =
Error 254
> gmake[1]: *** Waiting for unfinished jobs....
> gmake[1]: Leaving directory =
'/wrkdirs/usr/ports/multimedia/ffmpeg/work/ffmpeg-4.1'
> =3D=3D=3D> Compilation failed unexpectedly.
> Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the =
failure to
> the maintainer.
> *** Error code 1
>=20
> . . .
>=20

I isolated the system-clang crash down to a 15 line program
that makes the assert fail for the reduced command:

"/usr/bin/cc" "-cc1" "-emit-obj" "-target-cpu" "ppc64" "-O1" =
"-vectorize-loops" "vf_convolution-mmjnk.c"

( -O2 and -O3 also cause the failure. )

# more vf_convolution-mmjnk.c=20
double  sqrt(double);

static void filter_sobel(unsigned char *dst, int width,
                         const unsigned char *c[])
{
    const unsigned char *c0 =3D c[0], *c1 =3D c[1];
    int x;

    for (x =3D 0; x < width; x++) {
        dst[x] =3D sqrt(c0[x] * -1 + c1[x] * -2);
    }
}

void (*mmjnk)(unsigned char *dst, int width,
                      const unsigned char *c[]) =3D filter_sobel;


The error reported is:

Assertion failed: (isSimple() && "Expected a SimpleValueType!"), =
function getSimpleVT, file =
/usr/src/contrib/llvm/include/llvm/CodeGen/ValueTypes.h, line 254.
Abort trap (core dumped)



=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?420A14D5-270D-4360-963C-673A59A2F7D8>