ObjFW  History Of Ticket 5b31b3f45e9a8150eef903081594e04beea8f4f5

Artifacts Associated With Ticket 5b31b3f45e9a8150eef903081594e04beea8f4f5

  1. Ticket change [9266591019] (rid 33060) by js on 2020-10-25 21:09:05:

    1. icomment:
      The Apple runtime seems to make some assumptions about root objects being NSObject, and as a result segfaults when using weak.
      
    2. login: "js"
    3. milestone initialized to: "none"
    4. mimetype: "text/x-markdown"
    5. priority initialized to: "Immediate"
    6. severity initialized to: "Severe"
    7. status initialized to: "Open"
    8. title initialized to: "Weak references are broken with the Apple runtime"
    9. type initialized to: "Code_Defect"
  2. Ticket change [5309f065e7] (rid 33061) by js on 2020-10-25 21:09:18:

    1. login: "js"
    2. milestone changed to: "1.0"
    3. mimetype: "text/x-markdown"
    4. resolution changed to: "Open"
  3. Ticket change [c0cb482c58] (rid 33062) by js on 2020-10-25 22:10:52:

    1. icomment:
      Looking at the code, it seems that `objc_destructInstance()` does not zero weak references at all in the Apple runtime. It seems to make weak references work at all, it is necessary to call into the runtime functions to allocate, retain, release and dealloc objects. Unfortunately, this does not allow to have some extra space before the object, as the current `+[alloc]` does for memory blocks belonging to the object.
      
    2. login: "js"
    3. mimetype: "text/x-markdown"
  4. Ticket change [865fcafc00] (rid 33237) by js on 2020-11-12 00:34:04:

    1. icomment:
      Turns out the configure check for `objc_constructInstance` was broken, and hence `runtime/instance.m` was used for `objc_destructInstance` instead of the runtime's, resulting in weak references not being handled on dealloc.
      
      Fixed in [](4c16806252).
      
    2. login: "js"
    3. mimetype: "text/x-markdown"
    4. resolution changed to: "Fixed"
    5. status changed to: "Fixed"