Artifacts Associated With Ticket 2570123b63
Ticket change [4be8979801] (rid 244080) by apnadkarni on 2025-08-13 17:11:30:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- 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 :-)
- foundin initialized to: "8.6"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to:
system encoding is not protected from freeing during encode/decode operations
- type initialized to: "Bug"
Ticket change [fc3258f5aa] (rid 244087) by sebres on 2025-08-13 17:59:20:
- icomment: "Is not that a duplicate of [f2ff05fc84]?"
- login: "sebres"
- mimetype: "text/x-fossil-wiki"
Ticket change [510d429b99] (rid 244099) by apnadkarni on 2025-08-14 11:40:50:
- closedate changed to: "2460901.98669356"
- closer changed to: "apnadkarni"
- icomment:
Oh, yes it is! Short term memory loss (to go with long term memory loss). Closing as duplicate.
- login: "apnadkarni"
- mimetype: "text/plain"
- resolution changed to: "Duplicate"
- status changed to: "Closed"