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 ---

[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

[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 @@

[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

[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,

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,

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,

[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

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,

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 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

[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

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

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

[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

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   *

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   *

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

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

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

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().

[PATCH] 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 | 2 +- testsuites/libtests/malloctest/init.c | 10 +- 2 files changed, 6 insertions(+), 6

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

2018-10-05 Thread Daniel Hellstrom
This fixes the following test failures on LEON3 UP/SMP when built using clang compiler: * fsjffs2gc01 * jffs2_fserror * jffs2_fspermission * jffs2_fsrdwr * jffs2_fstime --- cpukit/libfs/src/jffs2/src/nodelist.c | 2 +- cpukit/libfs/src/jffs2/src/readinode.c | 4 ++-- 2 files changed, 3

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

2018-10-05 Thread Daniel Hellstrom
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 assertion makes sense at all. SEM_FAILED is

[PATCH] leon, spwtdp: Initial driver commit

2018-10-05 Thread Daniel Hellstrom
From: Javier Jalle --- bsps/sparc/headers.am|1 + bsps/sparc/include/bsp/spwtdp.h | 320 ++ bsps/sparc/include/drvmgr/ambapp_bus.h |1 + bsps/sparc/shared/spw/spwtdp.c | 1022 ++

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

2018-10-05 Thread Daniel Hellstrom
rtems-syms assumes that the compiler used is GCC. This breaks the build if using a different compiler (such as Clang). Using the --cc argument for rtems-syms we can specify the compiler. A better implementation would mabe be to configure the default compiler to LLVM when building rtems-tools? ---

[PATCH] leon: do not use -mfix-{device} with Clang

2018-10-05 Thread Daniel Hellstrom
Clang do not support -mfix-gr712rc, -mfix-ut700 and -mfix-ut699. Therefore we adjust the CPU_CFLAGS to remove these when compiling with Clang. Instead use GR712RC: -mcpu=gr712rc GR740:-mcpu=gr740 UT699/UT700: Not currently supported by clang, use LEON3 BSP. ---

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

2018-10-05 Thread Sebastian Huber
On 05/10/2018 08:28, Chris Johns wrote: On 05/10/2018 16:07, Sebastian Huber wrote: Problems appear later (this is expected): $ ./rtems-test --version Traceback (most recent call last):   File "./rtems-test", line 39, in     import rt.test ...   File

[PATCH] score: Fix legacy RTEMS_STATIC_ASSERT()

2018-10-05 Thread Sebastian Huber
In standard C pointer operands are not allowed in integer constant expression. Avoid a static assertion based on an array typedef since this could lead to warnings ("variably modified 'x' at file scope" and "typedef 'x' locally defined but not used"); This implementation requires unique

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

2018-10-05 Thread Chris Johns
On 05/10/2018 16:07, Sebastian Huber wrote: > > Problems appear later (this is expected): > > $ ./rtems-test --version > Traceback (most recent call last): >   File "./rtems-test", line 39, in >     import rt.test > ... >   File "/c/msys2/home/test/share/rtems/tester/rt/tftpy/TftpStates.py",

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

2018-10-05 Thread Sebastian Huber
On 05/10/2018 07:49, Chris Johns wrote: On 05/10/2018 15:19, Sebastian Huber wrote: Hello Chris, On 05/10/2018 06:24,chr...@rtems.org wrote: -# -# Support to handle use in a package and as a unit test. -# If there is a better way to let us know. -# -try: -    from . import error -    from .