Tcl Source Code

View Ticket
Login
Ticket UUID: 1669489
Title: TclArraySet crash
Type: Bug Version: obsolete: 8.4.15
Submitter: dgp Created on: 2007-02-26 21:58:49
Subsystem: 07. Variables Assigned To: dgp
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2007-03-13 22:59:53
Resolution: Fixed Closed By: dgp
    Closed on: 2007-03-13 15:59:53
Description:
% array set a {}
% set elements {1 2 3 4}
1 2 3 4
% trace add variable a write {string length $elements ;#}
% array set a $elements
Segmentation fault

Same crash also happens with the HEAD.

Problem is that TclArraySet
doesn't preserve the elemPtrs
it pulls from a ListObj, and
keeps trying to access it
after it's shimmered out of validity.
User Comments: dgp added on 2007-03-13 22:59:53:
Logged In: YES 
user_id=80530
Originator: YES


Commit different fix
for 8.4.15.

dgp added on 2007-03-13 01:07:07:
Logged In: YES 
user_id=80530
Originator: YES


Patch committed to HEAD.
Backport still needs examination.

dgp added on 2007-03-13 01:01:55:

File Added - 220166: 1669489.patch

Logged In: YES 
user_id=80530
Originator: YES


Here's a patch to review.
File Added: 1669489.patch

Attachments: