From nobody Thu Jun 25 22:32:15 2026 X-Original-To: freebsd-hackers@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 4gmYTY3667z6jTc7 for ; Thu, 25 Jun 2026 22:32:33 +0000 (UTC) (envelope-from kargls@comcast.net) Received: from resqmta-h2p-567354.sys.comcast.net (resqmta-h2p-567354.sys.comcast.net [IPv6:2001:558:fd02:2446::5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4gmYTW5TmJz3n9B for ; Thu, 25 Jun 2026 22:32:31 +0000 (UTC) (envelope-from kargls@comcast.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=comcast.net header.s=20190202a header.b=kM+RxsrM; dmarc=pass (policy=reject) header.from=comcast.net; spf=pass (mx1.freebsd.org: domain of kargls@comcast.net designates 2001:558:fd02:2446::5 as permitted sender) smtp.mailfrom=kargls@comcast.net Received: from resomta-h2p-554993.sys.comcast.net ([96.102.179.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resqmta-h2p-567354.sys.comcast.net with ESMTPS id cqQgwD5teU2EHcscRwm2m3; Thu, 25 Jun 2026 22:32:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1782426743; bh=BnSskdX8nE0h8hPm6pZ4FtE16NH9/K3sDNqZVtXZYtI=; h=Received:Received:Message-ID:Date:MIME-Version:Subject:To:From: Content-Type:Xfinity-Spam-Result; b=kM+RxsrMGSM3BKqeQW0c9CWd6Y0EC1S9D5FIFbbX1tTMl39ywdVUFNQFfoE+CNpvO 5Q04nRvR0w6NtU+QGnW9yNqkRd5oCGv51hiOwPIZwK89itADTIwJ2ytDomCgV5WnVZ aCtqxV1hGMRDi/nTU0JrL7Z6OU2g9eAXoWXaHgHFhESeyB5r+pfmFPwKFF+EbQrnQ9 09ZQ/JY/mryVMhhcrkowz5I8jkkRMVnjajGMn4YZAZuVhfZD1DxQFIhxr6Oc95iKX2 qRoB8DuM0oCl3DaPNcoTZexp/ORxvKH+s8lM5lj8ERURESnqS12VxPXO3QQ4p8n518 a7t4sPjDrzsnA== Received: from [192.168.204.10] ([128.95.76.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resomta-h2p-554993.sys.comcast.net with ESMTPSA id cscJw15dPi3btcscLwTmM0; Thu, 25 Jun 2026 22:32:21 +0000 Xfinity-QID: cscJw15dPi3btcscLwTmM0 Xfinity-Graffiti: 08909130656 Message-ID: Date: Thu, 25 Jun 2026 15:32:15 -0700 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Please revert b2e843161d To: freebsd-hackers@freebsd.org References: <09C557A3-7D0A-42D7-A463-9E4162D86758@fubar.geek.nz> Content-Language: en-US From: Steve Kargl In-Reply-To: <09C557A3-7D0A-42D7-A463-9E4162D86758@fubar.geek.nz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfIThPdqA4XhpmKGtkurjhZPTLb+sS5Vfn/n8f+19kxpj1xlb0eJM8JducV+clOtb9UCPoUT087I49lfGia/MuCw5Bw2fvKT9pxt0ZzcG9lIadPzc88q0 s7rScDnARu1FtwvU4Rfop4irFtQuBJuNzZDKVESYEhuqrXU/5jGyAGigSkSV6BNJPivL77j5MIFmd+pQR3n2XpeksmwVGsAc5VU= X-Spamd-Result: default: False [-1.10 / 15.00]; HFILTER_HELO_5(3.00)[resqmta-h2p-567354.sys.comcast.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[comcast.net,reject]; R_SPF_ALLOW(-0.20)[+ip6:2001:558:fd02:2446::/64]; R_DKIM_ALLOW(-0.20)[comcast.net:s=20190202a]; RCVD_IN_DNSWL_LOW(-0.10)[2001:558:fd02:2446::5:from]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_FROM(0.00)[comcast.net]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[comcast.net:dkim]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[comcast.net]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[comcast.net:+]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:7922, ipnet:2001:558::/29, country:US]; RCVD_IN_DNSWL_NONE(0.00)[96.102.179.194:received] X-Spamd-Bar: - X-Rspamd-Queue-Id: 4gmYTW5TmJz3n9B On 6/25/26 10:57, Andrew Turner wrote: > > >> On 25 Jun 2026, at 17:42, Steve Kargl wrote: >> >> On 6/25/26 01:15, Andrew Turner wrote: >>>> On 24 Jun 2026, at 19:58, Steve Kargl wrote: >>>> >>>> Can someone with commit access please revert b2e843161dc3b? >>>> >>>>   git log -r b2e843161dc3b79777e873183447c92ed9c3703a >>>>   Author: Andrew Turner >>>>   Date:   Tue Nov 2 11:31:17 2021 +0000 >>>> >>>>   Use a builtin where possible in msun >>>> >>>> >>>> If one has a libm built with, e.g., -DUSE_BUILTIN_FMAF, >>>> and then tries to debug code that uses fmaf() where the >>>> compiler options include -fno-builtin, a segfault >>>> occurs.  I suggest purging all of the recent additions >>>> of USE_BUILTIN_*.  These are simply not needed as a compiler >>>> will use a builtin (if available) instead of a function from >>>> libm. >>> What architecture and compiler are you using to build libm? >>> I only enabled it on arm64 as both llvm and gcc will generate the >>> optimal assembly instruction. Other architectures and compilers the >>> builtin may generate a call to fmaf creating an infinite loop. >> >> I'm using >> >> % uname -a >> FreeBSD hotrats 16.0-CURRENT FreeBSD 16.0-CURRENT #0 main-n284956- >> de9fe28ab847: Fri Apr 10 10:15:09 PDT 2026 kargl@hotrats:/usr/obj/usr/ >> src/amd64.amd64/sys/GENERIC amd64 > > I don’t expect it to work on amd64 in the general case. Godbolt shows > both GCC and Clang generating an infinite loop jumping to its self [1]. > It may work on some architecture levels, however I don’t know enough > about amd64 to know if it’s safe to enable. Just checked godbolt. If one uses -O3 -fno-builtin with either gcc or clang, the generate assembly includes a call to fmaf in libm.a. If you build libm with -DUSE_BUILTIN_FMAF on arm and you use -fno-builtin, does the resulting executable seg fault? -- steve