svn commit: r337230 - head/sys/x86/x86

2018-08-02 Thread Mark Johnston
Author: markj Date: Fri Aug 3 02:51:37 2018 New Revision: 337230 URL: https://svnweb.freebsd.org/changeset/base/337230 Log: Verify that each frame pointer lies within the thread's kstack. Previously, this check was omitted for the first frame pointer. Reported by: pho Reviewed by:

svn commit: r337229 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Fri Aug 3 02:16:45 2018 New Revision: 337229 URL: https://svnweb.freebsd.org/changeset/base/337229 Log: Reduce taskq and context-switch cost of zio pipe When doing a read from disk, ZFS creates 3 ZIO's: a zio_null(), the logical zio_read(), and then a physical zio.

svn commit: r337227 - in head: cddl/contrib/opensolaris/lib/libnvpair sys/cddl/contrib/opensolaris/common/nvpair sys/cddl/contrib/opensolaris/uts/common/sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Fri Aug 3 01:52:25 2018 New Revision: 337227 URL: https://svnweb.freebsd.org/changeset/base/337227 Log: MFV r337223: 9580 Add a hash-table on top of nvlist to speed-up operations illumos/illumos-gate@2ec7644aab2a726a64681fa66c6db8731b160de1 Reviewed by: Matt

svn commit: r337222 - in head: sys/kern sys/sys tests/sys/kern

2018-08-02 Thread Alan Somers
Author: asomers Date: Fri Aug 3 01:37:00 2018 New Revision: 337222 URL: https://svnweb.freebsd.org/changeset/base/337222 Log: Fix LOCAL_PEERCRED with socketpair(2) Enable the LOCAL_PEERCRED socket option for unix domain stream sockets created with socketpair(2). Previously, it only

svn commit: r337221 - head/sys/cddl/contrib/opensolaris/common/nvpair

2018-08-02 Thread Alexander Motin
Author: mav Date: Fri Aug 3 01:30:03 2018 New Revision: 337221 URL: https://svnweb.freebsd.org/changeset/base/337221 Log: MFV r337220: 8375 Kernel memory leak in nvpair code illumos/illumos-gate@843c2111b160463f014d325560ad4b051711928e Reviewed by: Pavel Zakharov Reviewed by:

svn commit: r337219 - head/sys/cddl/contrib/opensolaris/common/nvpair

2018-08-02 Thread Alexander Motin
Author: mav Date: Fri Aug 3 01:26:07 2018 New Revision: 337219 URL: https://svnweb.freebsd.org/changeset/base/337219 Log: MFV r337218: 7261 nvlist code should enforce name length limit illumos/illumos-gate@48dd5e630c9b1773b7b10d08a3b90b6c9062d713 Reviewed by: Sebastien Roy

svn commit: r337217 - head/sys/cddl/contrib/opensolaris/common/nvpair

2018-08-02 Thread Alexander Motin
Author: mav Date: Fri Aug 3 01:09:12 2018 New Revision: 337217 URL: https://svnweb.freebsd.org/changeset/base/337217 Log: MFV r337216: 7263 deeply nested nvlist can overflow stack illumos/illumos-gate@9ca527c3d3dfa7c8f304b34a9e03b5eddace838f Reviewed by: Adam Leventhal Reviewed

svn commit: r337215 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/sys/fs

2018-08-02 Thread Alexander Motin
Author: mav Date: Fri Aug 3 00:24:27 2018 New Revision: 337215 URL: https://svnweb.freebsd.org/changeset/base/337215 Log: MFV 337214: 9621 Make createtxg and guid properties public illumos/illumos-gate@e8d4a73c868afb740396041be80ed2b141065e76 Reviewed by: Andy Stormont Reviewed

svn commit: r337213 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Fri Aug 3 00:14:36 2018 New Revision: 337213 URL: https://svnweb.freebsd.org/changeset/base/337213 Log: MFV r337212: 9465 ARC check for 'anon_size > arc_c/2' can stall the system illumos/illumos-gate@abe1fd01ce5a83718c5a840daeab4abdaec1c104 Reviewed by: Sebastien

svn commit: r337211 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Fri Aug 3 00:01:48 2018 New Revision: 337211 URL: https://svnweb.freebsd.org/changeset/base/337211 Log: MFV r337210: 9577 remove zfs_dbuf_evict_key tsd The zfs_dbuf_evict_key TSD (thread-specific data) is not necessary - we can instead pass a flag down in a few places

