#3655 TclArraySet crash

obsolete: 8.4.15
closed-fixed
Don Porter
5
2007-03-13
2007-02-26
Don Porter
No

% 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.

Discussion

  • Don Porter
    Don Porter
    2007-03-12

     
    Attachments
  • Don Porter
    Don Porter
    2007-03-12

    Logged In: YES
    user_id=80530
    Originator: YES

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

     
  • Don Porter
    Don Porter
    2007-03-12

    Logged In: YES
    user_id=80530
    Originator: YES

    Patch committed to HEAD.
    Backport still needs examination.

     
  • Don Porter
    Don Porter
    2007-03-13

    Logged In: YES
    user_id=80530
    Originator: YES

    Commit different fix
    for 8.4.15.

     
  • Don Porter
    Don Porter
    2007-03-13

    • assigned_to: msofer --> dgp
    • status: open --> closed-fixed