Tcl Source Code

View Ticket
Login
Ticket UUID: 3048353
Title: [interp limit ...] can dump core
Type: Bug Created on: 2010-08-19 05:02:34
Submitter: bharder Assigned to: hobbs
Subsystem: 20. [interp] Severity:
Priority: 5 Medium Last modified: 2026-10-22 17:19:30
Status: Closed Closed by: serhiy.storchaka
Resolution: Fixed Closed on: 2026-10-21 10:03:36
Version: None
Description:
I was exploring the [interp limit] command when I keyed:
% interp limit {} commands -command pust -value 3

and tclsh (8.6b1.2) dumped core.
User Comments:
bharder added on 2010-08-19 12:18:19:
tested (both failed) w/ Tcl 8.6b1.2 on NetBSD AMD64, and 8.5.3 on Debian Linux xen/i686

mistachkin added on 2010-08-19 12:41:39:
The SetScriptLimitCallback function in tclInterp.c is hitting:

Tcl_Panic("installing limit callback to the limited interpreter");

johannes-kuhn added on 2010-08-19 21:33:30:
I think such a call should return a proper error message.

Otherwise not a bug  as this should never work.

serhiy.storchaka added on 2026-10-21 10:03:36:

Fixed by [b3333814a0] (8.5.11) and [241cdd7be1] (8.6.0), ticket [3398794]: interp limit {} ... now fails with "limits on current interpreter inaccessible" instead of panicking.