FreeBSD Bugzilla – Attachment 227791 Details for
Bug 258392
lang/tcl85 lang/tcl86: fix unsafe buffer lifetime
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
lang/tcl8[56]: apply upstream fix for unsafe buffer lifetime
lang__tcl85_6-fix-unsafe-buffer-1.diff (text/plain), 2.06 KB, created by
Dimitry Andric
on 2021-09-09 18:09:18 UTC
(
hide
)
Description:
lang/tcl8[56]: apply upstream fix for unsafe buffer lifetime
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2021-09-09 18:09:18 UTC
Size:
2.06 KB
patch
obsolete
>commit 0911f94570f2049f15ca6e8f583d0b6f75a1ccd4 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: Thu Sep 9 20:01:17 2021 +0200 > > lang/tcl8[56]: apply upstream fix for unsafe buffer lifetime > > This gets optimized differently with clang 13, causing the sqlite3 build > to break due to its tcl scripts outputting garbled generated code. > > Upstream: https://core.tcl-lang.org/tcl/info/24b9181478 > >diff --git a/lang/tcl85/files/patch-generic_tclIO.c b/lang/tcl85/files/patch-generic_tclIO.c >new file mode 100644 >index 000000000000..86e683a58fae >--- /dev/null >+++ b/lang/tcl85/files/patch-generic_tclIO.c >@@ -0,0 +1,21 @@ >+https://core.tcl-lang.org/tcl/info/24b9181478 >+ >+--- ../generic/tclIO.c.orig 2020-12-11 17:46:22 UTC >++++ ../generic/tclIO.c >+@@ -3765,6 +3765,7 @@ Write( >+ /* State info for channel */ >+ char *nextNewLine = NULL; >+ int endEncoding, saved = 0, total = 0, flushed = 0, needNlFlush = 0; >++ char safe[BUFFER_PADDING]; >+ >+ if (srcLen) { >+ WillWrite(chanPtr); >+@@ -3783,7 +3784,7 @@ Write( >+ >+ while (srcLen + saved + endEncoding > 0) { >+ ChannelBuffer *bufPtr; >+- char *dst, safe[BUFFER_PADDING]; >++ char *dst; >+ int result, srcRead, dstLen, dstWrote, srcLimit = srcLen; >+ >+ if (nextNewLine) { >diff --git a/lang/tcl86/files/patch-generic_tclIO.c b/lang/tcl86/files/patch-generic_tclIO.c >new file mode 100644 >index 000000000000..a64bf3945b26 >--- /dev/null >+++ b/lang/tcl86/files/patch-generic_tclIO.c >@@ -0,0 +1,21 @@ >+https://core.tcl-lang.org/tcl/info/24b9181478 >+ >+--- generic/tclIO.c.orig 2020-12-11 17:46:22 UTC >++++ generic/tclIO.c >+@@ -4277,6 +4277,7 @@ Write( >+ /* State info for channel */ >+ char *nextNewLine = NULL; >+ int endEncoding, saved = 0, total = 0, flushed = 0, needNlFlush = 0; >++ char safe[BUFFER_PADDING]; >+ >+ if (srcLen) { >+ WillWrite(chanPtr); >+@@ -4295,7 +4296,7 @@ Write( >+ >+ while (srcLen + saved + endEncoding > 0) { >+ ChannelBuffer *bufPtr; >+- char *dst, safe[BUFFER_PADDING]; >++ char *dst; >+ int result, srcRead, dstLen, dstWrote, srcLimit = srcLen; >+ >+ if (nextNewLine) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 258392
: 227791