svn commit: r337209 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 23:56:07 2018 New Revision: 337209 URL: https://svnweb.freebsd.org/changeset/base/337209 Log: MFV r337208: 9591 ms_shift can be incorrectly changed in MOS config for indirect vdevs that have been historically expanded

svn commit: r337207 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 23:50:03 2018 New Revision: 337207 URL: https://svnweb.freebsd.org/changeset/base/337207 Log: MFV r337206: 9338 moved dnode has incorrect dn_next_type illumos/illumos-gate@c7fbe46df966ea665df63b6e6071808987e839d1 Reviewed by: Prashanth Sreenivasa

svn commit: r337205 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 23:46:30 2018 New Revision: 337205 URL: https://svnweb.freebsd.org/changeset/base/337205 Log: MFV r337204: 9439 ZFS double-free due to failure to dirty indirect block illumos/illumos-gate@99a19144e82244f3426f055cc73af8a937c0135c Reviewed by: George Wilson

svn commit: r337203 - head/usr.bin/wc

2018-08-02 Thread Conrad Meyer
Author: cem Date: Thu Aug 2 23:45:14 2018 New Revision: 337203 URL: https://svnweb.freebsd.org/changeset/base/337203 Log: wc(1): Fix 'wc -L' I inadvertently broke 'wc -L' in r326736. We must skip the fast path if -L was specified, in addition to the existing check for the -l option.

svn commit: r337202 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 23:43:01 2018 New Revision: 337202 URL: https://svnweb.freebsd.org/changeset/base/337202 Log: MFV r337200: 9438 Holes can lose birth time info if a block has a mix of birth times Ultimately, the problem here is that when you truncate and write a file in the

svn commit: r337201 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 23:40:28 2018 New Revision: 337201 URL: https://svnweb.freebsd.org/changeset/base/337201 Log: Fix build after r337196 mismerge. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified:

svn commit: r337198 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 23:25:49 2018 New Revision: 337198 URL: https://svnweb.freebsd.org/changeset/base/337198 Log: MFV r337197: 9456 ztest failure in zil_commit_waiter_timeout illumos/illumos-gate@b6031810da58df96413bf76e068638fcab1f228a Reviewed by: Matt Ahrens Reviewed

svn commit: r337196 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 23:23:10 2018 New Revision: 337196 URL: https://svnweb.freebsd.org/changeset/base/337196 Log: MFV r337195: 9454 ::zfs_blkstats should count embedded blocks illumos/illumos-gate@dec267e7ea9828898b1c64462daa6636c4ef5e29 Reviewed by: Dan Kimmel Reviewed

svn commit: r337194 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 23:15:10 2018 New Revision: 337194 URL: https://svnweb.freebsd.org/changeset/base/337194 Log: MFV r337193: 9424 ztest failure: "unprotected error in call to Lua API (Invalid value type 'f unction' for key 'error')"

svn commit: r337192 - in head/sys/dev/cxgbe: . common

2018-08-02 Thread Navdeep Parhar
Author: np Date: Thu Aug 2 22:52:05 2018 New Revision: 337192 URL: https://svnweb.freebsd.org/changeset/base/337192 Log: cxgbe(4): Improvements in TID management. - Ignore any type of TID where the start/end values are not in the correct order. There are situations where the firmware

svn commit: r337191 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 21:59:46 2018 New Revision: 337191 URL: https://svnweb.freebsd.org/changeset/base/337191 Log: MFV r337190: 9486 reduce memory used by device removal on fragmented pools In the most fragmented real-world cases, this reduces memory used by the mapping from ~1GB

svn commit: r337189 - head/usr.sbin/bhyve

2018-08-02 Thread Mariusz Zaborski
Author: oshogbo Date: Thu Aug 2 21:54:34 2018 New Revision: 337189 URL: https://svnweb.freebsd.org/changeset/base/337189 Log: bhyve: set title before entering capability mode PR: 230082 Submitted by: Yuichiro NAITO Modified: head/usr.sbin/bhyve/bhyverun.c Modified:

svn commit: r337188 - head/sys/cddl/contrib/opensolaris

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 21:53:47 2018 New Revision: 337188 URL: https://svnweb.freebsd.org/changeset/base/337188 Log: Record r337187 as merged, since it originated from us. Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed)

svn commit: r337186 - head/share/mk

