Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Sep 2021 18:09:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 258392] lang/tcl85 lang/tcl86: fix unsafe buffer lifetime
Message-ID:  <bug-258392-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258392

            Bug ID: 258392
           Summary: lang/tcl85 lang/tcl86: fix unsafe buffer lifetime
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: tcltk@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: tcltk@FreeBSD.org
             Flags: maintainer-feedback?(tcltk@FreeBSD.org)

Created attachment 227791
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D227791&action=
=3Dedit
lang/tcl8[56]: apply upstream fix for unsafe buffer lifetime

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=
h27m09s/logs/errors/sqlite3-3.35.5_3,1.log
[2]
http://gohan04.nyi.freebsd.org/data/mainamd64PR258209-default/2021-09-05_20=
h27m09s/logs/errors/sqlite3-tcl-3.35.5_3,1.log

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-258392-7788>