Skip to content
Tcl Source Code History Of Ticket 2570123b63
Login

History Of Ticket 2570123b63

Artifacts Associated With Ticket 2570123b63

  1. Ticket change [4be8979801] (rid 244080) by apnadkarni on 2025-08-13 17:11:30:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      Inspecting code, I have doubts about potential crashes from accessing freed encodings in multithreaded environments. Several functions have code similar to below:
      
      ```
      if (encoding == NULL) // encoding is passed by caller
         encoding = systemEncoding; // systemEncoding is GLOBAL shared by threads
      
      Do some operations involving the encoding. 
      
      ```
      
      The issue I am wondering about is that the reference count on systemEncoding is not incremented in such cases. What happens if some other thread calls `encoding system` and changes the systemEncoding causing the original one in use above to be freed?
      
      Need to build a test case to verify above race condition but perhaps someone could corroborate or refute my analysis. And save me the trouble of creating the test case :-)
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to:
      system encoding is not protected from freeing during encode/decode operations
      
    16. type initialized to: "Bug"
  2. Ticket change [fc3258f5aa] (rid 244087) by sebres on 2025-08-13 17:59:20:

    1. icomment: "Is not that a duplicate of [f2ff05fc84]?"
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [510d429b99] (rid 244099) by apnadkarni on 2025-08-14 11:40:50:

    1. closedate changed to: "2460901.98669356"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Oh, yes it is! Short term memory loss (to go with long term memory loss).
      
      Closing as duplicate.
      
    4. login: "apnadkarni"
    5. mimetype: "text/plain"
    6. resolution changed to: "Duplicate"
    7. status changed to: "Closed"