• src/xpdev/link_list.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, February 15, 2024 13:15:37
    https://gitlab.synchro.net/main/sbbs/-/commit/44afa1b3c4231a1d291fcfa7
    Modified Files:
    src/xpdev/link_list.c
    Log Message:
    Don't hold a mutex while it's destroyed.

    Found by Coverity.
    If there's actually another thread using the list when the refcount
    hits zero, you're going to have a bad time regardless of the lock.

    Coverity has been pointing this out for a while, but we've been
    ignoring it as a false positive.

    ---
    þ 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 Wednesday, March 11, 2026 03:54:58
    https://gitlab.synchro.net/main/sbbs/-/commit/4aa8f644d5217556c33c60fa
    Modified Files:
    src/xpdev/link_list.c
    Log Message:
    MSFT Application Verifier complains the critical section is already initialized

    On Windows, we may not have been actually mutex-protecting some or all of our Linked Lists, or maybe all Linked Lists were sharing the same mutex (critsect) because the address of the "critical section object" (which we use as a mutex) *must* (apparently) be unique or it's just reinitialized for every new linked list that's created/initialized. Either way, it wasn't good.

    For now (at least), pthread_mutex_initializer_np() should not be used on Windows!

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, March 15, 2026 16:01:53
    https://gitlab.synchro.net/main/sbbs/-/commit/3dc261a5a65ca3934b326aac
    Modified Files:
    src/xpdev/link_list.c
    Log Message:
    Fix listNodeIndex() always returning 0

    The index counter i was never incremented in the traversal loop,
    so the function always returned 0 regardless of the node's actual
    position in the linked list.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

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