maintainer-feedback requested: [Bug 258392] lang/tcl85 lang/tcl86: fix unsafe buffer lifetime
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 258392] lang/tcl85 lang/tcl86: fix unsafe buffer lifetime"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Sep 2021 18:09:18 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-tcltk (Nobody) <tcltk@FreeBSD.org> for maintainer-feedback: Bug 258392: lang/tcl85 lang/tcl86: fix unsafe buffer lifetime https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258392 --- 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 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 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. [1] http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20h27m 09s/logs/errors/sqlite3-3.35.5_3,1.log [2] http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20h27m 09s/logs/errors/sqlite3-tcl-3.35.5_3,1.log