2018-08-02 Thread Simon J. Gerraty
Author: sjg Date: Thu Aug 2 21:33:45 2018 New Revision: 337186 URL: https://svnweb.freebsd.org/changeset/base/337186 Log: Update dirdeps.mk et al to latest dirdeps.mk and meta.autodep.mk will now look for Makefile.depend.options to handle optional dependencies, the work is all done by

svn commit: r337185 - head/cddl/contrib/opensolaris/lib/libzfs/common

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 21:25:32 2018 New Revision: 337185 URL: https://svnweb.freebsd.org/changeset/base/337185 Log: MFV r337184: 9457 libzfs_import.c:add_config() has a memory leak A memory leak occurs on lines 209 and 213 because the config is not freed in the error case. The

svn commit: r337183 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 21:19:35 2018 New Revision: 337183 URL: https://svnweb.freebsd.org/changeset/base/337183 Log: MFV r337182: 9330 stack overflow when creating a deeply nested dataset Datasets that are deeply nested (~100 levels) are impractical. We just put a limit of 50

svn commit: r337181 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 21:07:04 2018 New Revision: 337181 URL: https://svnweb.freebsd.org/changeset/base/337181 Log: 9539 Make zvol operations use _by_dnode routines Continues what was started in 7801 add more by-dnode routines by fully converting zvols to avoid unnecessary

svn commit: r337179 - head/cddl/contrib/opensolaris/cmd/zdb

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 20:44:07 2018 New Revision: 337179 URL: https://svnweb.freebsd.org/changeset/base/337179 Log: 9523 Large alloc in zdb can cause trouble 16MB alloc in zdb_embedded_block() can cause cores in certain situations (clang, gcc55). OsX commit:

svn commit: r337177 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 20:33:13 2018 New Revision: 337177 URL: https://svnweb.freebsd.org/changeset/base/337177 Log: MFV r337175: 9487 Free objects when receiving full stream as clone All objects after the last written or freed object are not supposed to exist after receiving the

svn commit: r337172 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 20:18:49 2018 New Revision: 337172 URL: https://svnweb.freebsd.org/changeset/base/337172 Log: MFV r337171: 9464 txg_kick() fails to see that we are quiescing, forcing transactions to their next stages without leaving them accumulate changes Ideally we would

svn commit: r337170 - head/sys/fs/nfsclient

2018-08-02 Thread Rick Macklem
Author: rmacklem Date: Thu Aug 2 20:10:59 2018 New Revision: 337170 URL: https://svnweb.freebsd.org/changeset/base/337170 Log: Silence newer gcc warnings. Newer versions of gcc generate "might not be initialized" warnings for several variables in nfsrpc_doiods(). I have checked and all

svn commit: r337169 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 20:06:46 2018 New Revision: 337169 URL: https://svnweb.freebsd.org/changeset/base/337169 Log: MFV r337167: 9442 decrease indirect block size of spacemaps Updates to indirect blocks of spacemaps can contribute significantly to write inflation. Therefore we

svn commit: r337168 - head/sys/dev/cxgbe

2018-08-02 Thread Navdeep Parhar
Author: np Date: Thu Aug 2 19:50:12 2018 New Revision: 337168 URL: https://svnweb.freebsd.org/changeset/base/337168 Log: cxgbe(4): Use the tx credit limit for ethofld rather than TOE when initializing the softc for a per-flow rate limiter. The limit happens to be the same for both and the

svn commit: r337165 - head/sys/fs/fuse

2018-08-02 Thread Conrad Meyer
Author: cem Date: Thu Aug 2 19:25:43 2018 New Revision: 337165 URL: https://svnweb.freebsd.org/changeset/base/337165 Log: FUSE: Bump maximum IO size to enable more performant operation Various components restrict size of IO passed up to the userspace filesystem based on the mount's

svn commit: r337163 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 19:13:45 2018 New Revision: 337163 URL: https://svnweb.freebsd.org/changeset/base/337163 Log: MFV r337161: 9512 zfs remap poolname@snapname coredumps Only filesystems and volumes are valid "zfs remap" parameters: when passed a snapshot name

svn commit: r337160 - in head: cddl/contrib/opensolaris/lib/libzfs/common cddl/lib/libzfs cddl/lib/libzfs_core cddl/lib/libzpool cddl/sbin/zfs cddl/sbin/zpool cddl/usr.bin/zinject cddl/usr.bin/zstr...

