From nobody Sun Feb 13 06:09:42 2022 X-Original-To: dev-commits-ports-main@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 0C4ED19B3F18; Sun, 13 Feb 2022 06:09:46 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JxH4n04Bwz3jg3; Sun, 13 Feb 2022 06:09:44 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id J0Run1h7A5Rf1J84unyFUm; Sun, 13 Feb 2022 06:09:44 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id J84snJZkcuRnyJ84tnQCTs; Sun, 13 Feb 2022 06:09:44 +0000 X-Authority-Analysis: v=2.4 cv=VuAwvs6n c=1 sm=1 tr=0 ts=6208a0a8 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=oGFeUVbbRNcA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=nE1aIfb6r7AU3rop6fQA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 76B2C668; Sat, 12 Feb 2022 22:09:42 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 64EEE24D; Sat, 12 Feb 2022 22:09:42 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Alexey Dokuchaev cc: Cy Schubert , ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 50324bba317c - main - x11/cde: Fix build under 14-CURRENT In-reply-to: References: <202202130115.21D1FPPu025146@gitrepo.freebsd.org> Comments: In-reply-to Alexey Dokuchaev message dated "Sun, 13 Feb 2022 05:50:12 +0000." List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 12 Feb 2022 22:09:42 -0800 Message-Id: <20220213060942.64EEE24D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfFihJJWqyODNGMMwgWeCrCZkJBEu/u06y8IedeV63vcrHkOCQ3A3GoZiPlQNFeW9T+gzvH7p7h6THHj+uE5TU8dGxgbcssUx2XqAc0I1CNDf3ZgdWmkG XH6C0XnB9yW/WdcE9dmkFVXcp3n1huzUPkOJ0vKf13S/x2lP5PM2Fg0NBbvyoaK6nvEU6mVV2GG+aB8GEMw9Uoj0WsnLSZ386RbvXXRzTrg/oeqDe7ly8TMj RKlIHBEV9njGOu7kg1dSzPnjfMJMXnRoYPaItvOnWghc7uhtVQ1gQhpGmEXbecepNtr7rIBKqYOqbCLR06NOBMOPvUVfKUEOFky0zmaH7a38hE27AAssCZvf d3mJXhcO X-Rspamd-Queue-Id: 4JxH4n04Bwz3jg3 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-1.80 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[3.97.99.32:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; RCVD_IN_DNSWL_MED(-0.20)[3.97.99.32:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; RCVD_TLS_LAST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[70.66.148.124:received]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; MLMMJ_DEST(0.00)[dev-commits-ports-all,dev-commits-ports-main]; R_SPF_NA(0.00)[no SPF record] X-ThisMailContainsUnwantedMimeParts: N In message , Alexey Dokuchaev writes: > On Sun, Feb 13, 2022 at 01:15:25AM +0000, Cy Schubert wrote: > > commit 50324bba317cf1f58e8c434e0e2ed129cded3887 > > > > x11/cde: Fix build under 14-CURRENT > > > > Under 14-CURRENT MALLOC_PRODUCTION is not set which puts malloc() into > > debug mode. In debug mode malloc() enables opt.junk to write junk to > > newly malloc()ed heap in order to help developers discover memory > > allocation bugs. Unfortunately CDE's dtinfogen assumes newly malloc()ed > > memory is zero filled (i.e. not filled with junk), resulting in > > "flex scanner jammed". > > Neat investigation, it gives a new angle for looking at -CURRENT-specific > build failures, but why not patch the CDE source code instead? malloc() > allocates uninitialized memory, it's generally unsafe to assume that it's > zero-filled in the first place. Also, MAKE_ENV hack is not upstreamable, > I'm afraid. :-) Actually, upstream is interested in this approach. One of their devs just emailed me ten minutes ago that that he may put it into their Makefile.am. I pointed to a cdedesktop PR for OpenBSD 6.7 with the same problem. OpenBSD uses phkmalloc. Considering it has the same error OpenBSD has enabled junk by default. I had been toying with the idea of replacing all malloc() with calloc() in dtinfo or at the very least dtinfogen. But at least this gets it building on a stock 14-CURRENT. Locally I use MALLOC_PRODUCTION=yes, which is why I could not reproduce the problem locally and my poudriere jails are built from my /usr/src (src= poudriere-jail option). Testing on a poudriere freebsdci jail confirmed the problem and allowed testing a fix. Yes, more work needs to be done. Any future patches will also be upstreamed. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.