From nobody Tue Apr 29 17:43:24 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Zn72m1BmFz5vKGK for ; Tue, 29 Apr 2025 17:43:28 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zn72l1HVsz3tr1 for ; Tue, 29 Apr 2025 17:43:27 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=LawYU2hC; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::130 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-3d6d162e516so53360775ab.1 for ; Tue, 29 Apr 2025 10:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1745948606; x=1746553406; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HulJyg9KUqVY9syO1ulRo5xWVMlrS3ZOMy5xqj8bO+Y=; b=LawYU2hCzlG/L8LE86B1zvBvNPh+9k4JNuyB57q0Je1IExKTauYOzM/4vTp8+n/53X Cl1EIS5lA6A3n4co/sPgfL2snW2b4ET6bHIdENblgsKcPmzjuNlFGpahJYkhsSkDMeIm mXEmhcpX7PKYSo+rl9CpgMAX+1g1EtowMnFPe0RWQO5wkmtEQtc2NwdJcm88M41Ej2Gz 9uY6Q1Op5+xfbGdoqE1+gZNmIOLd8db8gIAU2Rj54ndYhuLCObz5uGQ8ZrJ98cPN+vV4 3ohZac26Edk4f1EfMnaGKzHhOxvqkWqX1JnAr6tb9WAGIstZd4ItQUDh2YR4DRjXU3xC lESA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745948606; x=1746553406; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HulJyg9KUqVY9syO1ulRo5xWVMlrS3ZOMy5xqj8bO+Y=; b=a61sJwPhbhfVBqTKqW2w9BVYPcMNRJLqY8UvfT4Cw+jczj5F2YSvN79ovNTyGpbMKm luDasYMJWee/vUp3RFAdQ64MJ1pUa5v4oMcjuW32n7XzQzS2/ZLtZf4YzrRQ55IQX/ey +E/2oneoN68DqwyA1RiUbxVBMFTQXnWHB+kknM3SC/BFg/HbdwF+F5CkYaKyJGiUHNGe 3jfmGvMVTgq+FUAzfr+JYd2tCn0EsHMSaoKCyZAx6C0ETW6S8HIb01gOjC/6ee2wT7K9 QE4IpuMS/2cqbOY1lQTbOMNUD6JnI3Un/k8P3U4hCGcefN3T2Icex0n18zDRKe/qTIO6 VL8A== X-Gm-Message-State: AOJu0Ywsc0w9tYVcpjHVPOVy2Nx/0rdumD6TgMzOPhg7C+yfvTyQXZHV yggtX581Jrf3Ui5LkxrYwkoNuUooetsNTbYg3IvoYxOXTVuKf+uzRzi2s2XPGz0= X-Gm-Gg: ASbGncvwbpob80W8iGTSx0GSjee1emndOH02wZIA6euIC06+me0KWP5tffxIz+d4Phr OS675hIngwmgWUDP59hfjlIhvoNV3/IWTPJrbdruBrHoq7vjsO4hWAc/1yfwa1NtEEwuPS1Gegt 2aXpSWI9oRhOM0TMk+U2IkeiwDR3KazEbNhD85mExL+o7p4W/RcMmalW4IzPgm5wFEkrRutdFEC lkoZ3Su1OCXNT7oAzts+ccE9340wIFbSDdJofvRRFbUEs0dhI4ZkdTPU/vftlJcveatxTcwBEvX OpJ4dJzbYxq/B3eZyhXhF0k= X-Google-Smtp-Source: AGHT+IEPK/yRySH86ykq3323R08bc9YtunUxKT2PBYDsXA54NeP6Sbcdrji3IjIudIjWx1xyAJURfQ== X-Received: by 2002:a05:6e02:b42:b0:3d9:2fbe:2bb1 with SMTP id e9e14a558f8ab-3d95df7dea5mr47938135ab.12.1745948605904; Tue, 29 Apr 2025 10:43:25 -0700 (PDT) Received: from mutt-hbsd ([2001:470:4001:1::95]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3d95f480a99sm4150145ab.68.2025.04.29.10.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Apr 2025 10:43:25 -0700 (PDT) Date: Tue, 29 Apr 2025 17:43:24 +0000 From: Shawn Webb To: Dimitry Andric Cc: FreeBSD CURRENT Subject: Re: HEADS UP: libllvm, libclang, and liblldb converted into shared libraries Message-ID: X-Operating-System: FreeBSD mutt-hbsd 14.2-STABLE-HBSD FreeBSD 14.2-STABLE-HBSD HARDENEDBSD-14-STABLE amd64 X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <8173C7D9-F95A-4440-82DA-6CF160AAD6C2@FreeBSD.org> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="64t7nig7micyp6i5" Content-Disposition: inline In-Reply-To: <8173C7D9-F95A-4440-82DA-6CF160AAD6C2@FreeBSD.org> X-Spamd-Result: default: False [-2.11 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_SPAM_MEDIUM(0.98)[0.985]; NEURAL_HAM_LONG(-0.68)[-0.684]; MID_RHS_NOT_FQDN(0.50)[]; NEURAL_HAM_SHORT(-0.31)[-0.312]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; TO_DN_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[hardenedbsd.org]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::130:from]; DKIM_TRACE(0.00)[hardenedbsd.org:+] X-Rspamd-Queue-Id: 4Zn72l1HVsz3tr1 X-Spamd-Bar: -- --64t7nig7micyp6i5 Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: HEADS UP: libllvm, libclang, and liblldb converted into shared libraries MIME-Version: 1.0 On Sun, Apr 27, 2025 at 07:42:44PM +0200, Dimitry Andric wrote: > On 27 Apr 2025, at 17:04, Shawn Webb wrote: > >=20 > > On Sat, Apr 26, 2025 at 06:06:54PM +0200, Dimitry Andric wrote: > ... > >> Please let me know if you encounter any problems resulting due to this > >> change, as I intend to MFC it. For example, I tried covering all > >> incremental build scenarios, but I may have missed some corner case. > >=20 > > Hey Dimitry, > >=20 > > I suspect this may be a problem specific to HardenedBSD, but it looks > > like cc occasionally crashes. It hits an assert at > > /usr/src/contrib/llvm-project/clang/lib/Driver/Driver.cpp:2702. > >=20 > > I can reproduce this by running `env SHELL=3D/bin/sh make buildenv` at > > the top of /usr/src. Though, it doesn't reproduce 100%, but perhaps > > around 60%. >=20 > It's asserting on this line: >=20 > assert(!CCGenDiagnostics && "stdin produces no crash reproduc= er"); >=20 > I think during make buildenv the make framework will run cc --version > and ld --version to get at the compiler and linker version, but it could > be that it's doing some weird combination that hasn't been thought of. > Can you get the exact command line out of the debugger? For some reason, I'm failing to figure out how to view the program's invocation using lldb or gdb. But, running `strings /usr/obj/usr/src/amd64.amd64/cc.core`, I see this, which may or may not be the arguments passed to cc: =3D=3D=3D=3D BEGIN OUTPUT =3D=3D=3D=3D "-cc1" "-ferror-limit" "19" "-o" "-" "-disable-free" "-E" "-x" "c" "-" "-tu= ne-cpu" "generic" "-target-cpu" "x86-64" "-triple" "x86_64-unknown-freebsd15.0" "-resource-dir" "/usr/lib/clang/19" "-isystem= " "/usr/lib/clang/19/include" "-internal-externc-i system" "/usr/include" "-std=3Dgnu17" "-fskip-odr-check-in-gmf" "-ftrivial-= auto-var-init=3Dzero" "-fgnuc-version=3D4.2.1" "-ffp-con tract=3Don" "-fno-experimental-relative-c++-abi-vtables" "-fno-file-reprodu= cible" "-O0" "-fdebug-compilation-dir=3D/usr/obj/usr/s rc/amd64.amd64" "-fcoverage-compilation-dir=3D/usr/obj/usr/src/amd64.amd64"= "-faddrsig" "-mrelocation-model" "static" "-debugge r-tuning=3Dgdb" "-funwind-tables=3D2" "-mconstructor-aliases" "-clear-ast-b= efore-backend" "-main-file-name" "-" "-mframe-pointer=3D all" "-fdiagnostics-hotness-threshold=3D0" "-fdiagnostics-misexpect-toleran= ce=3D0" "-D" "__GCC_HAVE_DWARF2_CFI_ASM=3D1" =3D=3D=3D=3D END OUTPUT =3D=3D=3D=3D I hope that helps. Otherwise, can you provide me a hint as to how to get lldb/gdb to show the arguments passed to cc? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Signal Username: shawn_webb.74 Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --64t7nig7micyp6i5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmgRD7YACgkQ/y5nonf4 4fr1UBAAjrDbRPqLA+2N5S2j752iyck+/rrX5LVVMXXDSo5ntIX70oiJKmYKGnpw xiQZqwGB4FlN6rF6QhbMi8RkT05P+172SXYZdtAuUeBQ80PuPVKGZU2OZc9krIwG HekwB+4g489xV3eB35v6fW9/8i5eLZolH4hT59gKefnfBw65jQ/j94kCM7m8Nr/k VDpZ+XBVO8a+B00XUf/JdSAOr5npj9ZGOAs8pTk+bBxwXCzg2CvXjFmuoT8OMuGK eTi7Drtk3jrkKSTUAZbYG7lY7/dwkTB+YIbIGXgz/3FMp2BuEb90ZlT//NSzakNg hLw4pBJvj4Ph/mSfQK6ywfl3ZX2VO581CK752uHk9H0RLHk+LEa/WZPMpeN0e10e l1YR5qks0XThQ5EknF3Gnq7YlL1p5AfjDidN+99yqE61Dboi7LoViObsD9hLwxpF CyqEYDv2VVdfsaWVLZGd25m3BVnrNsP+tkwN5xWa23bRi8qS5SKU5/Ga24A1n5mW XU2viH33NKYQORO+MI21nlVPfwQn6nsaX7K6fSGv3V0MtV2B7o0okJfftPWn3avp N1XMwB1rQ4R193clQ4J4sZplllCqp7P/EpVg/rt9CvGVH4CVSpyT5ZUzTWMnEXKE 7E7byc4z4Phc0qG4u92YbvYPsoF01PysuRbe3OKria/Z1/yu8PM= =Er68 -----END PGP SIGNATURE----- --64t7nig7micyp6i5--