Tk Library Source Code

View Ticket
Login
Ticket UUID: 1923685
Title: Crash in tcllibc with struct::graph...
Type: Bug Version: None
Submitter: petasis Created on: 2008-03-23 16:54:40
Subsystem: struct :: graph Assigned To: andreas_kupries
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2008-03-24 02:09:20
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2008-03-23 19:09:20
Description:
I have observed a crash with tcllibc and the struct::graph package. Under ActiveTcl 8.5.1, the attached script crashes. Using teacup to uninstall tcllibc, the script runs fine. Please note that both attached files must be in the same directory to get the attached script to run.
User Comments: andreas_kupries added on 2008-03-24 02:09:20:
Logged In: YES 
user_id=75003
Originator: NO

Fixed in head, with testcases. Reviewed the other filters, and they were ok.

andreas_kupries added on 2008-03-24 01:36:14:
Logged In: YES 
user_id=75003
Originator: NO

Aha. We have 2795 parallel arcs from node x to node y. Total number of nodes 26. The check I used to filter out duplicate result nodes is wrong, causing the filter to try and stuff all arcs into the result, way over the max of 26, so it it bombs in my assert. Yay defensive asserts otherwise this would have not been that easy to find. ... The filtering for -in is bad in the same manner. Fixing both makes the test script run fine. I am guessing that when I copied things from arc filtering to node filtering the adaption was not done right/fully.

Ok, making test cases for this is easy.

petasis added on 2008-03-24 01:11:43:
Logged In: YES 
user_id=92283
Originator: YES

Yes, this is the error message I have received. I am sorry I have forgotten to add it to the bug report.

andreas_kupries added on 2008-03-24 00:53:14:
Logged In: YES 
user_id=75003
Originator: NO

Panic happens in filter.c, line 871.

andreas_kupries added on 2008-03-24 00:41:48:
Logged In: YES 
user_id=75003
Originator: NO

I can confirm a crash in a tcl_panic in tcllibc.so giving the message 'array index out of bounds'. Is that the crash you are talking about?

petasis added on 2008-03-23 23:56:53:

File Added - 271523: test.tcl

Logged In: YES 
user_id=92283
Originator: YES

Please run the test.tcl script, to reproduce the problem. The file abox_graph_struct.txt must exist in the same directory.
File Added: test.tcl

petasis added on 2008-03-23 23:54:41:

File Added - 271522: abox_graph_struct.zip

Attachments: