From nobody Fri Feb 10 20:53:18 2023 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 4PD5YX0jxRz3q54D for ; Fri, 10 Feb 2023 20:53:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-20.consmr.mail.gq1.yahoo.com (sonic314-20.consmr.mail.gq1.yahoo.com [98.137.69.83]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PD5YW1pFgz3rbP for ; Fri, 10 Feb 2023 20:53:35 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=maEmdPKa; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1676062413; bh=biworBqv1HrT76ez1LBWVtQJgo+VySKUr2ipI5TQp98=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=maEmdPKahkhtrq4CqNcYr/qugtlbmytVNp+TkF5krUga6df/xmwG0UHhjCALO4MBiDAI6bEhlYXkaAIX40l1vQ+2qzJ+FVZePHdeDatFnJXoS9DSTXvO63ZNpOxzO4wqSg20UIO/IgDFySQqi/+w450AMzzVdWj04iO+pCcQdNbVsaCACcEotS1C3Jpycx3e6WQV3gUUmzrvTDWHUuhqUpWoGT2trG2spgIX8Bw3gwkCJTZ71QS1PuI+D3TAkhEv3z09rD7VS4yWB/wZqPFzHKbqJoWBeVsXEYBdnChrczwttBolNHEQBf8ySq1oj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LPpOBavn.6gbbx8kC5kjJSLNEQF3aE1Wyah 2ENxDRRqh_AWB.uzP3maHqLWuX2R6yGMzFoAZjTGiRvIwqyRW4gHj8p1kAlRRvEfZnMdiTP2W_ka sJHVDn7XLdeAFOrDTQzwWkVDUWhtIQSpWqT6itnUekcriz5tU3u6dmWjBRcLjFfSU9_tdSyMlHgA 9lBGbTuPHj9JlrUrDy0cPFGW.WxjtiBcT6.RJrK.kCvjB0S_WdsqMRSzLko39xYhcRKih8_PrJKY 4sDu4QO8unF2FXw_c8Glrzm3mQwl4WfePfjQ2El5UbLelKbXDyuzYj5ledkihMWeyFKx.ZjgMHGB GtfAZMN83Uq8sYMugNiUcofslvzv6wgrz5evyu786QJl9gbB3wiQQLfhCRpPog2fGqLNt8C0oBsB OS2X4eZHWRwWPHTfugHo7dMY2Cc.hM6UAn3qY3C32.EEXNi_gqx8xOPPMtkAhSC9aRnl6B8NuD9n .si_eEvEfoHvvYaWCZuUbyrrLFOm_CwdhBRTlf9B47OAVOuVtFuxYRVCaY4X5ITREQYRibC1toCH cBg4ZYdjCIVgX1eQZYhUQPKQCK1L8XYf4BXPdieruGzuHemkNR_QJ2K1R5WyONqr8F6XkHNbkT2D R0yfF9eosAvxwC4OoaIvYbjKaDcN.rUGLvOSkuoCdAIEwDzs21Nj66.6w0pJmX5pjGj6J61pUMco biRt6pA-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Fri, 10 Feb 2023 20:53:33 +0000 Received: by hermes--production-gq1-655ddccc9-5z4vz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7395b48d138e4cddcc536081fc5fc359; Fri, 10 Feb 2023 20:53:29 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: CFT: snmalloc as libc malloc (the nullptr_t issue) From: Mark Millard In-Reply-To: <22F8AD1A-C1F9-48FA-BCED-E165E2DA5260@yahoo.com> Date: Fri, 10 Feb 2023 12:53:18 -0800 Cc: David Chisnall Content-Transfer-Encoding: quoted-printable Message-Id: <1982263E-57E0-4709-AAB3-DBB4F75C7546@yahoo.com> References: <22F8AD1A-C1F9-48FA-BCED-E165E2DA5260@yahoo.com> To: shawn.webb@hardenedbsd.org, FreeBSD Hackers , Dimitry Andric X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.83:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.83:from] X-Rspamd-Queue-Id: 4PD5YW1pFgz3rbP X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On Feb 10, 2023, at 12:01, Mark Millard wrote: > Looks to me like FreeBSD's problem: there is a rule about > inclusion leading to a definition of nullptr_t that is not being > followed. The details follow. >=20 > The complaint: >=20 > = /usr/obj/data/src/hardenedbsd/amd64.amd64/tmp/usr/include/c++/v1/cstddef:5= 0:9: error: no member named 'nullptr_t' in the global namespace > using ::nullptr_t; >=20 > is reported against text in FreeBSD's usr/include/c++/v1/cstddef > (so against the llvm15 integration). >=20 > cppreference.com reports for nullptr_t : >=20 > . . . > Defined in header > using nullptr_t =3D decltype(nullptr); >=20 > Notes > nullptr_t is available in the global namespace when is = included, even if it is not a part of C99~C17 (referenced by = C++11~C++20). > nullptr_t is also a part of C since C23. > . . . >=20 > c++/v1/cstddef has, in part: >=20 > . . . > #include > #include >=20 > #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) > # pragma GCC system_header > #endif >=20 > _LIBCPP_BEGIN_NAMESPACE_STD >=20 > using ::nullptr_t; > . . . >=20 > But, in FreeBSD, directly and indirectly does not lead to > a nullptr_t definition as far as I could find. >=20 I missed the fact that there is another stddef.h: /usr/include/c++/v1/stddef.h that looks like: // -*- C++ -*- = //=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM = Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // = //=3D=3D=3D---------------------------------------------------------------= -------=3D=3D=3D// #if defined(__need_ptrdiff_t) || defined(__need_size_t) || \ defined(__need_wchar_t) || defined(__need_NULL) || = defined(__need_wint_t) #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif #include_next #elif !defined(_LIBCPP_STDDEF_H) #define _LIBCPP_STDDEF_H /* stddef.h synopsis Macros: offsetof(type,member-designator) NULL Types: ptrdiff_t size_t max_align_t // C++11 nullptr_t */ #include <__config> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif #include_next #ifdef __cplusplus typedef decltype(nullptr) nullptr_t; #endif #endif // _LIBCPP_STDDEF_H So, another way of saying things is: this one seems to not be in use but should be. Note the dependency on defined(__need_NULL) for the initial #if . =3D=3D=3D Mark Millard marklmi at yahoo.com