C standard library function signal() takes lock a second time instead of releasing it

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium

      In lib/src/signal.c:

      __TI_resource_lock(__TI_LOCK_HEAP_ALLOC);
      s = sigTable[sig];
      sigTable[sig] = handler;
      __TI_resource_lock(__TI_LOCK_HEAP_ALLOC);   // should be __TI_resource_unlock 

      This can cause problems if a lock is registered with _register_lock/_register_unlock (TI ARM Clang user guide) and something calls signal(). raise() and some math function like lrint and lround call signal(). When signal() is called, the registered lock function will be called twice and the unlock function will not be called.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-7120 - C standard library function signal(...
                SYNCHRONIZED
                • Last Sync Date: