Print this page
4229 mdb hangs on exit when long umem cache names exist
Reviewed by: Robert Mustacchi <rm@joyent.com>

*** 21,44 **** */ /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _MDB_NV_H #define _MDB_NV_H - #pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #ifdef __cplusplus extern "C" { #endif #ifdef _MDB #define MDB_NV_NAMELEN 31 /* Max variable name length including null */ /* * These flags are stored inside each variable in v_flags: */ --- 21,50 ---- */ /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ + /* + * Copyright (c) 2013 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> + */ #ifndef _MDB_NV_H #define _MDB_NV_H #include <sys/types.h> #ifdef __cplusplus extern "C" { #endif #ifdef _MDB + /* + * There used to be a cap (MDB_NV_NAMELEN bytes including null) on the + * length of variable names stored in-line. This cap is no longer there, + * however parts of mdb use the constant to sanitize input. + */ #define MDB_NV_NAMELEN 31 /* Max variable name length including null */ /* * These flags are stored inside each variable in v_flags: */
*** 72,83 **** * Each variable is defined by the following variable-length structure. * The debugger uses name/value collections to hash almost everything, so * we make a few simple space optimizations: * * A variable's name can be a pointer to external storage (v_ename and ! * MDB_NV_EXTNAME set), or it can be stored locally (MDB_NV_NAMELEN - 1 ! * bytes of storage are allocated immediately after v_lname[0]). * * A variable may have multiple definitions (v_ndef chain), but this feature * is mutually exclusive with MDB_NV_EXTNAME in order to save space. */ typedef struct mdb_var { --- 78,89 ---- * Each variable is defined by the following variable-length structure. * The debugger uses name/value collections to hash almost everything, so * we make a few simple space optimizations: * * A variable's name can be a pointer to external storage (v_ename and ! * MDB_NV_EXTNAME set), or it can be stored locally (bytes of storage are ! * allocated immediately after v_lname[0]). * * A variable may have multiple definitions (v_ndef chain), but this feature * is mutually exclusive with MDB_NV_EXTNAME in order to save space. */ typedef struct mdb_var {