maintainer-feedback requested: [Bug 258392] lang/tcl85 lang/tcl86: fix unsafe buffer lifetime

From: <>
Date: Thu, 09 Sep 2021 18:09:18 +0000
Bugzilla Automation <> has asked freebsd-tcltk (Nobody)
<> for maintainer-feedback:
Bug 258392: lang/tcl85 lang/tcl86: fix unsafe buffer lifetime

--- 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/sqlite3
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 ticket ("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 sqlite3
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 generate
the sqlite3.c main file.

Received on Thu Sep 09 2021 - 18:09:18 UTC

Original text of this message