Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8d04d79421c08bc005bd80015c07094b56fc2d4e16bf2c6fa689a254ede5334b
Ticket: 7faad04be62497d023d0d61d5519d0aaa5aaa8d8
TIP 430 immediate segfault
User & Date: hypnotoad on 2018-04-27 03:11:44
Changes

  1. icomment:
    The ->namelen field was naively assuming that memory would be initialized to zero on Alloc. That is obviously not the case for --enable-symbols=mem  :-/
    
    The portion of the code was also the part of the Tcl bootstrap that tries various files to see if there are zip file systems encoded at the end of them. So the code was dumping out prior to the complete initialization of the data structure that happens in ZipFS_Catalogue_Filesystem.
    
    In checkin [730a3c01cbcc07eba202a74c012b85b30f8645e64c000f37e3c9d9cdd7b23c61] I added code to ensure that (at least in the case exercised by --enable-symbols=mem) we initialize that namelen flag to zero, which prevents the free() call from happening on failure to locate the zipfile header.
    
  2. login: "hypnotoad"
  3. mimetype: "text/plain"