segmenting error of v8.7 [clock]
Closed / Fixeda858d95f4bfddafb85b640c3dd0d96a543b53407Created 3 years agoUpdated 3 years ago
Descriptionplain2024-05-07 14:37:14
This code snippet results in the segmenting error of Tcl v8.7:
puts [clock format [clock seconds] -format noarr(%d)]
The error doesn't occur before and after v8.7, thus possibly needs a scrupulous attention.
jan.nijtmanswiki2024-05-07 14:52:13
I can reproduce both in 8.7 and 9.0:
$ tclsh9.0 % puts [clock format [clock seconds] -format noarr(%d)] Segmentation fault$ tclsh8.7 % puts [clock format [clock seconds] -format noarr(%d)] Segmentation fault
Sergey, can you have a look, please?
anonymousmarkdown2024-05-07 15:35:49
Сергей, на тебя вся надежда:)
I can not reproduce this error with wish9.0.
So, another issue: why tclsh9.0 fails, while wish9.0 not.
jan.nijtmanswiki2024-05-07 16:42:35
I see exactly the same error in wish8.7 and wish9.0
jan.nijtmanswiki2024-05-07 16:48:00
Stacktrace:
0 libsystem_platform.dylib 0x7ff815c8c350 _platform_memmove$VARIANT$Haswell + 496 1 tktest 0x102b3155d ClockFormat + 1645 (tclClockFmt.c:3503) 2 tktest 0x102b283a9 ClockFormatObjCmd + 249 (tclClock.c:3569) 3 tktest 0x102b13538 Dispatch + 120 (tclBasic.c:4608) 4 tktest 0x102b0f7c6 TclNRRunCallbacks + 118 (tclBasic.c:4624)
jan.nijtmanswiki2024-05-07 16:52:08
That's here
sebreswiki2024-05-07 19:10:46
Fixed in [c432a8b50b3de8bb] for 8.7.
Additionally I'll try to rewrite both routines a bit (to avoid unneeded realloc) and then merge it to 9.0.
jan.nijtmanswiki2024-05-07 21:39:48
Confirming the fix.
Many thanks to anonymous for the bug-report! Many thanks to Sergey for the fixing this so quickly!
Log in (anonymous is fine) to add a comment.