2018-08-02 Thread Alexander Motin
Author: mav Date: Thu Aug 2 18:55:55 2018 New Revision: 337160 URL: https://svnweb.freebsd.org/changeset/base/337160 Log: Do not blindly include illumos kernel headers instead of user-space. It is not needed now, and I doubt it much helped at all, creating more confusions then good.

svn commit: r337159 - head/release

2018-08-02 Thread Glen Barber
Author: gjb Date: Thu Aug 2 18:51:44 2018 New Revision: 337159 URL: https://svnweb.freebsd.org/changeset/base/337159 Log: Fix the ftp-stage target for arm embedded builds. The images were renamed from KERNCONF to BOARDNAME when specified, which would result in an image name of:

svn commit: r337158 - head

2018-08-02 Thread Ben Widawsky
Author: bwidawsk Date: Thu Aug 2 18:37:02 2018 New Revision: 337158 URL: https://svnweb.freebsd.org/changeset/base/337158 Log: Remove spuriously added svn properties Modified: head/.gitattributes Modified: head/.gitattributes

svn commit: r337157 - in head: . tools/tools/git

2018-08-02 Thread Ben Widawsky
Author: bwidawsk Date: Thu Aug 2 18:28:02 2018 New Revision: 337157 URL: https://svnweb.freebsd.org/changeset/base/337157 Log: tools: Add a git-svn bootstrap script codified version of https://wiki.freebsd.org/GitWorkflow/GitSvn#Using_git-svn Approved by: emaste (mentor) Suggested

Re: svn commit: r337127 - head/sys/riscv/riscv

2018-08-02 Thread John Baldwin
On 8/2/18 8:50 AM, Konstantin Belousov wrote: > On Thu, Aug 02, 2018 at 08:16:59AM -0700, John Baldwin wrote: >> On 8/2/18 5:13 AM, Ruslan Bukin wrote: >>> Author: br >>> Date: Thu Aug 2 12:13:52 2018 >>> New Revision: 337127 >>> URL: https://svnweb.freebsd.org/changeset/base/337127 >>> >>> Log:

svn commit: r337133 - head/usr.bin/procstat/tests

2018-08-02 Thread Mark Johnston
Author: markj Date: Thu Aug 2 16:03:47 2018 New Revision: 337133 URL: https://svnweb.freebsd.org/changeset/base/337133 Log: Add a rudimentary test for procstat kstack. MFC after:1 week Modified: head/usr.bin/procstat/tests/procstat_test.sh Modified:

Re: svn commit: r337127 - head/sys/riscv/riscv

2018-08-02 Thread Konstantin Belousov
On Thu, Aug 02, 2018 at 08:16:59AM -0700, John Baldwin wrote: > On 8/2/18 5:13 AM, Ruslan Bukin wrote: > > Author: br > > Date: Thu Aug 2 12:13:52 2018 > > New Revision: 337127 > > URL: https://svnweb.freebsd.org/changeset/base/337127 > > > > Log: > > Don't overwrite tp in set_mcontext(). > >

Re: svn commit: r337127 - head/sys/riscv/riscv

2018-08-02 Thread John Baldwin
On 8/2/18 5:13 AM, Ruslan Bukin wrote: > Author: br > Date: Thu Aug 2 12:13:52 2018 > New Revision: 337127 > URL: https://svnweb.freebsd.org/changeset/base/337127 > > Log: > Don't overwrite tp in set_mcontext(). > > This makes libthr/swapcontext_test:swapcontext1 happy. > > Sponsored

svn commit: r337131 - head/stand/efi/loader

2018-08-02 Thread Toomas Soome
Author: tsoome Date: Thu Aug 2 12:43:40 2018 New Revision: 337131 URL: https://svnweb.freebsd.org/changeset/base/337131 Log: loader.efi: efipart_inithandles() failure should not prevent devsw initialization The efipart_inithandles() can return error code when there are no block devices,

Re: svn commit: r335101 - in head: sbin sbin/camcontrol share/mk

2018-08-02 Thread Ed Maste
On 13 June 2018 at 21:15, Warner Losh wrote: > Author: imp > Date: Thu Jun 14 01:15:19 2018 > New Revision: 335101 > URL: https://svnweb.freebsd.org/changeset/base/335101 > > Log: > NVME support is only for x86 and powerpc64. > > Implement MK_NVME ... This is missing WITH_NVME and

