-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-16378
-
-
-
C7000_7.0.0.STS*
-
default
-
Don't call signal() or functions that call it.
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.