New Coverity Scan Results

2018-10-05 Thread Joel Sherrill
Hi I submitted a build this morning and 6 were noted as resolved. https://scan.coverity.com/projects/rtems Still multiple outstanding. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel

[PATCH 6/6] ftpd: Fix insecure chroot() handling

2018-10-05 Thread Sebastian Huber
Ensure that the rtems_libio_set_private_env() was successful before the chroot(). Update #3530. --- cpukit/ftpd/ftpd.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c index b319dae9ed..08c39da31f 100644 --- a/cpukit/ftp

[PATCH 3/6] ftpd: Avoid malloc() and sscanf()

2018-10-05 Thread Sebastian Huber
Move the user name to the session information. Update #3530. --- cpukit/ftpd/ftpd.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c index fb67335c0c..25656134fb 100644 --- a/cpukit/ftpd/ftpd.c +++ b/cpukit/ftpd/ftpd.c @@ -265,6 +2

[PATCH 4/6] ftpd: Avoid use of uninitialized memory

2018-10-05 Thread Sebastian Huber
Update #3530. --- cpukit/ftpd/ftpd.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c index 25656134fb..c9f6f656e3 100644 --- a/cpukit/ftpd/ftpd.c +++ b/cpukit/ftpd/ftpd.c @@ -1968,19 +1968,16 @@ ftpd_daemon(rtems_task_argu

[PATCH 2/6] ftpd: Remove FTPD_SessionInfo_t::pass member

2018-10-05 Thread Sebastian Huber
There is no need to keep the password throughout the session. Update #3530. --- cpukit/ftpd/ftpd.c | 10 +- testsuites/libtests/ftp01/ftp01.scn | 32 testsuites/libtests/ftp01/init.c| 25 ++--- 3 files changed, 51 i

[PATCH 1/6] ftpd: Avoid NULL pointer checks before free()

2018-10-05 Thread Sebastian Huber
They are superfluous and just bloat the code. Update #3530. --- cpukit/ftpd/ftpd.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c index 0d713c03e8..ccb2a93410 100644 --- a/cpukit/ftpd/ftpd.c +++ b/cpukit/ftpd/ftpd.c @@

[PATCH 5/6] ftpd: Avoid resource leak

2018-10-05 Thread Sebastian Huber
Update #3530. --- cpukit/ftpd/ftpd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c index c9f6f656e3..b319dae9ed 100644 --- a/cpukit/ftpd/ftpd.c +++ b/cpukit/ftpd/ftpd.c @@ -2041,6 +2041,8 @@ ftpd_daemon(rtems_task_argument args RTEMS_UNUSED) }

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Sebastian Huber
On 05/10/2018 15:33, Daniel Hellstrom wrote: On 2018-10-05 14:01, Sebastian Huber wrote: On 05/10/2018 13:43, Daniel Hellstrom wrote: On 2018-10-05 13:01, Sebastian Huber wrote: On 05/10/2018 12:44, Daniel Hellstrom wrote: On 2018-10-05 09:41, Sebastian Huber wrote: On 05/10/2018 09:38, Dan

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Daniel Hellstrom
On 2018-10-05 14:01, Sebastian Huber wrote: On 05/10/2018 13:43, Daniel Hellstrom wrote: On 2018-10-05 13:01, Sebastian Huber wrote: On 05/10/2018 12:44, Daniel Hellstrom wrote: On 2018-10-05 09:41, Sebastian Huber wrote: On 05/10/2018 09:38, Daniel Hellstrom wrote: On 2018-10-05 09:34, Se

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Sebastian Huber
On 05/10/2018 13:43, Daniel Hellstrom wrote: On 2018-10-05 13:01, Sebastian Huber wrote: On 05/10/2018 12:44, Daniel Hellstrom wrote: On 2018-10-05 09:41, Sebastian Huber wrote: On 05/10/2018 09:38, Daniel Hellstrom wrote: On 2018-10-05 09:34, Sebastian Huber wrote: On 05/10/2018 09:25, Da

[PATCH] jffs2: Avoid use of constant register variable

2018-10-05 Thread Sebastian Huber
Avoid the use of a constant register variable which is used in some conditions. This gets rid of a clang -Wsometimes-uninitialized warning. --- cpukit/libfs/src/jffs2/src/readinode.c | 12 1 file changed, 12 insertions(+) diff --git a/cpukit/libfs/src/jffs2/src/readinode.c b/cpukit

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Daniel Hellstrom
On 2018-10-05 13:01, Sebastian Huber wrote: On 05/10/2018 12:44, Daniel Hellstrom wrote: On 2018-10-05 09:41, Sebastian Huber wrote: On 05/10/2018 09:38, Daniel Hellstrom wrote: On 2018-10-05 09:34, Sebastian Huber wrote: On 05/10/2018 09:25, Daniel Hellstrom wrote: On 2018-10-05 09:12, Se

Re: [PATCH v2] testsuite,clang: fix malloc04 and malloctest for on clang