svn commit: r337130 - head/share/man/man5

2018-08-02 Thread Ed Maste
Author: emaste Date: Thu Aug 2 12:39:23 2018 New Revision: 337130 URL: https://svnweb.freebsd.org/changeset/base/337130 Log: Regen src.conf.5 after r337057, LLD_BOOTSTRAP on armv7 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5

svn commit: r337129 - head/lib/libthread_db/arch/riscv

2018-08-02 Thread Ruslan Bukin
Author: br Date: Thu Aug 2 12:24:34 2018 New Revision: 337129 URL: https://svnweb.freebsd.org/changeset/base/337129 Log: Implement pt_fpreg_to_ucontext(), pt_ucontext_to_fpreg(). Sponsored by: DARPA, AFRL Modified: head/lib/libthread_db/arch/riscv/libpthread_md.c Modified:

svn commit: r337128 - head/libexec/rtld-elf/riscv

2018-08-02 Thread Ruslan Bukin
Author: br Date: Thu Aug 2 12:21:39 2018 New Revision: 337128 URL: https://svnweb.freebsd.org/changeset/base/337128 Log: Save and restore floating-point arguments. Sponsored by: DARPA, AFRL Modified: head/libexec/rtld-elf/riscv/rtld_start.S Modified:

svn commit: r337127 - head/sys/riscv/riscv

2018-08-02 Thread Ruslan Bukin
Author: br Date: Thu Aug 2 12:13:52 2018 New Revision: 337127 URL: https://svnweb.freebsd.org/changeset/base/337127 Log: Don't overwrite tp in set_mcontext(). This makes libthr/swapcontext_test:swapcontext1 happy. Sponsored by: DARPA, AFRL Modified: head/sys/riscv/riscv/machdep.c

svn commit: r337126 - head/sys/riscv/riscv

2018-08-02 Thread Ruslan Bukin
Author: br Date: Thu Aug 2 12:12:13 2018 New Revision: 337126 URL: https://svnweb.freebsd.org/changeset/base/337126 Log: o Don't overwrite tp in fork_trampoline(). o Save and restore tp in cpu_switch(). o Restore tp in cpu_throw(). o Save tp in savectx(). This makes libthr tests

svn commit: r337125 - head/sys/riscv/riscv

2018-08-02 Thread Ruslan Bukin
Author: br Date: Thu Aug 2 12:08:52 2018 New Revision: 337125 URL: https://svnweb.freebsd.org/changeset/base/337125 Log: o Correctly set user tls base: consider TP_OFFSET. o Ensure tp (thread pointer) saved before copying the pcb. Sponsored by: DARPA, AFRL Modified:

svn commit: r337124 - head/libexec/rtld-elf/tests

2018-08-02 Thread Edward Tomasz Napierala
Author: trasz Date: Thu Aug 2 11:55:16 2018 New Revision: 337124 URL: https://svnweb.freebsd.org/changeset/base/337124 Log: Fix regression tests broken by r337067. MFC after:2 weeks Sponsored by: DARPA, AFRL Modified: head/libexec/rtld-elf/tests/ld_library_pathfds.c Modified:

svn commit: r337123 - head/sys/kern

2018-08-02 Thread Andriy Gapon
Author: avg Date: Thu Aug 2 09:41:55 2018 New Revision: 337123 URL: https://svnweb.freebsd.org/changeset/base/337123 Log: fix a typo resulting in a wrong variable in kern_syscall_deregister The difference is between sysent, a global, and sysents, a function parameter. Modified:

svn commit: r337067 - head/libexec/rtld-elf

2018-08-02 Thread Edward Tomasz Napierala
Author: trasz Date: Thu Aug 2 07:43:28 2018 New Revision: 337067 URL: https://svnweb.freebsd.org/changeset/base/337067 Log: Make sure the rtld(1) error messages go to stderr, not stdout. While here fix capitalization of a few nearby strings, add the rtld's file name prefix so it's obvious

svn commit: r337065 - head/stand/libsa

2018-08-02 Thread Toomas Soome
Author: tsoome Date: Thu Aug 2 06:22:10 2018 New Revision: 337065 URL: https://svnweb.freebsd.org/changeset/base/337065 Log: libsa: dereferencing type-punned pointer in cd9660 The warning is given by gcc build, but it is good to fix anyhow. use bcopy instead of direct assignment.