summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tools: Provide strnlen() if missingSebastian Huber2014-12-024-3/+50
|
* libtests/complex,math: Prevent optimizationsSebastian Huber2014-12-012-81/+195
| | | | | | | For constant arguments GCC calculates the values of the math library functions at compile-time. close #1741
* m68k/mcf5235: GCC 4.9.2 generates invalid code for Init5235.Chris Johns2014-12-013-13/+26
| | | | | | | Move the vector table copy out of the Init5235 source to avoid stipping the GCC bug. Fixes #2204.
* libmisc/shell: Edit history hack is corrupting memory. Remove it.Chris Johns2014-12-011-24/+1
| | | | | | The hack was a debug aid and is not needed. Close #2203.
* score: Add heap statisticsSebastian Huber2014-11-285-23/+59
| | | | | Add lifetime bytes allocated and freed since they were present in the malloc statistics. Add number of failed allocations.
* score: Return heap stats via _Heap_Get_informationSebastian Huber2014-11-288-24/+76
| | | | Print out heap statistics via the MALLOC and WKSPACE shell commands.
* libcsupport: Delete malloc statisticsSebastian Huber2014-11-2826-546/+45
| | | | | | | Use the heap handler statistics instead. Add heap walk option to MALLOC shell command. close #1367
* bdbuf: Fix race condition with sync active flagSebastian Huber2014-11-281-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* sync.c: Add asserts to document and check assumptionsJoel Sherrill2014-11-271-5/+11
|
* msdos_file.c: Reverse return codes per GedareJoel Sherrill2014-11-271-3/+3
|
* rtems-bin2c.c: Fix free() of altered pointerJoel Sherrill2014-11-271-4/+5
|
* bsp/qoriq: Delete empty header fileSebastian Huber2014-11-273-5/+0
| | | | close #2062
* shell: Make mv, cp and rm usable for applicationsSebastian Huber2014-11-274-10/+14
| | | | close #2030
* smptests/smpmrsp01: Use busy waitsSebastian Huber2014-11-271-18/+20
| | | | | Use busy waits instead of sleeps to avoid unnecessary switches to the idle thread.
* smp: Fix scheduler helping protocolSebastian Huber2014-11-273-66/+283
| | | | | | | 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.
* smp: Fix scheduler helping protocol assertionsSebastian Huber2014-11-271-3/+5
|
* bsps/arm: Add .nocache sectionSebastian Huber2014-11-2756-184/+136
| | | | | This section can be use to provide a cache coherent memory area via rtems_cache_coherent_add_area().
* rtems: Add rtems_cache_coherent_allocate()Sebastian Huber2014-11-276-0/+235
| | | | Add rtems_cache_coherent_free() and rtems_cache_coherent_add_area().
* tools/build/*.c: Clean up issues reported by CodeSonarJosh Oguin2014-11-265-306/+309
| | | | | | | This code is built without warnings and ignored by Coverity Scan. CodeSonar found a wide range of issues including buffer overruns, buffer underruns, questionable type conversions, leaks, etc. This set of patches addresses all reported issues.
* monitor/mon-prmisc.c: Use puts() not fprintf()Josh Oguin2014-11-261-1/+1
| | | | | | | 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.
* objectgetnameasstring.c: Reformat _Objects_Get() switch to follow patternJosh Oguin2014-11-261-7/+8
|
* objectimpl.h: Add _Assert() to _Objects_Invalidate_Id()Josh Oguin2014-11-261-0/+6
| | | | | CodeSonar flagged this as a possible NULL deference. This should never occur but adding the _Assert() ensures we are guarding against that.
* chainimpl.h: Add _Assert() to _Chain_Initialize_empty()Josh Oguin2014-11-261-3/+9
| | | | | CodeSonar flagged this as a potential NULL deference. That should never occur but adding the _Assert() ensures we are checking that.
* cpukit/posix/src/timertsr.c: Add _Assert()Josh Oguin2014-11-261-1/+8
| | | | | | | | | 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.
* monitor/mon-editor.c: Use puts() and snprintf() not fprintf() or sprintf()Josh Oguin2014-11-261-5/+7
| | | | | | | | | | 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.
* imfs/imfs_handlers_link.c: Add _Assert for NULL pointerJosh Oguin2014-11-261-0/+2
| | | | | CodeSonar flagged this as a possible dereference of a NULL pointer. This should never occur so adding _Assert().
* dosfs/msdos_misc.c: Remove unnecessary operationJosh Oguin2014-11-261-1/+1
| | | | | CodeSonar flagged the increment of this pointer as unneeded. The pointer is not used past this point.
* dosfs/msdos_file.c: Return an error if it occursJosh Oguin2014-11-261-1/+4
| | | | | 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.
* dosfs/msdos_conv.c: Remove unnecessary operationsJosh Oguin2014-11-261-3/+2
| | | | | | 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.
* libcsupport/src/newlibc_exit.c: Remove dead codeJosh Oguin2014-11-261-1/+1
| | | | | This was flagged as an empty for statement by CodeSonar but is actually unreachable code that should be removed.
* libcsupport/src/mount.c: Remove unnecessary operationJosh Oguin2014-11-261-1/+0
| | | | This was flagged by CodeSonar.
* libchip/serial/z85c30.c: Remove redundant assignmentJosh Oguin2014-11-261-1/+0
| | | | This was flagged by CodeSonar.
* libchip/serial/ns16550* and z8530*: Assert on baud number to avoid divide by 0Josh Oguin2014-11-263-1/+14
| | | | | | This was flagged by CodeSonar. It should be impossible to get an incorrect baud number back but ensure this in debug mode. The _Assert() keeps their scanner from evaluating for divide by 0 past this point.
* libchip/display/disp_hcms29xx.c: Remove useless variable and checkJosh Oguin2014-11-261-6/+1
| | | | This was flagged by CodeSonar.
* libbsp/shared/bspinit.c: Document assumption of NULL returnedJosh Oguin2014-11-261-12/+12
|
* apimutex.c: Add _Assert for NULL pointer accessJosh Oguin2014-11-261-0/+2
| | | | | | | 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.
* shell: Include missing headerSebastian Huber2014-11-261-0/+1
|
* i2c: Do not close file descriptor 0 if open failsSebastian Huber2014-11-261-7/+6
|
* i2c: Avoid undefined right shift operationSebastian Huber2014-11-261-5/+8
|
* smp09: Resolve missing prototype warning.Jennifer Averett2014-11-251-0/+8
|
* smp07: Resolve missing prototype warning.Jennifer Averett2014-11-251-1/+9
|
* smp05: Resolve missing prototype warning.Jennifer Averett2014-11-251-0/+9
|
* smp02: Resolve unused method warnings.Jennifer Averett2014-11-251-7/+1
|
* smp03: Remove set but not used warning.Jennifer Averett2014-11-251-0/+4
| | | | Added status validation.
* smpschedsem01: Remove unused variable warning.Jennifer Averett2014-11-251-1/+0
|
* smpschedaffinity02: Remove unused prototype.Jennifer Averett2014-11-251-1/+0
|
* rtems-rfs-rtems.c: Add cast to address warningJoel Sherrill2014-11-251-1/+1
|
* hexdump-conv.c: Use proper printf() formatting for wchar_tJoel Sherrill2014-11-251-1/+9
|
* main_edit.c: Do not reference beyond end of arrayJoel Sherrill2014-11-251-0/+5
|
* shell/main_edit.c: Note return value not checkedJoel Sherrill2014-11-251-1/+1
| | | | Coverity Id 1255320 spotted an unchecked return value.