NetBSD Problem Report #51932

From www@NetBSD.org  Wed Feb  1 11:03:07 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id EFBD97A168
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  1 Feb 2017 11:03:06 +0000 (UTC)
Message-Id: <20170201110305.D45867A2A9@mollari.NetBSD.org>
Date: Wed,  1 Feb 2017 11:03:05 +0000 (UTC)
From: roy@marples.name
Reply-To: roy@marples.name
To: gnats-bugs@NetBSD.org
Subject: clang crashes building libgbd in NetBSD 7.99.59
X-Send-Pr-Version: www-1.0

>Number:         51932
>Category:       toolchain
>Synopsis:       clang crashes building libgbd in NetBSD 7.99.59
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 01 11:05:00 +0000 2017
>Originator:     Roy Marples
>Release:        netbsd-current as of 20170131
>Organization:
>Environment:
netbsd7$ uname -a
NetBSD netbsd7.marples.name 7.0.2 NetBSD 7.0.2 (XEN3_DOMU.201610210724Z) amd64
>Description:
#   compile  libgdb/dwarf2read.o
/home/roy/tools/bin/x86_64--netbsd-clang -O2  -std=gnu99     -Wno-sign-compare -Wno-pointer-sign  -Werror -Wno-unused-value -Wno-conversion  -Wno-switch-enum -Wno-parentheses -Wno-comment  -Wno-format-security  -Wno-tautological-compare
-Wno-format-extra-args  -Wno-string-plus-int -Wno-switch -Wno-unused-value -Wno-conversion  -Wno-switch-enum -Wno-parentheses -Wno-comment  -Wno-format-security  -Wno-tautological-compare -Wno-format-extra-args  -Wno-string-plus-int -Wno
-unused-value -Wno-conversion  -Wno-switch-enum -Wno-parentheses -Wno-comment  -Wno-format-security  -Wno-tautological-compare -Wno-format-extra-args  -Wno-string-plus-int -march=core2 -fPIE -fstack-protector -Wstack-protector  --param s
sp-buffer-size=1   -Wno-stack-protector  --sysroot=/home/roy/src/src/obj/destdir.amd64 -D_KERNTYPES -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/arch/x86_64  -I/home/roy/src/src/exter
nal/gpl3/gdb/lib/libgdb/../../dist/gdb  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/config  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/common  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../.
./dist/gdb/gnulib/import  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../../dist/include/opcode  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../../dist/libdecnumber  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../../dist
-I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../libbfd/arch/x86_64  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../libdecnumber/arch/x86_64  -I/home/roy/src/src/external/gpl3/gdb/lib/libgdb/../../dist/bfd  -I/home/roy/src/src/ex
ternal/gpl3/gdb/lib/libgdb/../../dist/include  -Dsighandler_t=sig_t  -DTARGET_SYSTEM_ROOT=\"\"  -DTARGET_SYSTEM_ROOT_RELOCATABLE=0  -DBINDIR=\"/usr/bin\"  -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLOCALEDIR=
"\"/usr/share/locale\"" -DHAVE_CONFIG_H -DTUI=1 -D_KERNTYPES -D_KERNTYPES  -D_FORTIFY_SOURCE=2 -c    /home/roy/src/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/dwarf2read.c -o dwarf2read.o
assertion "!InvalidBase && "APValues can't handle invalid LValue bases"" failed: file "/home/roy/src/src/tools/llvm-lib/libclangAST/../../llvm/../../external/bsd/llvm/lib/../dist/clang/lib/AST/ExprConstant.cpp", line 1193, function "void
 {anonymous}::LValue::moveInto(clang::APValue&) const"
x86_64--netbsd-clang: error: unable to execute command: Abort trap (core dumped)
x86_64--netbsd-clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 4.0.0 (trunk r291444)
Target: x86_64--netbsd
Thread model: posix
InstalledDir: /home/roy/tools/bin
x86_64--netbsd-clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
x86_64--netbsd-clang: note: diagnostic msg:

>How-To-Repeat:
Obtain a Gigabyte Brix BXBT-1900 - the CPU is an Intel J1900
Install any NetBSD - I used both a current snapshot and a 7.0.2 release.
Grab -current sources
Configure to build use clang as the compiler.
./build.sh distribution
>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.