2018-10-05 Thread Sebastian Huber
On 05/10/2018 09:57, Daniel Hellstrom wrote: malloc04 and malloctest tests from the rtems test-suite fails when checking the return value of malloc(). The check is optimized away and always fails. --- testsuites/libtests/malloc04/init.c | 6 ++ testsuites/libtests/malloctest/init.c | 1 +

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Sebastian Huber
On 05/10/2018 12:44, Daniel Hellstrom wrote: On 2018-10-05 09:41, Sebastian Huber wrote: On 05/10/2018 09:38, Daniel Hellstrom wrote: On 2018-10-05 09:34, Sebastian Huber wrote: On 05/10/2018 09:25, Daniel Hellstrom wrote: On 2018-10-05 09:12, Sebastian Huber wrote: On 05/10/2018 08:57, Da

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Daniel Hellstrom
On 2018-10-05 09:41, Sebastian Huber wrote: On 05/10/2018 09:38, Daniel Hellstrom wrote: On 2018-10-05 09:34, Sebastian Huber wrote: On 05/10/2018 09:25, Daniel Hellstrom wrote: On 2018-10-05 09:12, Sebastian Huber wrote: On 05/10/2018 08:57, Daniel Hellstrom wrote: This fixes the followin

[PATCH v2] testsuite,clang: fix malloc04 and malloctest for on clang

2018-10-05 Thread Daniel Hellstrom
malloc04 and malloctest tests from the rtems test-suite fails when checking the return value of malloc(). The check is optimized away and always fails. --- testsuites/libtests/malloc04/init.c | 6 ++ testsuites/libtests/malloctest/init.c | 1 + 2 files changed, 7 insertions(+) diff --git a/

Re: [PATCH] rtemstoolkit: Fix imports and fix all unittests.

2018-10-05 Thread Chris Johns
On 05/10/2018 16:32, Sebastian Huber wrote: > You use Python 2. I have Python 3. It doesn't run that far to figure out that > this option is not available. Ah OK. There could be an issue with python3 and given python2 is now not available on MSYS2 it will need to work. Chris _

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Sebastian Huber
On 05/10/2018 09:38, Daniel Hellstrom wrote: On 2018-10-05 09:34, Sebastian Huber wrote: On 05/10/2018 09:25, Daniel Hellstrom wrote: On 2018-10-05 09:12, Sebastian Huber wrote: On 05/10/2018 08:57, Daniel Hellstrom wrote: This fixes the following test failures on LEON3 UP/SMP when built usi

Re: [PATCH] libtests: Supply --cc argument to rtems-syms for clang

2018-10-05 Thread Chris Johns
On 05/10/2018 16:57, Daniel Hellstrom wrote: > A better implementation would mabe be to configure the default compiler > to LLVM when building rtems-tools? Yes I agree this is a better solution and more helpful. It means we need to figure out a way to determine the `cc_name`. What does a clang $C

[PATCH] Fix rbtree_postorder_for_each_entry_safe()

2018-10-05 Thread Sebastian Huber
Use the non-standard typeof operator to avoid code generation errors with clang and use of uninitialized variable warnings with GCC and Coverity Scan. Update #3465. --- cpukit/include/linux/rbtree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpukit/include/linux/rbtre

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Daniel Hellstrom
On 2018-10-05 09:34, Sebastian Huber wrote: On 05/10/2018 09:25, Daniel Hellstrom wrote: On 2018-10-05 09:12, Sebastian Huber wrote: On 05/10/2018 08:57, Daniel Hellstrom wrote: This fixes the following test failures on LEON3 UP/SMP when built using clang compiler:   * fsjffs2gc01   * jffs2_f

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Sebastian Huber
On 05/10/2018 09:25, Daniel Hellstrom wrote: On 2018-10-05 09:12, Sebastian Huber wrote: On 05/10/2018 08:57, Daniel Hellstrom wrote: This fixes the following test failures on LEON3 UP/SMP when built using clang compiler:   * fsjffs2gc01   * jffs2_fserror   * jffs2_fspermission   * jffs2_fsrdwr

Re: [PATCH] testsuite, clang: fix malloc04 and malloctest for on clang

2018-10-05 Thread Daniel Hellstrom
On 2018-10-05 09:14, Sebastian Huber wrote: On 05/10/2018 08:57, Daniel Hellstrom wrote: malloc04 and malloctest tests from the rtems test-suite fails when checking the return value of malloc(). The check is optimized away and always fails. Please change the patch to use RTEMS_OBFUSCATE_VARI

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Daniel Hellstrom
On 2018-10-05 09:12, Sebastian Huber wrote: On 05/10/2018 08:57, Daniel Hellstrom wrote: This fixes the following test failures on LEON3 UP/SMP when built using clang compiler:   * fsjffs2gc01   * jffs2_fserror   * jffs2_fspermission   * jffs2_fsrdwr   * jffs2_fstime The problem is probably in

Re: [RFC] clang, posix: bypass static assert that does not compile with Clang

2018-10-05 Thread Sebastian Huber
On 05/10/2018 08:57, Daniel Hellstrom wrote: From: Jacob Hansen This commits bypasses a static assert when using the Clang compiler. This is done as the static assertion does not compile with Clang ("static_assert expression is not an integral constant expression"). I am not sure this static a

Re: [PATCH] testsuite, clang: fix malloc04 and malloctest for on clang

2018-10-05 Thread Sebastian Huber
On 05/10/2018 08:57, Daniel Hellstrom wrote: malloc04 and malloctest tests from the rtems test-suite fails when checking the return value of malloc(). The check is optimized away and always fails. Please change the patch to use RTEMS_OBFUSCATE_VARIABLE() in the spots where the compiler tries t

Re: [PATCH] jffs, clang: avoid some warnings of used uninitialized ptr

2018-10-05 Thread Sebastian Huber
On 05/10/2018 08:57, Daniel Hellstrom wrote: This fixes the following test failures on LEON3 UP/SMP when built using clang compiler: * fsjffs2gc01 * jffs2_fserror * jffs2_fspermission * jffs2_fsrdwr * jffs2_fstime The problem is probably in the rbtree_postorder_for_each_entry_safe().