From owner-freebsd-hackers@freebsd.org Fri Feb 21 14:30:04 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C34AC25F405 for ; Fri, 21 Feb 2020 14:30:04 +0000 (UTC) (envelope-from joerg@bec.de) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48PDPl3BQjz451G for ; Fri, 21 Feb 2020 14:30:03 +0000 (UTC) (envelope-from joerg@bec.de) X-Originating-IP: 93.205.161.59 Received: from bec.de (p5DCDA13B.dip0.t-ipconnect.de [93.205.161.59]) (Authenticated sender: joerg@bec.de) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 9F5F92000D for ; Fri, 21 Feb 2020 14:30:00 +0000 (UTC) Date: Fri, 21 Feb 2020 15:29:58 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Subject: Re: How much libc++ ABI changes FreeBSD can consume? Message-ID: <20200221142958.GA69281@bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20200220141655.GP29554@kib.kiev.ua> <20200221120325.GA86511@bec.de> <20200221123637.GT29554@kib.kiev.ua> <20200221125846.GA88921@bec.de> <20200221131939.GV29554@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200221131939.GV29554@kib.kiev.ua> User-Agent: Mutt/1.11.3 (2019-02-01) X-Rspamd-Queue-Id: 48PDPl3BQjz451G X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of joerg@bec.de has no SPF policy when checking 217.70.183.200) smtp.mailfrom=joerg@bec.de X-Spamd-Result: default: False [-1.03 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-1.03)[ip: (-2.32), ipnet: 217.70.176.0/20(-1.57), asn: 29169(-1.27), country: FR(0.00)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RECEIVED_SPAMHAUS_PBL(0.00)[59.161.205.93.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[bec.de]; NEURAL_HAM_MEDIUM(-0.80)[-0.799,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[200.183.70.217.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 14:30:04 -0000 On Fri, Feb 21, 2020 at 03:19:39PM +0200, Konstantin Belousov wrote: > On Fri, Feb 21, 2020 at 01:58:46PM +0100, Joerg Sonnenberger wrote: > > Take a look at all the pain libstdc++ had with its new string > > implementation. Symbol versioning is fine as long as the ABI doesn't > > extend beyond the boundaries of the depending DSOs. But if you want to > > change e.g. std::string, all libraries to be mixed need to version any > > interface containing it and that is effectively as much trouble as just > > doing the DSO bump. > > Right, as I understand, inline namespaces were the reaction to this and > similar issues. With new namespace, std::string methods would get different > mangled name. > > I am not claiming that either approach (or its combination) cover > everything, but the situation should be not that dim. E.g., after ino64 > changes, I am aware of only one serious breakage when running binaries > built for older struct stat, on newer system, and this comes from > Firefox doing dlsym("stat"). The difference is that ino_t and transitively stat are passed around rarely between libraries. This is completely different from std::string, which is passed around a lot between C++ libraries. As such, any such interface needs to be versioned. This gets worse if it is a member of a public class, because then every use of that class has to be versioned as well. Joerg