Crash when taking minimum of very large integers.
Closed / Duplicatee2ff7b517903296ad13018f4b9962576b9a7ad2fCreated 230 days agoUpdated 230 days ago
Descriptionplain2026-04-17 09:21:35
When running the script below via tclsh, we are experiencing a segmentation fault:
-----------------------------------------------------------------------
set a [string repeat 9 25]
set b [string repeat 5 25]
puts "a = $a"
puts "b = $b"
set c [expr {min(-$a,-$b)}]; # This crashes
puts "c = $c"; # Not reached
-----------------------------------------------------------------------
Tested on Ubuntu 24.04, with an tclsh compiled from source with gcc. Tcl is configured with --with-system-libtommath=no.
sebreswiki2026-04-17 09:46:37
Dup of [8dd2807066].
Shall be fixed in [ce87baf3c7a1ecf1] and later commits (released with 9.0.3).
Log in (anonymous is fine) to add a comment.