|
2020-08-21
| ||
| 12:31 | • Closed ticket [43b434812a]: Tcl 9.0 uses stat64() but not struct stat64 on Linux... artifact: 0a83b0484e user: jan.nijtmans | |
| 12:28 | Fix [43b434812a]: Tcl 9.0 uses stat64() but not struct stat64 on Linux i686 check-in: 2864c3682e user: jan.nijtmans tags: trunk | |
| 10:05 | • Ticket [43b434812a] Tcl 9.0 uses stat64() but not struct stat64 on Linux i686</i... artifact: d87fc87666 user: jan.nijtmans | |
| 09:28 | • New ticket [43b434812a]. artifact: 6089758f12 user: chrstphrchvz | |
Tcl 9.0 uses stat64() but not struct stat64 on Linux i686
I notice this because I can't even start tclsh9.0 without it crashing in TclpMatchInDirectory() (tclUnixFile.c): calling TclOSstat() (stat64()) at line 312 clobbers the address stored in ds.string, and when Tcl_DStringSetLength() is called at line 380, it writes to an invalid address when doing dsPtr->string[length] = 0 (tclUtil.c line 2808).
I don't observe this issue in Tcl 8.7 ([95051c8d1e]) where TclOSstat() and Tcl_StatBuf are defined as stat64() and struct stat64 respectively.
2864c3682eFix [43b434812a]: Tcl 9.0 uses stat64() but not struct stat64 on Linux i686 check-in2020-08-21 12:28:26
See also the comments in this ticket: https://core.tcl-lang.org/tcl/info/02b58d5d04
Tcl 9.0 should use "Implicit LFS", while Tcl 8.x uses "Explicit LFS". What's missing is the "configure" part of determining `$(getconf LFS_CFLAGS)`, `$(getconf LFS_LDFLAGS)` and `$(getconf LFS_LIBS)`.
Thanks for reminding me, I know for UNIX this is not complete yet (for MacOS and Windows it is done already)
Well, until the implementation of [02b58d5d04] is complete, Tcl 9 should continue to use "struct stat64" on 32-bit platforms. Should be fixed now.
Thanks!