svn commit: r352495 - head/tests/sys/vm
Author: jilles Date: Wed Sep 18 21:00:32 2019 New Revision: 352495 URL: https://svnweb.freebsd.org/changeset/base/352495 Log: Add some tests for page fault signals and codes It is useful to have some tests for page fault signals. More tests would be useful but creating the conditions (such as various kinds of running out of memory and I/O errors) is more complicated. The tests page_fault_signal__bus_objerr_1 and page_fault_signal__bus_objerr_2 depend on https://reviews.freebsd.org/D21566 before they can pass. PR: 211924 Reviewed by: kib Differential Revision:https://reviews.freebsd.org/D21624 Added: head/tests/sys/vm/page_fault_signal.c (contents, props changed) Modified: head/tests/sys/vm/Makefile Modified: head/tests/sys/vm/Makefile == --- head/tests/sys/vm/Makefile Wed Sep 18 19:53:58 2019(r352494) +++ head/tests/sys/vm/Makefile Wed Sep 18 21:00:32 2019(r352495) @@ -5,6 +5,7 @@ PACKAGE=tests TESTSDIR= ${TESTSBASE}/sys/vm ATF_TESTS_C+= mlock_test \ - mmap_test + mmap_test \ + page_fault_signal .include Added: head/tests/sys/vm/page_fault_signal.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/vm/page_fault_signal.c Wed Sep 18 21:00:32 2019 (r352495) @@ -0,0 +1,184 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Jilles Tjoelker + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +#include +#include +#include +#include +#include + +static sigjmp_buf sig_env; +static volatile int last_sig, last_code; + +static void +sighandler(int sig, siginfo_t *info, void *context __unused) +{ + + last_sig = sig; + last_code = info->si_code; + siglongjmp(sig_env, 1); +} + +static void +setup_signals(void) +{ + struct sigaction sa; + int r; + + sa.sa_sigaction = sighandler; + sa.sa_flags = SA_RESTART | SA_RESETHAND | SA_SIGINFO; + r = sigfillset(_mask); + ATF_REQUIRE(r != -1); + r = sigaction(SIGILL, , NULL); + ATF_REQUIRE(r != -1); + r = sigaction(SIGBUS, , NULL); + ATF_REQUIRE(r != -1); + r = sigaction(SIGSEGV, , NULL); + ATF_REQUIRE(r != -1); +} + +ATF_TC_WITHOUT_HEAD(page_fault_signal__segv_maperr_1); +ATF_TC_BODY(page_fault_signal__segv_maperr_1, tc) +{ + int *p; + int r; + int sz; + + sz = getpagesize(); + p = mmap(NULL, sz, PROT_READ, MAP_ANON, -1, 0); + ATF_REQUIRE(p != MAP_FAILED); + r = munmap(p, sz); + ATF_REQUIRE(r != -1); + if (sigsetjmp(sig_env, 1) == 0) { + setup_signals(); + *(volatile int *)p = 1; + } + ATF_CHECK_EQ(SIGSEGV, last_sig); + ATF_CHECK_EQ(SEGV_MAPERR, last_code); +} + +ATF_TC_WITHOUT_HEAD(page_fault_signal__segv_accerr_1); +ATF_TC_BODY(page_fault_signal__segv_accerr_1, tc) +{ + int *p; + int sz; + + sz = getpagesize(); + p = mmap(NULL, sz, PROT_READ, MAP_ANON, -1, 0); + ATF_REQUIRE(p != MAP_FAILED); + if (sigsetjmp(sig_env, 1) == 0) { + setup_signals(); + *(volatile int *)p = 1; + } + (void)munmap(p, sz); + ATF_CHECK_EQ(SIGSEGV, last_sig); + ATF_CHECK_EQ(SEGV_ACCERR, last_code); +} + +ATF_TC_WITHOUT_HEAD(page_fault_signal__segv_accerr_2); +ATF_TC_BODY(page_fault_signal__segv_accerr_2, tc) +{ + int *p; + volatile int dummy; + int sz; + + sz =
svn commit: r352493 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Wed Sep 18 19:33:08 2019 New Revision: 352493 URL: https://svnweb.freebsd.org/changeset/base/352493 Log: Fix typo, setting hidden flag instead of reparse. Submitted by: Ryan Moeller MFC after:3 days Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 18 19:28:17 2019(r352492) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Sep 18 19:33:08 2019(r352493) @@ -5202,7 +5202,7 @@ zfs_freebsd_setattr(ap) FLAG_CHANGE(UF_HIDDEN, ZFS_HIDDEN, XAT_HIDDEN, xvap.xva_xoptattrs.xoa_hidden); FLAG_CHANGE(UF_REPARSE, ZFS_REPARSE, XAT_REPARSE, - xvap.xva_xoptattrs.xoa_hidden); + xvap.xva_xoptattrs.xoa_reparse); FLAG_CHANGE(UF_OFFLINE, ZFS_OFFLINE, XAT_OFFLINE, xvap.xva_xoptattrs.xoa_offline); FLAG_CHANGE(UF_SPARSE, ZFS_SPARSE, XAT_SPARSE, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r352488 - head/usr.bin/truss
Author: kib Date: Wed Sep 18 16:15:05 2019 New Revision: 352488 URL: https://svnweb.freebsd.org/changeset/base/352488 Log: truss: decode sysctl names. Submitted by: Pawel Biernacki MFC after:1 week Differential revision:https://reviews.freebsd.org/D21688 Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h == --- head/usr.bin/truss/syscall.hWed Sep 18 16:13:50 2019 (r352487) +++ head/usr.bin/truss/syscall.hWed Sep 18 16:15:05 2019 (r352488) @@ -131,6 +131,7 @@ enum Argtype { Sockprotocol, Socktype, Sysarch, + Sysctl, Umtxop, Waitoptions, Whence, Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Wed Sep 18 16:13:50 2019 (r352487) +++ head/usr.bin/truss/syscalls.c Wed Sep 18 16:15:05 2019 (r352488) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #define _WANT_FREEBSD11_STAT #include +#include #include #include #include @@ -506,6 +507,12 @@ static struct syscall decoded_syscalls[] = { .args = { { Name, 0 }, { Atfd, 1 }, { Name, 2 } } }, { .name = "sysarch", .ret_type = 1, .nargs = 2, .args = { { Sysarch, 0 }, { Ptr, 1 } } }, + { .name = "__sysctl", .ret_type = 1, .nargs = 6, + .args = { { Sysctl, 0 }, { Sizet, 1 }, { Ptr, 2 }, { Ptr, 3 }, + { Ptr, 4 }, { Sizet, 5 } } }, + { .name = "__sysctlbyname", .ret_type = 1, .nargs = 6, + .args = { { Name, 0 }, { Sizet, 1 }, { Ptr, 2 }, { Ptr, 3 }, + { Ptr, 4}, { Sizet, 5 } } }, { .name = "thr_kill", .ret_type = 1, .nargs = 2, .args = { { Long, 0 }, { Signal, 1 } } }, { .name = "thr_self", .ret_type = 1, .nargs = 1, @@ -1551,6 +1558,15 @@ print_cmsgs(FILE *fp, pid_t pid, bool receive, struct free(cmsgbuf); } +static void +print_sysctl_oid(FILE *fp, int *oid, int len) +{ + int i; + + for (i = 0; i < len; i++) + fprintf(fp, ".%d", oid[i]); +} + /* * Converts a syscall argument into a string. Said string is * allocated via malloc(), so needs to be free()'d. sc is @@ -2267,6 +2283,62 @@ print_arg(struct syscall_args *sc, unsigned long *args print_integer_arg(sysdecode_sysarch_number, fp, args[sc->offset]); break; + case Sysctl: { + char name[BUFSIZ]; + int oid[CTL_MAXNAME + 2], qoid[CTL_MAXNAME + 2]; + size_t i; + int len; + + memset(name, 0, sizeof(name)); + len = args[sc->offset + 1]; + if (get_struct(pid, (void *)args[sc->offset], oid, + len * sizeof(oid[0])) != -1) { + fprintf(fp, "\""); + if (oid[0] == CTL_SYSCTL) { + fprintf(fp, "sysctl."); + switch (oid[1]) { + case CTL_SYSCTL_DEBUG: + fprintf(fp, "debug"); + break; + case CTL_SYSCTL_NAME: + fprintf(fp, "name"); + print_sysctl_oid(fp, oid + 2, len - 2); + break; + case CTL_SYSCTL_NEXT: + fprintf(fp, "next"); + break; + case CTL_SYSCTL_NAME2OID: + fprintf(fp, "name2oid"); + break; + case CTL_SYSCTL_OIDFMT: + fprintf(fp, "oidfmt"); + print_sysctl_oid(fp, oid + 2, len - 2); + break; + case CTL_SYSCTL_OIDDESCR: + fprintf(fp, "oiddescr"); + print_sysctl_oid(fp, oid + 2, len - 2); + break; + case CTL_SYSCTL_OIDLABEL: + fprintf(fp, "oidlabel"); + print_sysctl_oid(fp, oid + 2, len - 2); + break; + default: + print_sysctl_oid(fp, oid + 1, len - 1); + } + } else { + qoid[0] = CTL_SYSCTL; + qoid[1] = CTL_SYSCTL_NAME; +
svn commit: r352487 - in head: lib/libpmc sys/conf sys/dev/hwpmc sys/sys
Author: br Date: Wed Sep 18 16:13:50 2019 New Revision: 352487 URL: https://svnweb.freebsd.org/changeset/base/352487 Log: Add support for BERI statcounters. BERI stands for Bluespec Extensible RISC Implementation, based on MIPS. BERI has not implemented standard MIPS perfomance monitoring counters, instead it provides statistical counters. BERI statcounters have a several limitations: - They can't be written - They don't support start/stop operation - None of hardware interrupt is provided on a counter overflow. So make it separate to hwpmc_mips module and support process/system counting mode only. Sponsored by: DARPA, AFRL Added: head/sys/dev/hwpmc/hwpmc_beri.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_beri.h (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/conf/files.mips head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/lib/libpmc/libpmc.c == --- head/lib/libpmc/libpmc.cWed Sep 18 16:13:10 2019(r352486) +++ head/lib/libpmc/libpmc.cWed Sep 18 16:13:50 2019(r352487) @@ -143,6 +143,7 @@ PMC_CLASSDEP_TABLE(k8, K8); PMC_CLASSDEP_TABLE(xscale, XSCALE); PMC_CLASSDEP_TABLE(armv7, ARMV7); PMC_CLASSDEP_TABLE(armv8, ARMV8); +PMC_CLASSDEP_TABLE(beri, BERI); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); PMC_CLASSDEP_TABLE(mips74k, MIPS74K); PMC_CLASSDEP_TABLE(octeon, OCTEON); @@ -187,6 +188,7 @@ static const struct pmc_event_descr cortex_a57_event_t PMC_MDEP_TABLE(k8, K8, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); +PMC_MDEP_TABLE(beri, BERI, PMC_CLASS_SOFT, PMC_CLASS_BERI); PMC_MDEP_TABLE(cortex_a8, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(cortex_a9, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(cortex_a53, ARMV8, PMC_CLASS_SOFT, PMC_CLASS_ARMV8); @@ -235,6 +237,7 @@ PMC_CLASS_TABLE_DESC(cortex_a53, ARMV8, cortex_a53, ar PMC_CLASS_TABLE_DESC(cortex_a57, ARMV8, cortex_a57, arm64); #endif #if defined(__mips__) +PMC_CLASS_TABLE_DESC(beri, BERI, beri, mips); PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips); PMC_CLASS_TABLE_DESC(mips74k, MIPS74K, mips74k, mips); PMC_CLASS_TABLE_DESC(octeon, OCTEON, octeon, mips); @@ -829,6 +832,11 @@ arm64_allocate_pmc(enum pmc_event pe, char *ctrspec __ #if defined(__mips__) +static struct pmc_event_alias beri_aliases[] = { + EV_ALIAS("instructions","INST"), + EV_ALIAS(NULL, NULL) +}; + static struct pmc_event_alias mips24k_aliases[] = { EV_ALIAS("instructions","INSTR_EXECUTED"), EV_ALIAS("branches","BRANCH_COMPLETED"), @@ -1267,6 +1275,10 @@ pmc_event_names_of_class(enum pmc_class cl, const char break; } break; + case PMC_CLASS_BERI: + ev = beri_event_table; + count = PMC_EVENT_TABLE_SIZE(beri); + break; case PMC_CLASS_MIPS24K: ev = mips24k_event_table; count = PMC_EVENT_TABLE_SIZE(mips24k); @@ -1508,6 +1520,10 @@ pmc_init(void) break; #endif #if defined(__mips__) + case PMC_CPU_MIPS_BERI: + PMC_MDEP_INIT(beri); + pmc_class_table[n] = _class_table_descr; + break; case PMC_CPU_MIPS_24K: PMC_MDEP_INIT(mips24k); pmc_class_table[n] = _class_table_descr; @@ -1645,6 +1661,9 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype default:/* Unknown CPU type. */ break; } + } else if (pe >= PMC_EV_BERI_FIRST && pe <= PMC_EV_BERI_LAST) { + ev = beri_event_table; + evfence = beri_event_table + PMC_EVENT_TABLE_SIZE(beri); } else if (pe >= PMC_EV_MIPS24K_FIRST && pe <= PMC_EV_MIPS24K_LAST) { ev = mips24k_event_table; evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k); Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsWed Sep 18 16:13:10 2019(r352486) +++ head/sys/conf/files.mipsWed Sep 18 16:13:50 2019(r352487) @@ -91,7 +91,9 @@ dev/nvram2env/nvram2env_mips.coptional nvram2env dev/nvram2env/nvram2env.c optionalnvram2env # hwpmc support -dev/hwpmc/hwpmc_mips.c optionalhwpmc +dev/hwpmc/hwpmc_beri.c optionalhwpmc_beri +dev/hwpmc/hwpmc_mips.c optionalhwpmc_mips24k | \ + hwpmc_mips74k dev/hwpmc/hwpmc_mips24k.c optionalhwpmc_mips24k dev/hwpmc/hwpmc_mips74k.c optionalhwpmc_mips74k Added: head/sys/dev/hwpmc/hwpmc_beri.c
svn commit: r352486 - in head: lib/libc/gen sys/kern sys/sys
Author: kib Date: Wed Sep 18 16:13:10 2019 New Revision: 352486 URL: https://svnweb.freebsd.org/changeset/base/352486 Log: sysctl: use names instead of magic numbers. Replace magic numbers with symbols for internal sysctl operations. Convert in-kernel and libc consumers. Submitted by: Pawel Biernacki MFC after:1 week Differential revision:https://reviews.freebsd.org/D21693 Modified: head/lib/libc/gen/sysctlnametomib.c head/sys/kern/kern_sysctl.c head/sys/sys/sysctl.h Modified: head/lib/libc/gen/sysctlnametomib.c == --- head/lib/libc/gen/sysctlnametomib.c Wed Sep 18 14:38:42 2019 (r352485) +++ head/lib/libc/gen/sysctlnametomib.c Wed Sep 18 16:13:10 2019 (r352486) @@ -47,8 +47,8 @@ sysctlnametomib(const char *name, int *mibp, size_t *s int oid[2]; int error; - oid[0] = 0; - oid[1] = 3; + oid[0] = CTL_SYSCTL; + oid[1] = CTL_SYSCTL_NAME2OID; *sizep *= sizeof(int); error = sysctl(oid, 2, mibp, sizep, name, strlen(name)); Modified: head/sys/kern/kern_sysctl.c == --- head/sys/kern/kern_sysctl.c Wed Sep 18 14:38:42 2019(r352485) +++ head/sys/kern/kern_sysctl.c Wed Sep 18 16:13:10 2019(r352486) @@ -935,13 +935,18 @@ SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_re * (be aware though, that the proper interface isn't as obvious as it * may seem, there are various conflicting requirements. * - * {0,0} printf the entire MIB-tree. - * {0,1,...} return the name of the "..." OID. - * {0,2,...} return the next OID. - * {0,3} return the OID of the name in "new" - * {0,4,...} return the kind & format info for the "..." OID. - * {0,5,...} return the description of the "..." OID. - * {0,6,...} return the aggregation label of the "..." OID. + * {CTL_SYSCTL, CTL_SYSCTL_DEBUG} printf the entire MIB-tree. + * {CTL_SYSCTL, CTL_SYSCTL_NAME, ...} return the name of the "..." + * OID. + * {CTL_SYSCTL, CTL_SYSCTL_NEXT, ...} return the next OID. + * {CTL_SYSCTL, CTL_SYSCTL_NAME2OID} return the OID of the name in + * "new" + * {CTL_SYSCTL, CTL_SYSCTL_OIDFMT, ...}return the kind & format info + * for the "..." OID. + * {CTL_SYSCTL, CTL_SYSCTL_OIDDESCR, ...} return the description of the + * "..." OID. + * {CTL_SYSCTL, CTL_SYSCTL_OIDLABEL, ...} return the aggregation label of + * the "..." OID. */ #ifdef SYSCTL_DEBUG @@ -1009,8 +1014,8 @@ sysctl_sysctl_debug(SYSCTL_HANDLER_ARGS) return (ENOENT); } -SYSCTL_PROC(_sysctl, 0, debug, CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE, - 0, 0, sysctl_sysctl_debug, "-", ""); +SYSCTL_PROC(_sysctl, CTL_SYSCTL_DEBUG, debug, CTLTYPE_STRING | CTLFLAG_RD | +CTLFLAG_MPSAFE, 0, 0, sysctl_sysctl_debug, "-", ""); #endif static int @@ -1075,8 +1080,8 @@ sysctl_sysctl_name(SYSCTL_HANDLER_ARGS) * XXXRW/JA: Shouldn't return name data for nodes that we don't permit in * capability mode. */ -static SYSCTL_NODE(_sysctl, 1, name, CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD, -sysctl_sysctl_name, ""); +static SYSCTL_NODE(_sysctl, CTL_SYSCTL_NAME, name, CTLFLAG_RD | +CTLFLAG_MPSAFE | CTLFLAG_CAPRD, sysctl_sysctl_name, ""); static int sysctl_sysctl_next_ls(struct sysctl_oid_list *lsp, int *name, u_int namelen, @@ -1162,8 +1167,8 @@ sysctl_sysctl_next(SYSCTL_HANDLER_ARGS) * XXXRW/JA: Shouldn't return next data for nodes that we don't permit in * capability mode. */ -static SYSCTL_NODE(_sysctl, 2, next, CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD, -sysctl_sysctl_next, ""); +static SYSCTL_NODE(_sysctl, CTL_SYSCTL_NEXT, next, CTLFLAG_RD | +CTLFLAG_MPSAFE | CTLFLAG_CAPRD, sysctl_sysctl_next, ""); static int name2oid(char *name, int *oid, int *len, struct sysctl_oid **oidpp) @@ -1249,9 +1254,9 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_ARGS) * XXXRW/JA: Shouldn't return name2oid data for nodes that we don't permit in * capability mode. */ -SYSCTL_PROC(_sysctl, 3, name2oid, -CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE -| CTLFLAG_CAPRW, 0, 0, sysctl_sysctl_name2oid, "I", ""); +SYSCTL_PROC(_sysctl, CTL_SYSCTL_NAME2OID, name2oid, CTLTYPE_INT | CTLFLAG_RW | +CTLFLAG_ANYBODY | CTLFLAG_MPSAFE | CTLFLAG_CAPRW, 0, 0, +sysctl_sysctl_name2oid, "I", ""); static int sysctl_sysctl_oidfmt(SYSCTL_HANDLER_ARGS) @@ -1279,8 +1284,8 @@ sysctl_sysctl_oidfmt(SYSCTL_HANDLER_ARGS) } -static SYSCTL_NODE(_sysctl, 4, oidfmt, CTLFLAG_RD|CTLFLAG_MPSAFE|CTLFLAG_CAPRD, -sysctl_sysctl_oidfmt, ""); +static SYSCTL_NODE(_sysctl, CTL_SYSCTL_OIDFMT, oidfmt,
Re: svn commit: r352465 - head/share/mk
On Wed, Sep 18, 2019 at 10:13 AM Kyle Evans wrote: > > On Wed, Sep 18, 2019 at 10:04 AM Enji Cooper wrote: > > > > > > > On Sep 18, 2019, at 07:58, Kyle Evans wrote: > > > > > >> On Wed, Sep 18, 2019 at 9:46 AM Enji Cooper > > >> wrote: > > >> > > >> > > >>> On Sep 18, 2019, at 07:33, Enji Cooper wrote: > > >>> > > >>> > > > On Sep 18, 2019, at 05:40, Kyle Evans wrote: > > > > > > On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper > > > wrote: > > > > > > > > >> On Sep 17, 2019, at 18:58, Kyle Evans wrote: > > >> > > >> Author: kevans > > >> Date: Wed Sep 18 01:58:56 2019 > > >> New Revision: 352465 > > >> URL: https://svnweb.freebsd.org/changeset/base/352465 > > >> > > >> Log: > > >> googletest: default-disable on all of MIPS for now > > >> > > >> Parts of the fusefs tests trigger a bug in current versions of llvm: > > >> IR > > >> representation of some routine for the MIPS targets is a function > > >> with a > > >> large number of arguments. This then leads the compiler on an hour+ > > >> long > > >> goose chase, which is OK if you build the current tree but less-so > > >> if you're > > >> trying external toolchain or doing a universe build involving mips > > >> when it > > >> eventually gets switched over to LLVM. > > >> > > >> Better, accurate details can be found in LLVM PR43263. > > > > > > Uh... why not do this in tests/sys/... instead? > > > > Because there's still value in being able to easily enable these for > > building/running the complete set of tests through standard build > > infrastructure, but it's not worth adding a knob specifically for the > > fusefs tests. I also prefer the communication of it being an > > off-by-default option and easily deduced from src.conf(5) that this > > part of the build is default-disabled on mips/mips. > > >>> > > >>> Let me rephrase things a bit: is googlemock broken for all of mips, or > > >>> is it just the tests? If the latter, the tests should be blacklisted > > >>> for mips with a justification. If the former, I agree your method of > > >>> dealing with the situation is ok, but more investigation needs to be > > >>> done to see whether or not the port (in general) is broken and mark it > > >>> broken if need be. > > >> > > >> It looks like the latter case, based on the PR, and it’s a build > > >> performance issue... Is this impacting CI pipelines? > > >> > > > > > > It is the latter, and I do not want to *blacklist* them because as far > > > as I can tell, the tests aren't necessarily broken. I want to > > > workaround them for default by now. > > > > > >>> The problem with src.opts.mk’s per-architecture options, is that it can > > >>> be very heavy handed enabling/disabling features. I’m not sure that > > >>> everything in there warrants disabling at that level. > > >> > > >> My investigation suggests that the course of action was overly heavy > > >> handed. While I’m not asking for a revert, it would be really nice if > > >> whole features weren’t disabled, unless there’s an issue with the > > >> feature. > > >> > > > > > > We do not have a lighter method for dealing with this that I can tell, > > > because as I said above: I do not want to blacklist them or completely > > > kill them off. I still want the option to build and test them, but as > > > I aim to switch mips over to llvm I do not want to subject CI and the > > > rest of the world to an extra 1.5+ hour build time for this during > > > tinderbox runs. > > > > > > Given that it's mips, so already tier-high, and I'm one of few people > > > that care about it (and I only care about it for the time being), I > > > intend to leave it as-is since it's still a default in the rest of the > > > world. > > > > Ok, valid straw man argument: in this particular case, should llvm / c++ > > support be disabled instead, since it’s the real underlying issue? I’m > > guessing (non-ancient) g++ doesn’t have this issue. > > > > Again, disabling a framework because of a single issue in the tests doesn’t > > make sense. Unless you have proof that the build times for all of > > googletest/googlemock with llvm is an issue, this seems like the wrong > > remediation to perform. > > > > -Enji > > > > PS A heads up to asomers and myself would have been nice. I don’t like > > post-commit nitpicking, since the issue could have been discussed/reviewed > > before commit. > > If this was any less than a temporary workaround that will get > reverted in due time, I would sympathize with your argument > completely. I had no intention of wasting your time or asomers' time > with this tier-2 problem that had already been diagnosed as an > LLVM/mips bug. > > The unfortunate reality is that no one (including CI) is running tests > on FreeBSD/mips, and no one will feel the fallout of this decision. Sorry, this was supposed to read: "this
Re: svn commit: r352465 - head/share/mk
On Wed, Sep 18, 2019 at 10:04 AM Enji Cooper wrote: > > > > On Sep 18, 2019, at 07:58, Kyle Evans wrote: > > > >> On Wed, Sep 18, 2019 at 9:46 AM Enji Cooper wrote: > >> > >> > >>> On Sep 18, 2019, at 07:33, Enji Cooper wrote: > >>> > >>> > > On Sep 18, 2019, at 05:40, Kyle Evans wrote: > > > > On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper > > wrote: > > > > > >> On Sep 17, 2019, at 18:58, Kyle Evans wrote: > >> > >> Author: kevans > >> Date: Wed Sep 18 01:58:56 2019 > >> New Revision: 352465 > >> URL: https://svnweb.freebsd.org/changeset/base/352465 > >> > >> Log: > >> googletest: default-disable on all of MIPS for now > >> > >> Parts of the fusefs tests trigger a bug in current versions of llvm: IR > >> representation of some routine for the MIPS targets is a function with > >> a > >> large number of arguments. This then leads the compiler on an hour+ > >> long > >> goose chase, which is OK if you build the current tree but less-so if > >> you're > >> trying external toolchain or doing a universe build involving mips > >> when it > >> eventually gets switched over to LLVM. > >> > >> Better, accurate details can be found in LLVM PR43263. > > > > Uh... why not do this in tests/sys/... instead? > > Because there's still value in being able to easily enable these for > building/running the complete set of tests through standard build > infrastructure, but it's not worth adding a knob specifically for the > fusefs tests. I also prefer the communication of it being an > off-by-default option and easily deduced from src.conf(5) that this > part of the build is default-disabled on mips/mips. > >>> > >>> Let me rephrase things a bit: is googlemock broken for all of mips, or is > >>> it just the tests? If the latter, the tests should be blacklisted for > >>> mips with a justification. If the former, I agree your method of dealing > >>> with the situation is ok, but more investigation needs to be done to see > >>> whether or not the port (in general) is broken and mark it broken if need > >>> be. > >> > >> It looks like the latter case, based on the PR, and it’s a build > >> performance issue... Is this impacting CI pipelines? > >> > > > > It is the latter, and I do not want to *blacklist* them because as far > > as I can tell, the tests aren't necessarily broken. I want to > > workaround them for default by now. > > > >>> The problem with src.opts.mk’s per-architecture options, is that it can > >>> be very heavy handed enabling/disabling features. I’m not sure that > >>> everything in there warrants disabling at that level. > >> > >> My investigation suggests that the course of action was overly heavy > >> handed. While I’m not asking for a revert, it would be really nice if > >> whole features weren’t disabled, unless there’s an issue with the feature. > >> > > > > We do not have a lighter method for dealing with this that I can tell, > > because as I said above: I do not want to blacklist them or completely > > kill them off. I still want the option to build and test them, but as > > I aim to switch mips over to llvm I do not want to subject CI and the > > rest of the world to an extra 1.5+ hour build time for this during > > tinderbox runs. > > > > Given that it's mips, so already tier-high, and I'm one of few people > > that care about it (and I only care about it for the time being), I > > intend to leave it as-is since it's still a default in the rest of the > > world. > > Ok, valid straw man argument: in this particular case, should llvm / c++ > support be disabled instead, since it’s the real underlying issue? I’m > guessing (non-ancient) g++ doesn’t have this issue. > > Again, disabling a framework because of a single issue in the tests doesn’t > make sense. Unless you have proof that the build times for all of > googletest/googlemock with llvm is an issue, this seems like the wrong > remediation to perform. > > -Enji > > PS A heads up to asomers and myself would have been nice. I don’t like > post-commit nitpicking, since the issue could have been discussed/reviewed > before commit. If this was any less than a temporary workaround that will get reverted in due time, I would sympathize with your argument completely. I had no intention of wasting your time or asomers' time with this tier-2 problem that had already been diagnosed as an LLVM/mips bug. The unfortunate reality is that no one (including CI) is running tests on FreeBSD/mips, and no one will feel the fallout of this decision. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352465 - head/share/mk
> On Sep 18, 2019, at 07:58, Kyle Evans wrote: > >> On Wed, Sep 18, 2019 at 9:46 AM Enji Cooper wrote: >> >> >>> On Sep 18, 2019, at 07:33, Enji Cooper wrote: >>> >>> > On Sep 18, 2019, at 05:40, Kyle Evans wrote: > > On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper wrote: > > >> On Sep 17, 2019, at 18:58, Kyle Evans wrote: >> >> Author: kevans >> Date: Wed Sep 18 01:58:56 2019 >> New Revision: 352465 >> URL: https://svnweb.freebsd.org/changeset/base/352465 >> >> Log: >> googletest: default-disable on all of MIPS for now >> >> Parts of the fusefs tests trigger a bug in current versions of llvm: IR >> representation of some routine for the MIPS targets is a function with a >> large number of arguments. This then leads the compiler on an hour+ long >> goose chase, which is OK if you build the current tree but less-so if >> you're >> trying external toolchain or doing a universe build involving mips when >> it >> eventually gets switched over to LLVM. >> >> Better, accurate details can be found in LLVM PR43263. > > Uh... why not do this in tests/sys/... instead? Because there's still value in being able to easily enable these for building/running the complete set of tests through standard build infrastructure, but it's not worth adding a knob specifically for the fusefs tests. I also prefer the communication of it being an off-by-default option and easily deduced from src.conf(5) that this part of the build is default-disabled on mips/mips. >>> >>> Let me rephrase things a bit: is googlemock broken for all of mips, or is >>> it just the tests? If the latter, the tests should be blacklisted for mips >>> with a justification. If the former, I agree your method of dealing with >>> the situation is ok, but more investigation needs to be done to see whether >>> or not the port (in general) is broken and mark it broken if need be. >> >> It looks like the latter case, based on the PR, and it’s a build performance >> issue... Is this impacting CI pipelines? >> > > It is the latter, and I do not want to *blacklist* them because as far > as I can tell, the tests aren't necessarily broken. I want to > workaround them for default by now. > >>> The problem with src.opts.mk’s per-architecture options, is that it can be >>> very heavy handed enabling/disabling features. I’m not sure that everything >>> in there warrants disabling at that level. >> >> My investigation suggests that the course of action was overly heavy handed. >> While I’m not asking for a revert, it would be really nice if whole features >> weren’t disabled, unless there’s an issue with the feature. >> > > We do not have a lighter method for dealing with this that I can tell, > because as I said above: I do not want to blacklist them or completely > kill them off. I still want the option to build and test them, but as > I aim to switch mips over to llvm I do not want to subject CI and the > rest of the world to an extra 1.5+ hour build time for this during > tinderbox runs. > > Given that it's mips, so already tier-high, and I'm one of few people > that care about it (and I only care about it for the time being), I > intend to leave it as-is since it's still a default in the rest of the > world. Ok, valid straw man argument: in this particular case, should llvm / c++ support be disabled instead, since it’s the real underlying issue? I’m guessing (non-ancient) g++ doesn’t have this issue. Again, disabling a framework because of a single issue in the tests doesn’t make sense. Unless you have proof that the build times for all of googletest/googlemock with llvm is an issue, this seems like the wrong remediation to perform. -Enji PS A heads up to asomers and myself would have been nice. I don’t like post-commit nitpicking, since the issue could have been discussed/reviewed before commit. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352465 - head/share/mk
On Wed, Sep 18, 2019 at 9:46 AM Enji Cooper wrote: > > > > On Sep 18, 2019, at 07:33, Enji Cooper wrote: > > > > > >>> On Sep 18, 2019, at 05:40, Kyle Evans wrote: > >>> > >>> On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper wrote: > >>> > >>> > On Sep 17, 2019, at 18:58, Kyle Evans wrote: > > Author: kevans > Date: Wed Sep 18 01:58:56 2019 > New Revision: 352465 > URL: https://svnweb.freebsd.org/changeset/base/352465 > > Log: > googletest: default-disable on all of MIPS for now > > Parts of the fusefs tests trigger a bug in current versions of llvm: IR > representation of some routine for the MIPS targets is a function with a > large number of arguments. This then leads the compiler on an hour+ long > goose chase, which is OK if you build the current tree but less-so if > you're > trying external toolchain or doing a universe build involving mips when > it > eventually gets switched over to LLVM. > > Better, accurate details can be found in LLVM PR43263. > >>> > >>> Uh... why not do this in tests/sys/... instead? > >> > >> Because there's still value in being able to easily enable these for > >> building/running the complete set of tests through standard build > >> infrastructure, but it's not worth adding a knob specifically for the > >> fusefs tests. I also prefer the communication of it being an > >> off-by-default option and easily deduced from src.conf(5) that this > >> part of the build is default-disabled on mips/mips. > > > > Let me rephrase things a bit: is googlemock broken for all of mips, or is > > it just the tests? If the latter, the tests should be blacklisted for mips > > with a justification. If the former, I agree your method of dealing with > > the situation is ok, but more investigation needs to be done to see whether > > or not the port (in general) is broken and mark it broken if need be. > > It looks like the latter case, based on the PR, and it’s a build performance > issue... Is this impacting CI pipelines? > It is the latter, and I do not want to *blacklist* them because as far as I can tell, the tests aren't necessarily broken. I want to workaround them for default by now. > > The problem with src.opts.mk’s per-architecture options, is that it can be > > very heavy handed enabling/disabling features. I’m not sure that everything > > in there warrants disabling at that level. > > My investigation suggests that the course of action was overly heavy handed. > While I’m not asking for a revert, it would be really nice if whole features > weren’t disabled, unless there’s an issue with the feature. > We do not have a lighter method for dealing with this that I can tell, because as I said above: I do not want to blacklist them or completely kill them off. I still want the option to build and test them, but as I aim to switch mips over to llvm I do not want to subject CI and the rest of the world to an extra 1.5+ hour build time for this during tinderbox runs. Given that it's mips, so already tier-high, and I'm one of few people that care about it (and I only care about it for the time being), I intend to leave it as-is since it's still a default in the rest of the world. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352465 - head/share/mk
> On Sep 18, 2019, at 06:53, Warner Losh wrote: > > > >> On Wed, Sep 18, 2019, 1:41 PM Kyle Evans wrote: >> On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper wrote: >> > >> > >> > > On Sep 17, 2019, at 18:58, Kyle Evans wrote: >> > > >> > > Author: kevans >> > > Date: Wed Sep 18 01:58:56 2019 >> > > New Revision: 352465 >> > > URL: https://svnweb.freebsd.org/changeset/base/352465 >> > > >> > > Log: >> > > googletest: default-disable on all of MIPS for now >> > > >> > > Parts of the fusefs tests trigger a bug in current versions of llvm: IR >> > > representation of some routine for the MIPS targets is a function with a >> > > large number of arguments. This then leads the compiler on an hour+ long >> > > goose chase, which is OK if you build the current tree but less-so if >> > > you're >> > > trying external toolchain or doing a universe build involving mips when >> > > it >> > > eventually gets switched over to LLVM. >> > > >> > > Better, accurate details can be found in LLVM PR43263. >> > >> > Uh... why not do this in tests/sys/... instead? >> >> Because there's still value in being able to easily enable these for >> building/running the complete set of tests through standard build >> infrastructure, but it's not worth adding a knob specifically for the >> fusefs tests. I also prefer the communication of it being an >> off-by-default option and easily deduced from src.conf(5) that this >> part of the build is default-disabled on mips/mips. > > > This is the right way to do this, imho... I disagree: disabling a framework and all tests dependent on it because of compile times for a single test suite is the wrong approach. I would complain more loudly (for instance), if MK_TESTS were disabled on mips, just because of a build or test issue with a single test. This change throws the baby out with the bath water. The only reason why I’m not asking for a revert is that mips is a tier 2 arch which I haven’t verified, and the bath tub that’s being emptied is small, as many folks haven’t written GoogleTest tests yet in the src tree. -Enji ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352465 - head/share/mk
> On Sep 18, 2019, at 07:33, Enji Cooper wrote: > > >>> On Sep 18, 2019, at 05:40, Kyle Evans wrote: >>> >>> On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper wrote: >>> >>> On Sep 17, 2019, at 18:58, Kyle Evans wrote: Author: kevans Date: Wed Sep 18 01:58:56 2019 New Revision: 352465 URL: https://svnweb.freebsd.org/changeset/base/352465 Log: googletest: default-disable on all of MIPS for now Parts of the fusefs tests trigger a bug in current versions of llvm: IR representation of some routine for the MIPS targets is a function with a large number of arguments. This then leads the compiler on an hour+ long goose chase, which is OK if you build the current tree but less-so if you're trying external toolchain or doing a universe build involving mips when it eventually gets switched over to LLVM. Better, accurate details can be found in LLVM PR43263. >>> >>> Uh... why not do this in tests/sys/... instead? >> >> Because there's still value in being able to easily enable these for >> building/running the complete set of tests through standard build >> infrastructure, but it's not worth adding a knob specifically for the >> fusefs tests. I also prefer the communication of it being an >> off-by-default option and easily deduced from src.conf(5) that this >> part of the build is default-disabled on mips/mips. > > Let me rephrase things a bit: is googlemock broken for all of mips, or is it > just the tests? If the latter, the tests should be blacklisted for mips with > a justification. If the former, I agree your method of dealing with the > situation is ok, but more investigation needs to be done to see whether or > not the port (in general) is broken and mark it broken if need be. It looks like the latter case, based on the PR, and it’s a build performance issue... Is this impacting CI pipelines? > The problem with src.opts.mk’s per-architecture options, is that it can be > very heavy handed enabling/disabling features. I’m not sure that everything > in there warrants disabling at that level. My investigation suggests that the course of action was overly heavy handed. While I’m not asking for a revert, it would be really nice if whole features weren’t disabled, unless there’s an issue with the feature. Thank you, -Enji ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352465 - head/share/mk
> On Sep 18, 2019, at 05:40, Kyle Evans wrote: > >> On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper wrote: >> >> >>> On Sep 17, 2019, at 18:58, Kyle Evans wrote: >>> >>> Author: kevans >>> Date: Wed Sep 18 01:58:56 2019 >>> New Revision: 352465 >>> URL: https://svnweb.freebsd.org/changeset/base/352465 >>> >>> Log: >>> googletest: default-disable on all of MIPS for now >>> >>> Parts of the fusefs tests trigger a bug in current versions of llvm: IR >>> representation of some routine for the MIPS targets is a function with a >>> large number of arguments. This then leads the compiler on an hour+ long >>> goose chase, which is OK if you build the current tree but less-so if you're >>> trying external toolchain or doing a universe build involving mips when it >>> eventually gets switched over to LLVM. >>> >>> Better, accurate details can be found in LLVM PR43263. >> >> Uh... why not do this in tests/sys/... instead? > > Because there's still value in being able to easily enable these for > building/running the complete set of tests through standard build > infrastructure, but it's not worth adding a knob specifically for the > fusefs tests. I also prefer the communication of it being an > off-by-default option and easily deduced from src.conf(5) that this > part of the build is default-disabled on mips/mips. Let me rephrase things a bit: is googlemock broken for all of mips, or is it just the tests? If the latter, the tests should be blacklisted for mips with a justification. If the former, I agree your method of dealing with the situation is ok, but more investigation needs to be done to see whether or not the port (in general) is broken and mark it broken if need be. The problem with src.opts.mk’s per-architecture options, is that it can be very heavy handed enabling/disabling features. I’m not sure that everything in there warrants disabling at that level. Thanks, -Enji ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352465 - head/share/mk
On Wed, Sep 18, 2019, 1:41 PM Kyle Evans wrote: > On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper wrote: > > > > > > > On Sep 17, 2019, at 18:58, Kyle Evans wrote: > > > > > > Author: kevans > > > Date: Wed Sep 18 01:58:56 2019 > > > New Revision: 352465 > > > URL: https://svnweb.freebsd.org/changeset/base/352465 > > > > > > Log: > > > googletest: default-disable on all of MIPS for now > > > > > > Parts of the fusefs tests trigger a bug in current versions of llvm: > IR > > > representation of some routine for the MIPS targets is a function > with a > > > large number of arguments. This then leads the compiler on an hour+ > long > > > goose chase, which is OK if you build the current tree but less-so if > you're > > > trying external toolchain or doing a universe build involving mips > when it > > > eventually gets switched over to LLVM. > > > > > > Better, accurate details can be found in LLVM PR43263. > > > > Uh... why not do this in tests/sys/... instead? > > Because there's still value in being able to easily enable these for > building/running the complete set of tests through standard build > infrastructure, but it's not worth adding a knob specifically for the > fusefs tests. I also prefer the communication of it being an > off-by-default option and easily deduced from src.conf(5) that this > part of the build is default-disabled on mips/mips. > This is the right way to do this, imho... Warner > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352465 - head/share/mk
On Wed, Sep 18, 2019 at 7:34 AM Enji Cooper wrote: > > > > On Sep 17, 2019, at 18:58, Kyle Evans wrote: > > > > Author: kevans > > Date: Wed Sep 18 01:58:56 2019 > > New Revision: 352465 > > URL: https://svnweb.freebsd.org/changeset/base/352465 > > > > Log: > > googletest: default-disable on all of MIPS for now > > > > Parts of the fusefs tests trigger a bug in current versions of llvm: IR > > representation of some routine for the MIPS targets is a function with a > > large number of arguments. This then leads the compiler on an hour+ long > > goose chase, which is OK if you build the current tree but less-so if > > you're > > trying external toolchain or doing a universe build involving mips when it > > eventually gets switched over to LLVM. > > > > Better, accurate details can be found in LLVM PR43263. > > Uh... why not do this in tests/sys/... instead? Because there's still value in being able to easily enable these for building/running the complete set of tests through standard build infrastructure, but it's not worth adding a knob specifically for the fusefs tests. I also prefer the communication of it being an off-by-default option and easily deduced from src.conf(5) that this part of the build is default-disabled on mips/mips. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352465 - head/share/mk
> On Sep 17, 2019, at 18:58, Kyle Evans wrote: > > Author: kevans > Date: Wed Sep 18 01:58:56 2019 > New Revision: 352465 > URL: https://svnweb.freebsd.org/changeset/base/352465 > > Log: > googletest: default-disable on all of MIPS for now > > Parts of the fusefs tests trigger a bug in current versions of llvm: IR > representation of some routine for the MIPS targets is a function with a > large number of arguments. This then leads the compiler on an hour+ long > goose chase, which is OK if you build the current tree but less-so if you're > trying external toolchain or doing a universe build involving mips when it > eventually gets switched over to LLVM. > > Better, accurate details can be found in LLVM PR43263. Uh... why not do this in tests/sys/... instead? -Enji ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352451 - head/stand/libsa
On Wed, Sep 18, 2019, 9:44 AM Hans Petter Selasky wrote: > On 2019-09-18 10:37, Warner Losh wrote: > > On Wed, Sep 18, 2019, 12:18 AM Conrad Meyer wrote: > > > >> Well, hang on; it's also perfectly legal for a malloc implementation > >> to return NULL for requests of zero bytes. You can access exactly the > >> number of bytes requested in the allocation; and free(NULL) works as > >> expected. NULL (0) is also aligned to any size you could want. > >> > > > > Legal, yes. But it is different than all the other FreeBSD environments, > > so the loader becomes the odd man out. This restores the consistency. > > > > Hi, > > The problem is the code that use malloc() that take NULL as a failure, > even if the size is zero :-) > > array = malloc(n * sizeof(q)); > if (array == NULL) > goto failure; > Such code isn't portable... Warner --HPS > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352451 - head/stand/libsa
On 2019-09-18 10:37, Warner Losh wrote: On Wed, Sep 18, 2019, 12:18 AM Conrad Meyer wrote: Well, hang on; it's also perfectly legal for a malloc implementation to return NULL for requests of zero bytes. You can access exactly the number of bytes requested in the allocation; and free(NULL) works as expected. NULL (0) is also aligned to any size you could want. Legal, yes. But it is different than all the other FreeBSD environments, so the loader becomes the odd man out. This restores the consistency. Hi, The problem is the code that use malloc() that take NULL as a failure, even if the size is zero :-) array = malloc(n * sizeof(q)); if (array == NULL) goto failure; --HPS ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r352451 - head/stand/libsa
On Wed, Sep 18, 2019, 12:18 AM Conrad Meyer wrote: > Well, hang on; it's also perfectly legal for a malloc implementation > to return NULL for requests of zero bytes. You can access exactly the > number of bytes requested in the allocation; and free(NULL) works as > expected. NULL (0) is also aligned to any size you could want. > Legal, yes. But it is different than all the other FreeBSD environments, so the loader becomes the odd man out. This restores the consistency. Warner Best, > Conrad > > On Tue, Sep 17, 2019 at 9:16 AM Toomas Soome wrote: > > > > Author: tsoome > > Date: Tue Sep 17 16:16:46 2019 > > New Revision: 352451 > > URL: https://svnweb.freebsd.org/changeset/base/352451 > > > > Log: > > loader: revert r352421 > > > > As insisted by kib, malloc(0) is quite legal. > > > > Modified: > > head/stand/libsa/zalloc_malloc.c > > > > Modified: head/stand/libsa/zalloc_malloc.c > > > == > > --- head/stand/libsa/zalloc_malloc.cTue Sep 17 15:53:40 2019 > (r352450) > > +++ head/stand/libsa/zalloc_malloc.cTue Sep 17 16:16:46 2019 > (r352451) > > @@ -73,9 +73,6 @@ Malloc_align(size_t bytes, size_t alignment) > > { > > Guard *res; > > > > - if (bytes == 0) > > - return (NULL); > > - > > #ifdef USEENDGUARD > > bytes += MALLOCALIGN + 1; > > #else > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r352483 - head/share/mk
Author: bapt Date: Wed Sep 18 08:02:03 2019 New Revision: 352483 URL: https://svnweb.freebsd.org/changeset/base/352483 Log: Add the missing bits for LIBADD to properly function now that libarchive is linked to libzstd Pointy hat: bapt Reported by: antoine Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Sep 18 07:57:56 2019 (r352482) +++ head/share/mk/src.libnames.mk Wed Sep 18 08:02:03 2019 (r352483) @@ -230,7 +230,7 @@ LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec${PIE_SUFFI # Each library's LIBADD needs to be duplicated here for static linkage of # 2nd+ order consumers. Auto-generating this would be better. _DP_80211= sbuf bsdxml -_DP_archive= z bz2 lzma bsdxml +_DP_archive= z bz2 lzma bsdxml zstd _DP_zstd= pthread .if ${MK_BLACKLIST} != "no" _DP_blacklist+=pthread ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r352482 - in head: . lib lib/libarchive
Author: bapt Date: Wed Sep 18 07:57:56 2019 New Revision: 352482 URL: https://svnweb.freebsd.org/changeset/base/352482 Log: Add native support for zstd to libarchive Note that old pkg will failed to build after this. A recent ports tree (one providing pkg 1.12+) is required to build. Older already built pkg, should continue working as expected PR: 238797 Exp run by: antoine Reviewed by: cem Approved by: cem Differential Revision:https://reviews.freebsd.org/D20752 Modified: head/Makefile.inc1 head/lib/Makefile head/lib/libarchive/Makefile Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Sep 18 07:32:15 2019(r352481) +++ head/Makefile.inc1 Wed Sep 18 07:57:56 2019(r352482) @@ -2770,6 +2770,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ lib/libfigpar \ ${_lib_libgssapi} \ lib/libkiconv lib/libkvm lib/liblzma lib/libmd lib/libnv \ + lib/libzstd \ ${_lib_casper} \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam/libpam ${_lib_libthr} \ Modified: head/lib/Makefile == --- head/lib/Makefile Wed Sep 18 07:32:15 2019(r352481) +++ head/lib/Makefile Wed Sep 18 07:57:56 2019(r352482) @@ -102,7 +102,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ # libraries, those libraries should be listed as build order dependencies here. SUBDIR_DEPEND_geom=libufs -SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd +SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd SUBDIR_DEPEND_libauditdm= libbsm SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} SUBDIR_DEPEND_libc++:= libcxxrt Modified: head/lib/libarchive/Makefile == --- head/lib/libarchive/MakefileWed Sep 18 07:32:15 2019 (r352481) +++ head/lib/libarchive/MakefileWed Sep 18 07:57:56 2019 (r352482) @@ -6,8 +6,8 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive LIB= archive -LIBADD=z bz2 lzma bsdxml -CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 +LIBADD=z bz2 lzma bsdxml zstd +CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number. @@ -15,6 +15,7 @@ SHLIB_MAJOR= 7 CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" CFLAGS+= -I${.OBJDIR} +CFLAGS+= -I${SRCTOP}/sys/contrib/zstd/lib .if ${MK_OPENSSL} != "no" CFLAGS+= -DWITH_OPENSSL ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"