Date: Mon, 21 Mar 2016 05:47:59 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r297135 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common Message-ID: <201603210547.u2L5lxor037141@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Mar 21 05:47:59 2016 New Revision: 297135 URL: https://svnweb.freebsd.org/changeset/base/297135 Log: Revert r297130: Revert to unbreak the build. No idea how this broke the build in libstand but it was the only change so revert to appease jenkins. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c Directory Properties: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Mon Mar 21 03:39:38 2016 (r297134) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Mon Mar 21 05:47:59 2016 (r297135) @@ -23,10 +23,6 @@ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ -/* - * Portions Copyright 2016 Pedro Giffuni. All rights reserved. - */ - #include <sys/types.h> #if defined(sun) #include <sys/modctl.h> @@ -614,14 +610,17 @@ dt_module_load(dtrace_hdl_t *dtp, dt_mod dmp->dm_nsymbuckets = _dtrace_strbuckets; dmp->dm_symfree = 1; /* first free element is index 1 */ - dmp->dm_symbuckets = calloc(dmp->dm_nsymbuckets, sizeof (uint_t)); - dmp->dm_symchains = calloc(dmp->dm_nsymelems + 1, sizeof (dt_sym_t)); + dmp->dm_symbuckets = malloc(sizeof (uint_t) * dmp->dm_nsymbuckets); + dmp->dm_symchains = malloc(sizeof (dt_sym_t) * dmp->dm_nsymelems + 1); if (dmp->dm_symbuckets == NULL || dmp->dm_symchains == NULL) { dt_module_unload(dtp, dmp); return (dt_set_errno(dtp, EDT_NOMEM)); } + bzero(dmp->dm_symbuckets, sizeof (uint_t) * dmp->dm_nsymbuckets); + bzero(dmp->dm_symchains, sizeof (dt_sym_t) * dmp->dm_nsymelems + 1); + /* * Iterate over the symbol table data buffer and insert each symbol * name into the name hash if the name and type are valid. Then Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.c Mon Mar 21 03:39:38 2016 (r297134) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.c Mon Mar 21 05:47:59 2016 (r297135) @@ -27,7 +27,6 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. - * Copyright (c) 2016 Pedro Giffuni. All rights reserved. */ #include <sys/types.h> @@ -48,15 +47,15 @@ dt_regset_create(ulong_t nregs) if (drp == NULL) return (NULL); - drp->dr_bitmap = calloc(n, sizeof (ulong_t)); + drp->dr_bitmap = malloc(sizeof (ulong_t) * n); + drp->dr_size = nregs; if (drp->dr_bitmap == NULL) { dt_regset_destroy(drp); return (NULL); } - drp->dr_size = nregs; - + bzero(drp->dr_bitmap, sizeof (ulong_t) * n); return (drp); } Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c Mon Mar 21 03:39:38 2016 (r297134) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c Mon Mar 21 05:47:59 2016 (r297135) @@ -24,10 +24,6 @@ * Use is subject to license terms. */ -/* - * Portions Copyright 2016 Pedro Giffuni. All rights reserved. - */ - #pragma ident "%Z%%M% %I% %E% SMI" #include <sys/types.h> @@ -74,11 +70,12 @@ dt_strtab_create(size_t bufsz) return (NULL); bzero(sp, sizeof (dt_strtab_t)); - sp->str_hash = calloc(nbuckets, sizeof (dt_strhash_t *)); + sp->str_hash = malloc(nbuckets * sizeof (dt_strhash_t *)); if (sp->str_hash == NULL) goto err; + bzero(sp->str_hash, nbuckets * sizeof (dt_strhash_t *)); sp->str_hashsz = nbuckets; sp->str_bufs = NULL; sp->str_ptr = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603210547.u2L5lxor037141>