[osv-dev] GCC 10 warnings on Fedora 32

2020-05-05 Thread Waldek Kozaczuk
Trying to build OSv on Fedora 32 with GCC 10 yields (unsurprisingly) errors: " AS arch/x64/boot.S CXX bsd/init.cc CXX bsd/net.cc CXX bsd/x64/machine/in_cksum.cc CC bsd/sys/crypto/rijndael/rijndael-alg-fst.c CC bsd/sys/crypto/rijndael/rijndael-api.c In file included from

[osv-dev] Re: GCC 10 warnings on Fedora 32

2020-05-05 Thread Waldek Kozaczuk
I wonder if that is related - https://gcc.gnu.org/legacy-ml/gcc-patches/2019-10/msg01118.html? On Tuesday, May 5, 2020 at 11:09:58 AM UTC-4, Waldek Kozaczuk wrote: > > Trying to build OSv on Fedora 32 with GCC 10 yields (unsurprisingly) > errors: > > " AS arch/x64/boot.S > CXX bsd/init.cc >

Re: [osv-dev] GCC 10 warnings on Fedora 32

2020-05-05 Thread Nadav Har'El
Sorry about being unresponsive lately. Trying to correct that (a bit) with this response. I haven't upgraded any machine to Fedora 32 yet (I'll do it soon), so I can't test this myself. But I can make a suggestion without trying it: On Tue, May 5, 2020 at 6:09 PM Waldek Kozaczuk wrote: > Trying

[osv-dev] [COMMIT osv master] mempool: fix reallocarray to properly handle overflow

2020-05-05 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Waldemar Kozaczuk Branch: master mempool: fix reallocarray to properly handle overflow Signed-off-by: Waldemar Kozaczuk --- diff --git a/core/mempool.cc b/core/mempool.cc --- a/core/mempool.cc +++ b/core/mempool.cc @@ -2014,9 +2014,14 @@ void* realloc(void*

[osv-dev] [COMMIT osv master] zfs: replace strncpy with safer strlcpy which is detected by gcc 10

2020-05-05 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Nadav Har'El Branch: master zfs: replace strncpy with safer strlcpy which is detected by gcc 10 Signed-off-by: Waldemar Kozaczuk Message-Id: <20200505221304.47178-3-jwkozac...@gmail.com> --- diff --git

[osv-dev] [COMMIT osv master] pthreads: add stubs for new *clockwait/*clocklock functions to fix gcc 10 errors

2020-05-05 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Nadav Har'El Branch: master pthreads: add stubs for new *clockwait/*clocklock functions to fix gcc 10 errors Nadav writes: "It appears that the new C++ header file (included by include/osv/mutex.h, I don't remember why) needs pthread_mutex_clocklock() to be

[osv-dev] [COMMIT osv master] gcc 10: fix warnings but including various standard headers in couple of files

2020-05-05 Thread Commit Bot
From: Waldemar Kozaczuk Committer: Nadav Har'El Branch: master gcc 10: fix warnings but including various standard headers in couple of files All of the sudden new gcc 10 complains about some missing types definitions so we make it happy by including proper headers in right places.

[osv-dev] [PATCH 4/4] gcc 10: fix duplicate linker symbol errors

2020-05-05 Thread Waldemar Kozaczuk
Signed-off-by: Waldemar Kozaczuk --- bsd/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h | 2 +- bsd/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h | 2 +- .../contrib/opensolaris/lib/libzfs/common/libzfs_util.c | 2 -- .../contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c | 8

[osv-dev] [PATCH 2/4] gcc 10: fix warnings but including various standard headers in couple of files

2020-05-05 Thread Waldemar Kozaczuk
All of the sudden new gcc 10 complains about some missing types definitions so we make it happy by including proper headers in right places. Signed-off-by: Waldemar Kozaczuk --- arch/x64/string-ssse3.cc | 1 + include/osv/index-list.hh | 2 ++ tests/tst-sendfile.cc | 1 +

[osv-dev] [PATCH 1/4] pthreads: add stubs for new *clockwait/*clocklock functions to fix gcc 10 errors

2020-05-05 Thread Waldemar Kozaczuk
Nadav writes: "It appears that the new C++ header file (included by include/osv/mutex.h, I don't remember why) needs pthread_mutex_clocklock() to be defined in our pthread header files. Let's just implement this function. Seeing that our pthread_mutex_timedlock() is already a stub (nobody

[osv-dev] [PATCH 3/4] zfs: replace strncpy with safer strlcpy which is detected by gcc 10

2020-05-05 Thread Waldemar Kozaczuk
Signed-off-by: Waldemar Kozaczuk --- bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

[osv-dev] Re: [PATCH 4/4] gcc 10: fix duplicate linker symbol errors

2020-05-05 Thread Waldek Kozaczuk
OK . I believe the 4th one is faulty. At least it makes cpiod crash on Ubuntu 19.10. But the first 3 of this series should be good. But should be reviewed. Waldek On Tuesday, May 5, 2020 at 6:13:31 PM UTC-4, Waldek Kozaczuk wrote: > > Signed-off-by: Waldemar Kozaczuk > --- >

[osv-dev] [PATCH] module.py: replace "is" literal with "==" to make Python 3.8 happy

2020-05-05 Thread Waldemar Kozaczuk
Signed-off-by: Waldemar Kozaczuk --- scripts/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/module.py b/scripts/module.py index d7128388..8a1a5406 100755 --- a/scripts/module.py +++ b/scripts/module.py @@ -110,7 +110,7 @@ def make_cmd(cmdline, j,

[osv-dev] [PATCH V2 4/4] gcc 10: fix duplicate linker symbol errors

2020-05-05 Thread Waldemar Kozaczuk
All of the sudden gcc 10 linker has found number of duplicate ZFS related symbols which this patch fixes: - g_zfs - aok - zfsdev_state Signed-off-by: Waldemar Kozaczuk --- bsd/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h | 2 +- bsd/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c

Re: [osv-dev] GCC 10 warnings on Fedora 32

2020-05-05 Thread Waldek Kozaczuk
After the new 4th patch applied OSv compiles and links with GCC 10. But it does not quite boot properly not build ZFS images. For example one can build ROFS image and run it with '-k' option successfully: ./scripts/build image=native-example fs=rofs -j4 ./scripts/run.py -k The same image also

[osv-dev] Re: [PATCH V2 4/4] gcc 10: fix duplicate linker symbol errors

2020-05-05 Thread Waldek Kozaczuk
This one makes OSv compile, link and boot with older versions of gcc. It also makes OSv compile and link with gcc 10 (but does not boot yet for other reasons). On Tuesday, May 5, 2020 at 11:51:27 PM UTC-4, Waldek Kozaczuk wrote: > > All of the sudden gcc 10 linker has found number of duplicate