Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-05-07
21:39 • Ticket [a858d95f4b] segmenting error of v8.7 clock status still Closed wit... artifact: a5d7328b0a user: jan.nijtmans
19:10 • Closed ticket [a858d95f4b]. artifact: a8be472a1f user: sebres
19:04
closes [a858d95f4bfddafb]: adjust word-token pointer after possible realloc check-in: c432a8b50b user: sebres tags: core-8-branch
16:52 • Ticket [a858d95f4b] segmenting error of v8.7 clock status still Open with ... artifact: 2ae1fd8b85 user: jan.nijtmans
16:48 • Ticket [a858d95f4b]: 3 changes artifact: eaa16dae6c user: jan.nijtmans
16:42 • Ticket [a858d95f4b]: 3 changes artifact: 023350857f user: jan.nijtmans
15:35 • Ticket [a858d95f4b]: 3 changes artifact: 005c5933e9 user: anonymous
14:52 • Ticket [a858d95f4b]: 4 changes artifact: 78ecd9f55c user: jan.nijtmans
14:37 • New ticket [a858d95f4b]. artifact: df2a34a5da user: anonymous

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.