=== R5: Do not use dynamic memory allocation after task initialization: 9
t1.c:6:
1: 6 NULL == allocator ||
t1.c:7:
2: 7 NULL == allocator->allocate ||
t1.c:8:
3: 8 NULL == allocator->deallocate ||
t1.c:9:
4: 9 NULL == allocator->zero_allocate ||
t1.c:10:
5: 10 NULL == allocator->reallocate)
globals used in one scope only: 0
globals used in one file only: 0
=== R16: Nr of statements: 2
=== R16: Nr of assertions: 0
=== R16: the minimum number of assertions is 2% = 0
1 errors
Using either the jpl or p10 rule sets, the following code erroneously generates the "Do not use dynamic memory after task initialization".
To reproduce:
Where t1.c is:
The resulting output is: