Coverity Scan on rtems_libio_post_driver()
Joel Sherrill
joel.sherrill at OARcorp.com
Mon Sep 16 21:25:44 UTC 2013
On 9/16/2013 4:13 PM, Gedare Bloom wrote:
> I think your analysis is right, but I would mark it "intentional"
Done. Nice to close three.
Interesting that every file that has more than one issue is in the
shell or uuid code. Most is from third parties.
Take a peek at Issue 1063872 and 1063873. These are in main_help.c
and I think Scan is not happy with newlib's putchar() macro. It
increments the buffer pointer but it always ends up one past
what you use on any given call.
I think this is another intentional but a double check is also
appreciated.
Leaving the harder ones for later. The ones which look intentional
I would like to kill quickly.
--joel
> -Gedare
>
> On Mon, Sep 16, 2013 at 5:11 PM, Joel Sherrill
> <joel.sherrill at oarcorp.com> wrote:
>> Hi
>>
>> Ids 1063883, 1063884, and 1063885.
>>
>> I was looking at the items Coverity Scan marks as
>> resource leaks and rtems_libio_post_driver() is
>> marked for three leaks because the open for
>> stdin, out, and error assign the integer fd to
>> a local variable which falls out of scope.
>>
>> cpukit/libcsupport/open_dev_console.c
>>
>> I think the analysis is technically correct. We
>> assign the fd returned by open() to a local
>> variable which falls out of scope but these
>> are fd 0, 1, and 2 which are special. Coverity
>> doesn't know these are special.
>>
>> I am prone to mark these as false positive.
>> Before I do that, I would appreciate someone
>> confirming my analysis.
>>
>> --
>> Joel Sherrill, Ph.D. Director of Research & Development
>> joel.sherrill at OARcorp.com On-Line Applications Research
>> Ask me about RTEMS: a free RTOS Huntsville AL 35805
>> Support Available (256) 722-9985
>>
>> _______________________________________________
>> rtems-devel mailing list
>> rtems-devel at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-devel
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel
mailing list