• src/xpdev/msg_queue.c msg_queue.h

    From rswindell@VERT to CVS commit on Wed Aug 21 14:40:21 2019
    src/xpdev msg_queue.c 1.14 1.15 msg_queue.h 1.8 1.9
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv30996

    Modified Files:
    msg_queue.c msg_queue.h
    Log Message:
    When the owner of a message queue detaches from a queue, set MSG_QUEUE_ORPHAN flag in msg_queue_t.flags



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Jan 22 14:56:35 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/3d68720d2883d0b6d878568b
    Modified Files:
    src/xpdev/msg_queue.c msg_queue.h
    Log Message:
    API change: long->int

    No functional change

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Mar 15 17:20:25 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/573398dc0201f069d0d90bdc
    Modified Files:
    src/xpdev/msg_queue.c msg_queue.h
    Log Message:
    Use protected integer for reference counter

    Fix concurrency issue reported by Claude via Deuce:
    msgQueueAttach() (line 77) does q->refs++ and msgQueueDetach() (line 92) does
    --q->refs on a plain int with no locking or atomics. These are non-atomic
    read-modify-write operations.
    If two threads call msgQueueDetach() concurrently with refs == 2:
    - Both read refs == 2, both write refs = 1, neither triggers the == 0 free 
    memory leak
    If two threads call msgQueueDetach() concurrently with refs == 1:
    - Both read refs == 1, both write refs = 0, both call msgQueueFree() 
    double-free

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net