| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Add lifetime bytes allocated and freed since they were present in the
malloc statistics. Add number of failed allocations.
|
|
|
|
| |
Print out heap statistics via the MALLOC and WKSPACE shell commands.
|
|
|
|
|
|
|
| |
Use the heap handler statistics instead. Add heap walk option to MALLOC
shell command.
close #1367
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug report by Oleg Kravtsov:
In rtems_bdbuf_swapout_processing() function there is the following
lines:
if (bdbuf_cache.sync_active && !transfered_buffers)
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
...
}
Here access to bdbuf_cache.sync_active is not protected with anything.
Imagine the following test case:
1. Task1 releases buffer(s) with bdbuf_release_modified() calls;
2. After a while swapout task starts and flushes all buffers;
3. In the end of that swapout flush we are before that part of code, and
assume there is task switching (just before "if (bdbuf_cache.sync_active
&& !transfered_buffers)");
4. Some other task (with higher priority) does bdbuf_release_modified
and rtems_bdbuf_syncdev().
This task successfully gets both locks sync and pool (in
rtems_bdbuf_syncdev() function), sets sync_active to true and starts
waiting for RTEMS_BDBUF_TRANSFER_SYNC event with only sync lock got.
5. Task switching happens again and we are again before "if
(bdbuf_cache.sync_active && !transfered_buffers)".
As the result we check sync_active and we come inside that "if"
statement.
6. The result is that we send RTEMS_BDBUF_TRANSFER_SYNC event! Though
ALL modified messages of that task are not flushed yet!
close #1485
|
| |
|
| |
|
|
|
|
| |
close #2030
|
|
|
|
|
|
|
| |
Ensure that scheduler nodes in the SCHEDULER_HELP_ACTIVE_OWNER or
SCHEDULER_HELP_ACTIVE_RIVAL helping state are always
SCHEDULER_SMP_NODE_READY or SCHEDULER_SMP_NODE_SCHEDULED to ensure the
MrsP protocol properties.
|
| |
|
|
|
|
| |
Add rtems_cache_coherent_free() and rtems_cache_coherent_add_area().
|
|
|
|
|
|
|
| |
CodeSonar flagged this as a case where the user could inject a format
string and cause issues. Since we were not printing anything but a
string, just switching to puts() rather than fprintf(stdout,...) was
sufficient to make this code safer.
|
| |
|
|
|
|
|
| |
CodeSonar flagged this as a possible NULL deference. This should never
occur but adding the _Assert() ensures we are guarding against that.
|
|
|
|
|
| |
CodeSonar flagged this as a potential NULL deference. That should never
occur but adding the _Assert() ensures we are checking that.
|
|
|
|
|
|
|
|
|
| |
CodeSonar flagged this as an empty if body. Upon analysis, it turned
out to be an error that we think should never occur but if it did,
there is nothing we could do about it. It would likely just indicate
the thread was deleted before we got here. Adding the _Assert() at least
will flag this if it ever occurs during a debug build and we can discuss
what happened.
|
|
|
|
|
|
|
|
|
|
| |
CodeSonar flagged this as a case where the user could inject a format
string and cause issues. Since we were not printing anything but a
string, just switching to puts() rather than fprintf(stdout,...) was
sufficient to make this code safer.
snprintf() places a limit on the length of the output from sprintf()
and avoids similar buffer overrun issues.
|
|
|
|
|
| |
CodeSonar flagged this as a possible dereference of a NULL pointer.
This should never occur so adding _Assert().
|
|
|
|
|
| |
CodeSonar flagged the increment of this pointer as unneeded. The pointer
is not used past this point.
|
|
|
|
|
| |
CodeSonar flagged this as a case where the return value from fat_sync()
was not used. Now it is used to return pass/fail to the caller.
|
|
|
|
|
|
| |
These were flagged by CodeSonar. The assignments on variable declaration
are overridden a few lines below and the other line later with name_size
is where name_size was not used after this assignment.
|
|
|
|
|
| |
This was flagged as an empty for statement by CodeSonar but is actually
unreachable code that should be removed.
|
|
|
|
| |
This was flagged by CodeSonar.
|
|
|
|
|
|
|
| |
CodeSonar detects a possible NULL deference here. But it should never
occur in tested code. Memory for the API Mutexes is reserved by confdefs.h
and are all preallocated when the class of objects is initialized.
Allocating a single instance should never fail.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Coverity Id 1255320 spotted an unchecked return value.
|
|
|
|
|
|
| |
Coverity Id 1255518. mkdir() could fail. Check return value and return
on failure. Behavior is similar to if open() failed while writing the
files.
|
|
|
|
| |
Coverity Id 1063887. File descriptor not freed on error path.
|
|
|
|
| |
Coverity Id 1255353. Read from pointer after free().
|
|
|
|
| |
Coverity ID 1255520. fd was not closed on error path.
|
| |
|
| |
|
|
|
|
|
|
| |
Make sure also the size is cache aligned since otherwise we may have
some overlap with the next allocation block. A cache invalidate on this
area would be fatal.
|
|
|
|
| |
Move system state check to malloc_is_system_state_OK().
|
|
|
|
|
|
|
| |
Converting 64-bit nanoseconds values into the common struct timeval or
struct timespec formats requires a 64-bit division to get the seconds
value. Performance analysis of high network loads revealed that this is
too costly on ARM.
|
| |
|
|
|
|
|
|
| |
To support smp data was broken into global and percpu capture data.
Capture control must be disabled prior to printing or setting of
watch points.
|
|
|
|
|
|
|
| |
Methods to print the data were moved from capture-cli into
a support area and are no longer static so that they can
be shared by test routines, or application code that wants
to use the capture engine without the shell interface.
|
|
|
|
|
|
|
| |
The catpture task record is now logged just prior to the first
log entry using that task instead of the first time the task
is seen. This involved splitting the record task method into
an initialize task and a record task.
|
| |
|
|
|
|
|
| |
Delete this variable since it is no longer necessary due to the thread
priority queue implementation change to use RB trees.
|
|
|
|
|
|
|
|
|
|
|
|
| |
New test case for smptests/smpmrsp01.
Fix _Scheduler_Block_node() in case the node is in the
SCHEDULER_HELP_ACTIVE_RIVAL helping state. For example a
rtems_task_suspend() on a task waiting for a MrsP semaphore.
Fix _Scheduler_Unblock_node() in case the node is in the
SCHEDULER_SMP_NODE_READY state. For example a rtems_task_resume() on a
task owning or waiting for a MrsP semaphore.
|
|
|
|
| |
close 1423
|
|
|
|
|
| |
Coverity spotted the comparison (0 <= length) which is always true.
Changed logic to address this.
|
|
|
|
| |
It does not appear that this is possible so adding an assert.
|
|
|
|
|
|
| |
Coverity spotted that the return code from fat_set_fat_cluster()
was ignored. But it should be because we want to return the status
that caused us to hit the cleanup path.
|