Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3406a407fe907f7a00d6cd603ecd540062f6d64cce7dedfe7cb5a28324e64591
Ticket: ce32712f83f0d30051adb6a53e11f9e338a9944f
Inconsistent locking during zipfs initialization
User & Date: apnadkarni on 2025-10-03 10:04:51
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    Both the following sequences are seen in tclZipFs.c
    
    ```
        ReadLock();
        if (!ZipFS.initialized) {
    	ZipfsSetup();
        }
    ```
    
    and
    
    ```
        WriteLock();
        if (!ZipFS.initialized) {
    	ZipfsSetup();
        }
    ```
    
    - Why is ZipfsSetup under a read lock in some cases and write locks in others? Does not seem to make sense.
    - How is a read lock sufficient given that ZipfsSetup modifies the internal structures?
    
    I had added a TODO comment questioning this when fixing zipfs bugs during the 9.0 beta but forgot to revisit and just saw it today :-(
    
  5. foundin changed to: "9.0.2"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "apnadkarni"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "Inconsistent locking during zipfs initialization"
  16. type changed to: "Bug"