From owner-freebsd-current@freebsd.org Fri Jun 22 14:18:08 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B69A3101D0F7 for ; Fri, 22 Jun 2018 14:18:08 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 43A9471F37 for ; Fri, 22 Jun 2018 14:18:08 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id 07412101D0F6; Fri, 22 Jun 2018 14:18:08 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8CC0101D0F3 for ; Fri, 22 Jun 2018 14:18:07 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.not-for.work (onlyone.not-for.work [IPv6:2a01:4f8:201:6350::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6745371F36 for ; Fri, 22 Jun 2018 14:18:07 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from [192.168.23.186] (unknown [89.113.128.32]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.not-for.work (Postfix) with ESMTPSA id 6357AA5C for ; Fri, 22 Jun 2018 17:18:06 +0300 (MSK) To: current@freebsd.org Reply-To: lev@FreeBSD.org From: Lev Serebryakov Subject: clang on 12-CURRENT traps on its internal assertion when build kernel under nanobsd.sh control Openpgp: preference=signencrypt Autocrypt: addr=lev@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFKbGksBEADeguVs+XyJc3mL3iiOBqDd16wSk97YTJYOi4VsHsINzJr09oFvNDiaDBIi fLn2p8XcJvehcsF2GSgr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EGAECAA8FAlKbGksCGwwFCRLMAwAACgkQ6rA8WL/cR48RkA//SNzeW3CI8KHx rA0aeHW6Nb5ieoqVRBGLyjBM06RX6vHB9v4dJL6Z+yV2jGN2s+XZX2HILbuTOwcTxGkI3xTT e0cDXVaF5K8R/liigUjtwuC2v/sWgoWyUmK1Cy9CPYdcXmFq6nESfkUe8DYiGOUULdHq5w63 F53yOZ72iXRBQBZgkhPtRFu4lPYIzOsMag9DIJ9CthR1r0ziqU/keb94Qt3l+aXK7CwGdY7X T4zUIMHNYsuAuyX+NJIXfsN68TT6m7QmlUwxPs13nxmoVQzm4ruV+hlQKh1MtbsjWRkNgPxF IPiqoAEhy8QoddlSvRTwL5Z7zFQiwMdiXU7toL8pfzj/zJR1jELXKMipijrt5MLrV8XX3OPN yZZvh95VIl8mv+iAqwSZUufd2EJnvj5TObB0eH+a+34NWf/XqA3fPjE6KHzmdnw9PZjPEjlx JCPECSs+6gse1+GaEfKYuXzB/ENe2ctlcfx5iQJXFc+/+zG/uU/JX/pXJHA12CUfB5g7lH6X BZIHvRo3VTCDjXgbF5xxDAe5V4exf8d4oSNjQIFLYxxN7zkvH89EN6RPfRgsWN7bYArCwfS9 MOgs9pFeCOewR6qieK150aoqNENGfKFXJup+5VVl6I0mU+j0rgVDZDht2/QgP/Tb4lGBe+ai pOGaK/GYNR+Ad6bUmokKsx4= Organization: FreeBSD Message-ID: <740aad56-4fed-d3a0-7f18-8c7c11d7ff07@FreeBSD.org> Date: Fri, 22 Jun 2018 17:18:00 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Cm5Q5rasgXzG06LYH0xI8qi1ZQ0iQKt6a" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2018 14:18:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Cm5Q5rasgXzG06LYH0xI8qi1ZQ0iQKt6a Content-Type: multipart/mixed; boundary="ACt3tAe7BusZYdnzjeaFgX3IosWyrSAGQ"; protected-headers="v1" From: Lev Serebryakov Reply-To: lev@FreeBSD.org To: current@freebsd.org Message-ID: <740aad56-4fed-d3a0-7f18-8c7c11d7ff07@FreeBSD.org> Subject: clang on 12-CURRENT traps on its internal assertion when build kernel under nanobsd.sh control --ACt3tAe7BusZYdnzjeaFgX3IosWyrSAGQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable I tripped over very strange, but repeateable (in my conditions) bug in clang on 12-CURRENT. This message will be rather long, as I need to describe all details. I have VBox-based (Windows 10 is host) virtual machine with very fresh 12-CURRENT FreeBSD guest (r335478 now). I'm using this VM to build NanoBSD "firmware" for my router and I'm updating this VM via "buildworld buildkernel" ~weekly. This VM has 4 core CPU, 8GiB of "physical" RAM and 16GiB of swap. I *never* have problem when I make "make -j4 buidlworld buildkernel" to update VM itself. It works rock-solid. But when I try to build NanoBSD image from SAME SOURCES (exactly the same!) with SAME compiler (I'm using system compiler as cross-compiler to decrease time of build) clang fails every second time. Other problem is, that "nanobsd.sh" with "make -j1", but it is NOT out-of-memory, as swap isn't used at all! Message is always the same, and file is the same (asterisks are by me, to highlight assert): /usr/bin/cc -target x86_64-unknown-freebsd12.0 --sysroot=3D/usr/obj/nanobsd/data/src/amd64.amd64/tmp -B/usr/obj/nanobsd/data/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I/data/src/sys/netgraph/bluetooth/include -I/data/src/sys/netgraph/bluetooth/drivers/ubtbcmfw -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/nanobsd/data/src/amd64.amd64/sys/D2500CC/opt_global.h -I. -I/data/src/sys -I/data/src/sys/contrib/ck/include -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/nanobsd/data/src/amd64.amd64/sys/D2500CC -MD -MF.depend.ubtbcmfw.o -MTubtbcmfw.o -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=3Diso9899:1999 -c /data/src/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c -o ubtbcmfw.= o ***** Assertion failed: ((!RequiresNullTerminator || BufEnd[0] =3D=3D 0) && "Buffer is not null terminated!"), function init, file /data/src/contrib/llvm/lib/Support/MemoryBuffer.cpp, line 48. ***** 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 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0) Target: x86_64-unknown-freebsd12.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. --=20 // Lev Serebryakov --ACt3tAe7BusZYdnzjeaFgX3IosWyrSAGQ-- --Cm5Q5rasgXzG06LYH0xI8qi1ZQ0iQKt6a Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE+W0coLX0MYtnSzMK6rA8WL/cR48FAlstBRhfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY5 NkQxQ0EwQjVGNDMxOEI2NzRCMzMwQUVBQjAzQzU4QkZEQzQ3OEYACgkQ6rA8WL/c R4+utw/+Isih98hiC3Jfx5PWwXlgGXefTFBa5g8yaWZeQzV5XlPegKuQkY//wdDU fMkQoOl/SNL1BE/jNKQyfHpHTsvNeMVzog02Lo+3xk668h7dAxqdUNl1EDb7G7Uu sJiaGaBBqJ5dekhq5b3xHP/SsgOEHHt9hU8T3gJKUq7YN14c0ewHenTRehuNnwoH r7Es+zB6LgBIjdGc6dwhpZWtwACuu+ZtB8gpvNxBl277B61xZHm+jzChG+3yd/xj wcFhuaeaazjgML/gxY31eoSaZ3v8lYu18Ii2E2wI1ZTy+CDPIp0EwvXlu2kuV7sH fwVBs5Rr3cgILyds4cpNrKIxSQ7GEGi7PEQkUXp5C5o7P7wsc8jBMx42r+Rrc6Kx 5xS2nkquQJdYZ7r1He6+TAD61p6uH69yijLHzPLWAkp/N8sCqyMnAKIKl8deTdk1 jpSmeauBr7TCkov1VmjF5JA5lllqwznlXoBAXPt6ZQjv+X7bqK1JsBzgRjxl9lnt E65NTYdiORm4EF9V35c50plj+AC7PTDHLuZmbc1PTZ4K8kGqVFIUx9U5lIpbwuO0 2BJN9B45bLRUb8nkR2TlGmJ9sVlLloASKUC/QnPUHz+4ZxDEb0+4SXj7Z/g4qD8v lsMKt1LnuNTnKCgc/Yatpz566uyIgGoq1fQ5E2+HpKFE31ctUEU= =g1wJ -----END PGP SIGNATURE----- --Cm5Q5rasgXzG06LYH0xI8qi1ZQ0iQKt6a--