TIP 430 immediate segfault
Closed / Fixed7faad04be62497d023d0d61d5519d0aaa5aaa8d8Created 9 years agoUpdated 9 years ago
Descriptionplain2018-04-25 14:02:16
Starting with checkin https://core.tcl-lang.org/tcl/info/1f15130a9637c276 The "core_zip_vfs" branch (TIP 430) immediately segfaults when `make test` is attempted on a --enable-symbols=mem build.
dgp Ticket [7faad04be6]: 3 changes
[History diff]2018-04-25 14:02:28
hypnotoadplain2018-04-27 03:11:44
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.
hypnotoad Ticket [7faad04be6]: 3 changes
[History diff]2018-04-27 03:12:08
dgp Closed ticket [7faad04be6].
[History diff]2018-04-27 13:21:30
Log in (anonymous is fine) to add a comment.