From nobody Sun Feb 13 06:28:05 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 5031319B766A; Sun, 13 Feb 2022 06:28:09 +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 4JxHV02TBNz3lJZ; Sun, 13 Feb 2022 06:28:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id Iq6In1GCP5Rf1J8MhnyGKz; Sun, 13 Feb 2022 06:28:07 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id J8Mgnyohs2SCrJ8Mhn0L3L; Sun, 13 Feb 2022 06:28:07 +0000 X-Authority-Analysis: v=2.4 cv=JLwoDuGb c=1 sm=1 tr=0 ts=6208a4f7 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=oGFeUVbbRNcA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=dlvqRZGBwualwMtBcrEA:9 a=CjuIK1q_8ugA:10 a=KsGYAnANpjkA:10 a=7gXAzLPJhVmCkEl4_tsf:22 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 EB3D8713; Sat, 12 Feb 2022 22:28:05 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id C456B254; Sat, 12 Feb 2022 22:28:05 -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: Cy Schubert cc: Alexey Dokuchaev , 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: <20220213060942.64EEE24D@slippy.cwsent.com> References: <202202130115.21D1FPPu025146@gitrepo.freebsd.org> <20220213060942.64EEE24D@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Sat, 12 Feb 2022 22:09:42 -0800." 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:28:05 -0800 Message-Id: <20220213062805.C456B254@slippy.cwsent.com> X-CMAE-Envelope: MS4xfKUE/PEqFNbdiJQ8fHByIHqLVKGu6frrQ82k55bCX/kGE178om+b/yeZtI7/57n9x70jWlm1rJn5U56HArnPv1z81+FKqi+ILBr/a+gUVX5fvEF9r4YL yXiwycqNjzogC/BHrIOTKOoql7qXpXmhIf0uEC5wXQPR9Tu6eKGnuqaIhrK0paUFHwUEVgtu4SsULlDTfiw22dFSLE6pnkzbEL+uvfVgt+5u8OOwsDMSch0O yHvaopTQPirXSlaVrtIwCsVnw6uX/IAl592B+B5sWQ0/Q4kAMVf3qd0FFlirmWILnXaqyBTBVgTl/gydWpe2lC4eWgxHP9CN4+FUEauPfPg1ctn00Htt/PUG I2LWZVZZ X-Rspamd-Queue-Id: 4JxHV02TBNz3lJZ 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)[6]; 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)[]; 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)[]; TO_MATCH_ENVRCPT_SOME(0.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 <20220213060942.64EEE24D@slippy.cwsent.com>, Cy Schubert writes: > 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. I replied again to the cdedesktop developer about the idea of replacing malloc(3) with calloc(3). Either way I'm certainly considering adding this patch to the port. BTW, I have a cde-devel port I'm working on locally. It builds fine however pkg-plist issues abound because due to a new build process in which they've replaced imake with GNU configure for some reason I have yet to discover why it stages files to ${STAGEDIR}/usr instead of ${STAGEDIR}/${LOCALBASE}/d t. I could be fighting a Linuxsim that crept in. -- 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.