From nobody Thu Sep 09 18:09:18 2021 X-Original-To: tcltk@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 802DB17C2919 for ; Thu, 9 Sep 2021 18:09:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H56TV33bzz4v7G for ; Thu, 9 Sep 2021 18:09:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44D381E0B5 for ; Thu, 9 Sep 2021 18:09:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 189I9ITT036813 for ; Thu, 9 Sep 2021 18:09:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 189I9IhG036812 for tcltk@FreeBSD.org; Thu, 9 Sep 2021 18:09:18 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: tcltk@FreeBSD.org Subject: maintainer-feedback requested: [Bug 258392] lang/tcl85 lang/tcl86: fix unsafe buffer lifetime Date: Thu, 09 Sep 2021 18:09:18 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: tcltk@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD-specific Tcl/Tk discussions List-Archive: https://lists.freebsd.org/archives/freebsd-tcltk List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-tcltk@freebsd.org X-BeenThere: freebsd-tcltk@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N Bugzilla Automation has asked freebsd-tcltk (Nobody) for maintainer-feedback: Bug 258392: lang/tcl85 lang/tcl86: fix unsafe buffer lifetime https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258392 --- Description --- During an exp-run for llvm 13 (see bug 258209), it turned out that lang/tcl8[56] compiled with clang 13 result in problems when databases/sqli= te3 attempts to generate its main sqlite3.c source with tclsh [1] [2]: sqlite3.c:17852:2: error: invalid preprocessing directive #defi 0, xStep,xFinal,xValue,xInverse,#zName, {0}} ^ sqlite3.c:18129:2: error: invalid preprocessing directive #definly system table */ ^ sqlite3.c:18223:2: error: invalid preprocessing directive #defi /* ON DELETE and ON UPDATE actions, respectively */ ^ After some searching in tcl history I found that the cause is upstream tick= et https://core.tcl-lang.org/tcl/info/24b9181478 ("Fix unsafe buffer lifetime"= ). They patched the 8.5 and 8.6 branches, but this didn't appear in a release = yet. 8.7 already has the fix. The unsafe buffer gets optimized differently with clang 13, causing the sql= ite3 build to break due to its tcl scripts outputting garbled generated code. Here is a patch for tcl 8.5 and tcl 8.6. I verified that all tcl versions in the ports tree can now be compiled with clang 13, and then succesfully gene= rate the sqlite3.c main file. [1] http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20= h27m 09s/logs/errors/sqlite3-3.35.5_3,1.log [2] http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20= h27m 09s/logs/errors/sqlite3-tcl-3.35.5_3,1.log