From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 22 00:45:13 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AE72415; Sun, 22 Dec 2013 00:45:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 22EBA1FAD; Sun, 22 Dec 2013 00:45:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBM0jDqr088664; Sun, 22 Dec 2013 00:45:13 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBM0j86D088640; Sun, 22 Dec 2013 00:45:08 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312220045.rBM0j86D088640@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 22 Dec 2013 00:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259705 - in stable/9/contrib: binutils/binutils gcc gcc/cp gcc/doc gcclibs/libiberty gcclibs/libiberty/testsuite libstdc++/include/bits libstdc++/include/ext libstdc++/libsupc++ libstd... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 00:45:13 -0000 Author: pfg Date: Sun Dec 22 00:45:08 2013 New Revision: 259705 URL: http://svnweb.freebsd.org/changeset/base/259705 Log: MFC r258017, r258429, r258748, r258817: Merge updates from FSF pre4.3 GCC inspired on Apple's gcc: Updates to libiberty and mangling. New align attribute. Merge Apple updates to libstdc++. Added: stable/9/contrib/gcclibs/libiberty/ChangeLog.gcc43 - copied unchanged from r258817, head/contrib/gcclibs/libiberty/ChangeLog.gcc43 Modified: stable/9/contrib/binutils/binutils/cxxfilt.c stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/builtins.c stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-decl.c stable/9/contrib/gcc/cp/decl.c stable/9/contrib/gcc/cp/mangle.c stable/9/contrib/gcc/cp/typeck.c stable/9/contrib/gcc/doc/extend.texi stable/9/contrib/gcc/flags.h stable/9/contrib/gcc/print-tree.c stable/9/contrib/gcc/toplev.c stable/9/contrib/gcc/tree.c stable/9/contrib/gcc/tree.h stable/9/contrib/gcc/varasm.c stable/9/contrib/gcclibs/libiberty/choose-temp.c stable/9/contrib/gcclibs/libiberty/cp-demangle.c stable/9/contrib/gcclibs/libiberty/cp-demangle.h stable/9/contrib/gcclibs/libiberty/floatformat.c stable/9/contrib/gcclibs/libiberty/functions.texi stable/9/contrib/gcclibs/libiberty/pex-unix.c stable/9/contrib/gcclibs/libiberty/strsignal.c stable/9/contrib/gcclibs/libiberty/testsuite/demangle-expected stable/9/contrib/gcclibs/libiberty/testsuite/test-demangle.c stable/9/contrib/libstdc++/include/bits/basic_string.h stable/9/contrib/libstdc++/include/bits/basic_string.tcc stable/9/contrib/libstdc++/include/bits/stl_algobase.h stable/9/contrib/libstdc++/include/bits/stl_tree.h stable/9/contrib/libstdc++/include/bits/stl_vector.h stable/9/contrib/libstdc++/include/ext/mt_allocator.h stable/9/contrib/libstdc++/include/ext/throw_allocator.h stable/9/contrib/libstdc++/libsupc++/eh_alloc.cc stable/9/contrib/libstdc++/src/mt_allocator.cc Directory Properties: stable/9/ (props changed) stable/9/contrib/binutils/ (props changed) stable/9/contrib/gcc/ (props changed) stable/9/contrib/gcclibs/ (props changed) stable/9/contrib/libstdc++/ (props changed) Modified: stable/9/contrib/binutils/binutils/cxxfilt.c ============================================================================== --- stable/9/contrib/binutils/binutils/cxxfilt.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/binutils/binutils/cxxfilt.c Sun Dec 22 00:45:08 2013 (r259705) @@ -63,12 +63,12 @@ demangle_it (char *mangled_name) result = cplus_demangle (mangled_name + skip_first, flags); if (result == NULL) - printf (mangled_name); + printf ("%s",mangled_name); else { if (mangled_name[0] == '.') putchar ('.'); - printf (result); + printf ("%s",result); free (result); } } Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Sun Dec 22 00:45:08 2013 (r259705) @@ -4,6 +4,47 @@ * config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New. * config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New. +2007-07-12 Geoffrey Keating (r126588) + + * builtins.c (get_pointer_alignment): Honor DECL_ALIGN on a + FUNCTION_DECL. + * tree.c (build_decl_stat): Move code from here... + (make_node_stat): ... to here. Don't uselessly clear DECL_USER_ALIGN. + (expr_align): Honor DECL_ALIGN on a FUNCTION_DECL. Add comment + about using DECL_ALIGN of LABEL_DECL and CONST_DECL. + * tree.h (DECL_USER_ALIGN): Fix misplaced comment. + * varasm.c (assemble_start_function): Use DECL_ALIGN instead of + FUNCTION_BOUNDARY. + +2007-07-09 Geoffrey Keating (r126529) + + PR 32617 + * c-common.c (c_alignof_expr): Look at DECL_ALIGN of + FUNCTION_DECLs. + (handle_aligned_attribute): Allow use on FUNCTION_DECLs. + * varasm.c (assemble_start_function): Honor DECL_ALIGN + for FUNCTION_DECLs. Don't use align_functions_log if + DECL_USER_ALIGN. + * print-tree.c (print_node): Print DECL_ALIGN and DECL_USER_ALIGN + even for FUNCTION_DECLs. + * c-decl.c (merge_decls): Propagate DECL_ALIGN even for + FUNCTION_DECLs. + * tree.h (DECL_ALIGN): Update for new location of 'align'. + (DECL_FUNCTION_CODE): Update for new location and name of + 'function_code'. + (DECL_OFFSET_ALIGN): Update for new location of 'off_align'. + (struct tree_decl_common): Move 'align' and 'off_align' out + of union, ensure they're still on a 32-bit boundary. Remove + other fields in union 'u1'. + (struct tree_function_decl): Add field 'function_code' replacing + 'u1.f' in tree_decl_common. + * tree.c (build_decl_stat): Set initial value of DECL_ALIGN. + * doc/extend.texi (Function Attributes): Add 'aligned' attribute. + (Variable Attributes): Cross-reference 'aligned' attribute + to Function Attributes. + * flags.h (force_align_functions_log): Delete. + * toplev.c (force_align_functions_log): Delete. + 2007-06-05 Joerg Wunsch (r125346) PR preprocessor/23479 @@ -48,7 +89,7 @@ alignment for amdfam10 architecture. Increasing the max loop alignment to 24 bytes. -2007-04-16 Lawrence Crowl +2007-04-16 Lawrence Crowl (r123909) * doc/invoke.texi (Debugging Options): Add documentation for the -femit-struct-debug options -femit-struct-debug-baseonly, @@ -121,7 +162,7 @@ * config/i386/i386.c (override_options): Likewise. * doc/invoke.texi: Likewise. -2007-03-12 Seongbae Park +2007-03-12 Seongbae Park (r122851) * c-decl.c (warn_variable_length_array): New function. Refactored from grokdeclarator to handle warn_vla @@ -322,7 +363,7 @@ * config.gcc: Support core2 processor. -2007-01-05 Manuel Lopez-Ibanez +2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 * tree.h (TREE_OVERFLOW_P): New. Modified: stable/9/contrib/gcc/builtins.c ============================================================================== --- stable/9/contrib/gcc/builtins.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/builtins.c Sun Dec 22 00:45:08 2013 (r259705) @@ -315,9 +315,7 @@ get_pointer_alignment (tree exp, unsigne else if (offset) inner = MIN (inner, BITS_PER_UNIT); } - if (TREE_CODE (exp) == FUNCTION_DECL) - align = FUNCTION_BOUNDARY; - else if (DECL_P (exp)) + if (DECL_P (exp)) align = MIN (inner, DECL_ALIGN (exp)); #ifdef CONSTANT_ALIGNMENT else if (CONSTANT_CLASS_P (exp)) Modified: stable/9/contrib/gcc/c-common.c ============================================================================== --- stable/9/contrib/gcc/c-common.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/c-common.c Sun Dec 22 00:45:08 2013 (r259705) @@ -2995,16 +2995,16 @@ c_sizeof_or_alignof_type (tree type, boo } /* Implement the __alignof keyword: Return the minimum required - alignment of EXPR, measured in bytes. For VAR_DECL's and - FIELD_DECL's return DECL_ALIGN (which can be set from an - "aligned" __attribute__ specification). */ + alignment of EXPR, measured in bytes. For VAR_DECLs, + FUNCTION_DECLs and FIELD_DECLs return DECL_ALIGN (which can be set + from an "aligned" __attribute__ specification). */ tree c_alignof_expr (tree expr) { tree t; - if (TREE_CODE (expr) == VAR_DECL) + if (VAR_OR_FUNCTION_DECL_P (expr)) t = size_int (DECL_ALIGN_UNIT (expr)); else if (TREE_CODE (expr) == COMPONENT_REF @@ -4809,12 +4809,24 @@ handle_aligned_attribute (tree *node, tr TYPE_ALIGN (*type) = (1 << i) * BITS_PER_UNIT; TYPE_USER_ALIGN (*type) = 1; } - else if (TREE_CODE (decl) != VAR_DECL + else if (! VAR_OR_FUNCTION_DECL_P (decl) && TREE_CODE (decl) != FIELD_DECL) { error ("alignment may not be specified for %q+D", decl); *no_add_attrs = true; } + else if (TREE_CODE (decl) == FUNCTION_DECL + && DECL_ALIGN (decl) > (1 << i) * BITS_PER_UNIT) + { + if (DECL_USER_ALIGN (decl)) + error ("alignment for %q+D was previously specified as %d " + "and may not be decreased", decl, + DECL_ALIGN (decl) / BITS_PER_UNIT); + else + error ("alignment for %q+D must be at least %d", decl, + DECL_ALIGN (decl) / BITS_PER_UNIT); + *no_add_attrs = true; + } else { DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT; Modified: stable/9/contrib/gcc/c-decl.c ============================================================================== --- stable/9/contrib/gcc/c-decl.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/c-decl.c Sun Dec 22 00:45:08 2013 (r259705) @@ -1690,12 +1690,11 @@ merge_decls (tree newdecl, tree olddecl, DECL_SIZE (newdecl) = DECL_SIZE (olddecl); DECL_SIZE_UNIT (newdecl) = DECL_SIZE_UNIT (olddecl); DECL_MODE (newdecl) = DECL_MODE (olddecl); - if (TREE_CODE (olddecl) != FUNCTION_DECL) - if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) - { - DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); - DECL_USER_ALIGN (newdecl) |= DECL_ALIGN (olddecl); - } + if (DECL_ALIGN (olddecl) > DECL_ALIGN (newdecl)) + { + DECL_ALIGN (newdecl) = DECL_ALIGN (olddecl); + DECL_USER_ALIGN (newdecl) |= DECL_ALIGN (olddecl); + } } Modified: stable/9/contrib/gcc/cp/decl.c ============================================================================== --- stable/9/contrib/gcc/cp/decl.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/cp/decl.c Sun Dec 22 00:45:08 2013 (r259705) @@ -3158,12 +3158,6 @@ cxx_init_decl_processing (void) if (flag_inline_functions) flag_inline_trees = 2; - /* Force minimum function alignment if using the least significant - bit of function pointers to store the virtual bit. */ - if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn - && force_align_functions_log < 1) - force_align_functions_log = 1; - /* Initially, C. */ current_lang_name = lang_name_c; @@ -6065,6 +6059,14 @@ grokfndecl (tree ctype, if (TYPE_VOLATILE (type)) TREE_THIS_VOLATILE (decl) = 1; + /* If pointers to member functions use the least significant bit to + indicate whether a function is virtual, ensure a pointer + to this function will have that bit clear. */ + if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn + && TREE_CODE (type) == METHOD_TYPE + && DECL_ALIGN (decl) < 2 * BITS_PER_UNIT) + DECL_ALIGN (decl) = 2 * BITS_PER_UNIT; + if (friendp && TREE_CODE (orig_declarator) == TEMPLATE_ID_EXPR) { Modified: stable/9/contrib/gcc/cp/mangle.c ============================================================================== --- stable/9/contrib/gcc/cp/mangle.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/cp/mangle.c Sun Dec 22 00:45:08 2013 (r259705) @@ -688,7 +688,8 @@ write_mangled_name (const tree decl, boo } } else if (TREE_CODE (decl) == VAR_DECL - /* The names of global variables aren't mangled. */ + /* The names of non-static global variables aren't mangled. */ + && DECL_EXTERNAL_LINKAGE_P (decl) && (CP_DECL_CONTEXT (decl) == global_namespace /* And neither are `extern "C"' variables. */ || DECL_EXTERN_C_P (decl))) @@ -1086,7 +1087,10 @@ write_template_prefix (const tree node) ::= ::= - ::= */ + ::= + ::= + + ::= L */ static void write_unqualified_name (const tree decl) @@ -1126,6 +1130,16 @@ write_unqualified_name (const tree decl) write_string (oni[DECL_OVERLOADED_OPERATOR_P (decl)].mangled_name); } + else if (VAR_OR_FUNCTION_DECL_P (decl) && ! TREE_PUBLIC (decl) + && DECL_NAMESPACE_SCOPE_P (decl) + && decl_linkage (decl) == lk_internal) + { + MANGLE_TRACE_TREE ("local-source-name", decl); + write_char ('L'); + write_source_name (DECL_NAME (decl)); + /* The default discriminator is 1, and that's all we ever use, + so there's no code to output one here. */ + } else write_source_name (DECL_NAME (decl)); } Modified: stable/9/contrib/gcc/cp/typeck.c ============================================================================== --- stable/9/contrib/gcc/cp/typeck.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/cp/typeck.c Sun Dec 22 00:45:08 2013 (r259705) @@ -1358,7 +1358,10 @@ cxx_alignof_expr (tree e) { pedwarn ("ISO C++ forbids applying %<__alignof%> to an expression of " "function type"); - t = size_one_node; + if (TREE_CODE (e) == FUNCTION_DECL) + t = size_int (DECL_ALIGN_UNIT (e)); + else + t = size_one_node; } else if (type_unknown_p (e)) { Modified: stable/9/contrib/gcc/doc/extend.texi ============================================================================== --- stable/9/contrib/gcc/doc/extend.texi Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/doc/extend.texi Sun Dec 22 00:45:08 2013 (r259705) @@ -1577,6 +1577,7 @@ The keyword @code{__attribute__} allows attributes when making a declaration. This keyword is followed by an attribute specification inside double parentheses. The following attributes are currently defined for functions on all targets: +@code{aligned}, @code{noreturn}, @code{returns_twice}, @code{noinline}, @code{always_inline}, @code{flatten}, @code{pure}, @code{const}, @code{nothrow}, @code{sentinel}, @code{format}, @code{format_arg}, @code{no_instrument_function}, @@ -1615,6 +1616,27 @@ is not defined in the same translation u Not all target machines support this attribute. +@item aligned (@var{alignment}) +@cindex @code{aligned} attribute +This attribute specifies a minimum alignment for the function, +measured in bytes. + +You cannot use this attribute to decrease the alignment of a function, +only to increase it. However, when you explicitly specify a function +alignment this will override the effect of the +@option{-falign-functions} (@pxref{Optimize Options}) option for this +function. + +Note that the effectiveness of @code{aligned} attributes may be +limited by inherent limitations in your linker. On many systems, the +linker is only able to arrange for functions to be aligned up to a +certain maximum alignment. (For some linkers, the maximum supported +alignment may be very very small.) See your linker documentation for +further information. + +The @code{aligned} attribute can also be used for variables and fields +(@pxref{Variable Attributes}.) + @item always_inline @cindex @code{always_inline} function attribute Generally, functions are not inlined unless optimization is specified. @@ -3044,6 +3066,9 @@ up to a maximum of 8 byte alignment, the in an @code{__attribute__} will still only provide you with 8 byte alignment. See your linker documentation for further information. +The @code{aligned} attribute can also be used for functions +(@pxref{Function Attributes}.) + @item cleanup (@var{cleanup_function}) @cindex @code{cleanup} attribute The @code{cleanup} attribute runs a function when the variable goes Modified: stable/9/contrib/gcc/flags.h ============================================================================== --- stable/9/contrib/gcc/flags.h Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/flags.h Sun Dec 22 00:45:08 2013 (r259705) @@ -261,10 +261,6 @@ extern int align_labels_log; extern int align_labels_max_skip; extern int align_functions_log; -/* Like align_functions_log above, but used by front-ends to force the - minimum function alignment. Zero means no alignment is forced. */ -extern int force_align_functions_log; - /* Nonzero if we dump in VCG format, not plain text. */ extern int dump_for_graph; Modified: stable/9/contrib/gcc/print-tree.c ============================================================================== --- stable/9/contrib/gcc/print-tree.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/print-tree.c Sun Dec 22 00:45:08 2013 (r259705) @@ -439,17 +439,15 @@ print_node (FILE *file, const char *pref || DECL_INLINE (node) || DECL_BUILT_IN (node)) indent_to (file, indent + 3); - if (TREE_CODE (node) != FUNCTION_DECL) - { - if (DECL_USER_ALIGN (node)) - fprintf (file, " user"); - - fprintf (file, " align %d", DECL_ALIGN (node)); - if (TREE_CODE (node) == FIELD_DECL) - fprintf (file, " offset_align " HOST_WIDE_INT_PRINT_UNSIGNED, - DECL_OFFSET_ALIGN (node)); - } - else if (DECL_BUILT_IN (node)) + if (DECL_USER_ALIGN (node)) + fprintf (file, " user"); + + fprintf (file, " align %d", DECL_ALIGN (node)); + if (TREE_CODE (node) == FIELD_DECL) + fprintf (file, " offset_align " HOST_WIDE_INT_PRINT_UNSIGNED, + DECL_OFFSET_ALIGN (node)); + + if (TREE_CODE (node) == FUNCTION_DECL && DECL_BUILT_IN (node)) { if (DECL_BUILT_IN_CLASS (node) == BUILT_IN_MD) fprintf (file, " built-in BUILT_IN_MD %d", DECL_FUNCTION_CODE (node)); Modified: stable/9/contrib/gcc/toplev.c ============================================================================== --- stable/9/contrib/gcc/toplev.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/toplev.c Sun Dec 22 00:45:08 2013 (r259705) @@ -369,10 +369,6 @@ int align_labels_log; int align_labels_max_skip; int align_functions_log; -/* Like align_functions_log above, but used by front-ends to force the - minimum function alignment. Zero means no alignment is forced. */ -int force_align_functions_log; - typedef struct { const char *const string; Modified: stable/9/contrib/gcc/tree.c ============================================================================== --- stable/9/contrib/gcc/tree.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/tree.c Sun Dec 22 00:45:08 2013 (r259705) @@ -541,9 +541,13 @@ make_node_stat (enum tree_code code MEM_ DECL_IN_SYSTEM_HEADER (t) = in_system_header; if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON)) { - if (code != FUNCTION_DECL) + if (code == FUNCTION_DECL) + { + DECL_ALIGN (t) = FUNCTION_BOUNDARY; + DECL_MODE (t) = FUNCTION_MODE; + } + else DECL_ALIGN (t) = 1; - DECL_USER_ALIGN (t) = 0; /* We have not yet computed the alias set for this declaration. */ DECL_POINTER_ALIAS_SET (t) = -1; } @@ -1881,14 +1885,13 @@ expr_align (tree t) align1 = expr_align (TREE_OPERAND (t, 2)); return MIN (align0, align1); + /* FIXME: LABEL_DECL and CONST_DECL never have DECL_ALIGN set + meaningfully, it's always 1. */ case LABEL_DECL: case CONST_DECL: case VAR_DECL: case PARM_DECL: case RESULT_DECL: - if (DECL_ALIGN (t) != 0) - return DECL_ALIGN (t); - break; - case FUNCTION_DECL: - return FUNCTION_BOUNDARY; + gcc_assert (DECL_ALIGN (t) != 0); + return DECL_ALIGN (t); default: break; @@ -3174,8 +3177,6 @@ build_decl_stat (enum tree_code code, tr if (code == VAR_DECL || code == PARM_DECL || code == RESULT_DECL) layout_decl (t, 0); - else if (code == FUNCTION_DECL) - DECL_MODE (t) = FUNCTION_MODE; return t; } Modified: stable/9/contrib/gcc/tree.h ============================================================================== --- stable/9/contrib/gcc/tree.h Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/tree.h Sun Dec 22 00:45:08 2013 (r259705) @@ -2426,13 +2426,11 @@ struct tree_struct_field_tag GTY(()) /* Likewise for the size in bytes. */ #define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit) /* Holds the alignment required for the datum, in bits. */ -#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.u1.a.align) +#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.align) /* The alignment of NODE, in bytes. */ #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT) -/* For FIELD_DECLs, off_align holds the number of low-order bits of - DECL_FIELD_OFFSET which are known to be always zero. - DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET - has. */ +/* Set if the alignment of this DECL has been set by the user, for + example with an 'aligned' attribute. */ #define DECL_USER_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.user_align) /* Holds the machine mode corresponding to the declaration of a variable or field. Always equal to TYPE_MODE (TREE_TYPE (decl)) except for a @@ -2443,7 +2441,8 @@ struct tree_struct_field_tag GTY(()) operation it is. Note, however, that this field is overloaded, with DECL_BUILT_IN_CLASS as the discriminant, so the latter must always be checked before any access to the former. */ -#define DECL_FUNCTION_CODE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl_common.u1.f) +#define DECL_FUNCTION_CODE(NODE) \ + (FUNCTION_DECL_CHECK (NODE)->function_decl.function_code) #define DECL_DEBUG_EXPR_IS_FROM(NODE) \ (DECL_COMMON_CHECK (NODE)->decl_common.debug_expr_is_from) @@ -2581,20 +2580,9 @@ struct tree_decl_common GTY(()) unsigned gimple_reg_flag : 1; unsigned call_clobbered_flag : 1; - union tree_decl_u1 { - /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is - DECL_FUNCTION_CODE. */ - enum built_in_function f; - /* In a FUNCTION_DECL for which DECL_BUILT_IN does not hold, this - is used by language-dependent code. */ - HOST_WIDE_INT i; - /* DECL_ALIGN and DECL_OFFSET_ALIGN. (These are not used for - FUNCTION_DECLs). */ - struct tree_decl_u1_a { - unsigned int align : 24; - unsigned int off_align : 8; - } a; - } GTY ((skip)) u1; + unsigned int align : 24; + /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */ + unsigned int off_align : 8; tree size_unit; tree initial; @@ -2679,11 +2667,11 @@ struct tree_decl_with_rtl GTY(()) DECL_OFFSET_ALIGN thus returns the alignment that DECL_FIELD_OFFSET has. */ #define DECL_OFFSET_ALIGN(NODE) \ - (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align) + (((unsigned HOST_WIDE_INT)1) << FIELD_DECL_CHECK (NODE)->decl_common.off_align) /* Specify that DECL_ALIGN(NODE) is a multiple of X. */ #define SET_DECL_OFFSET_ALIGN(NODE, X) \ - (FIELD_DECL_CHECK (NODE)->decl_common.u1.a.off_align = exact_log2 ((X) & -(X))) + (FIELD_DECL_CHECK (NODE)->decl_common.off_align = exact_log2 ((X) & -(X))) /* 1 if the alignment for this type was requested by "aligned" attribute, 0 if it is the default for this type. */ @@ -3096,6 +3084,10 @@ struct tree_function_decl GTY(()) { struct tree_decl_non_common common; + /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is + DECL_FUNCTION_CODE. Otherwise unused. */ + enum built_in_function function_code; + unsigned static_ctor_flag : 1; unsigned static_dtor_flag : 1; unsigned uninlinable : 1; Modified: stable/9/contrib/gcc/varasm.c ============================================================================== --- stable/9/contrib/gcc/varasm.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcc/varasm.c Sun Dec 22 00:45:08 2013 (r259705) @@ -1383,7 +1383,7 @@ assemble_start_function (tree decl, cons if (flag_reorder_blocks_and_partition) { switch_to_section (unlikely_text_section ()); - assemble_align (FUNCTION_BOUNDARY); + assemble_align (DECL_ALIGN (decl)); ASM_OUTPUT_LABEL (asm_out_file, cfun->cold_section_label); /* When the function starts with a cold section, we need to explicitly @@ -1393,7 +1393,7 @@ assemble_start_function (tree decl, cons && BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION) { switch_to_section (text_section); - assemble_align (FUNCTION_BOUNDARY); + assemble_align (DECL_ALIGN (decl)); ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label); hot_label_written = true; first_function_block_is_cold = true; @@ -1424,18 +1424,17 @@ assemble_start_function (tree decl, cons ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label); /* Tell assembler to move to target machine's alignment for functions. */ - align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT); - if (align < force_align_functions_log) - align = force_align_functions_log; + align = floor_log2 (DECL_ALIGN (decl) / BITS_PER_UNIT); if (align > 0) { ASM_OUTPUT_ALIGN (asm_out_file, align); } /* Handle a user-specified function alignment. - Note that we still need to align to FUNCTION_BOUNDARY, as above, + Note that we still need to align to DECL_ALIGN, as above, because ASM_OUTPUT_MAX_SKIP_ALIGN might not do any alignment at all. */ - if (align_functions_log > align + if (! DECL_USER_ALIGN (decl) + && align_functions_log > align && cfun->function_frequency != FUNCTION_FREQUENCY_UNLIKELY_EXECUTED) { #ifdef ASM_OUTPUT_MAX_SKIP_ALIGN Copied: stable/9/contrib/gcclibs/libiberty/ChangeLog.gcc43 (from r258817, head/contrib/gcclibs/libiberty/ChangeLog.gcc43) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/gcclibs/libiberty/ChangeLog.gcc43 Sun Dec 22 00:45:08 2013 (r259705, copy of r258817, head/contrib/gcclibs/libiberty/ChangeLog.gcc43) @@ -0,0 +1,60 @@ +2007-05-05 Geoffrey Keating (r124467) + + PR 31775 + * mangle.c (write_mangled_name): Mangle static variable names. + (write_unqualified_name): Use local-source-name for + namespace-scope static variables. + +2007-03-15 Geoffrey Keating (r122972) + + * cp-demangle.c (d_encoding): Exit early on error. + (d_pointer_to_member_type): Exit early if cplus_demangle_type + returns NULL. + (cplus_demangle_type): Likewise. + * testsuite/demangle-expected: New testcase. + +2007-01-31 Ben Elliston (r121364) + + * strsignal.c (psignal): Change type of signo to int. + * functions.texi: Regenerate. + +2007-01-12 Ben Elliston (r120702) + + * pex-unix.c (writeerr): Cast write result to void. + + * choose-temp.c (choose_temp_base): Check the result of the call + to mktemp rather than testing the length of the modified string. + +2006-12-20 Geoffrey Keating (r120097) + + * cp-demangle.h: Add comment explaining what to do to avoid + overrunning string. + (d_check_char): New. + (d_next_char): Don't advance past trailing '\0'. + * cp-demangle.c (cplus_demangle_mangled_name): Use d_check_char. + (d_nested_name): Likewise. + (d_special_name): Likewise. + (d_call_offset): Likewise. + (d_function_type): Likewise. + (d_array_type): Likewise. + (d_pointer_to_member_type): Likewise. + (d_template_param): Likewise. + (d_template_args): Likewise. + (d_template_arg): Likewise. + (d_expr_primary): Likewise. + (d_local_name): Likewise. + (d_substitution): Likewise. + (d_ctor_dtor_name): Use d_advance rather than d_next_char. + * testsuite/test-demangle.c: Include sys/mman.h. + (MAP_ANONYMOUS): Define. + (protect_end): New. + (main): Use protect_end. + * testsuite/demangle-expected: Add testcases for overrunning + the end of the string. + +2006-11-07 Julian Brown (r118552) + + * floatformat.c (get_field): Fix segfault with little-endian word + order on 64-bit hosts. + (put_field): Likewise. + (min): Move definition. Modified: stable/9/contrib/gcclibs/libiberty/choose-temp.c ============================================================================== --- stable/9/contrib/gcclibs/libiberty/choose-temp.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcclibs/libiberty/choose-temp.c Sun Dec 22 00:45:08 2013 (r259705) @@ -65,8 +65,7 @@ choose_temp_base (void) strcpy (temp_filename, base); strcpy (temp_filename + len, TEMP_FILE); - mktemp (temp_filename); - if (strlen (temp_filename) == 0) + if (mktemp (temp_filename) == 0) abort (); return temp_filename; } Modified: stable/9/contrib/gcclibs/libiberty/cp-demangle.c ============================================================================== --- stable/9/contrib/gcclibs/libiberty/cp-demangle.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcclibs/libiberty/cp-demangle.c Sun Dec 22 00:45:08 2013 (r259705) @@ -913,9 +913,9 @@ CP_STATIC_IF_GLIBCPP_V3 struct demangle_component * cplus_demangle_mangled_name (struct d_info *di, int top_level) { - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; - if (d_next_char (di) != 'Z') + if (! d_check_char (di, 'Z')) return NULL; return d_encoding (di, top_level); } @@ -1021,7 +1021,7 @@ d_encoding (struct d_info *di, int top_l } peek = d_peek_char (di); - if (peek == '\0' || peek == 'E') + if (dc == NULL || peek == '\0' || peek == 'E') return dc; return d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME, dc, d_bare_function_type (di, has_return_type (dc))); @@ -1054,6 +1054,9 @@ d_name (struct d_info *di) case 'Z': return d_local_name (di); + case 'L': + return d_unqualified_name (di); + case 'S': { int subst; @@ -1123,7 +1126,7 @@ d_nested_name (struct d_info *di) struct demangle_component *ret; struct demangle_component **pret; - if (d_next_char (di) != 'N') + if (! d_check_char (di, 'N')) return NULL; pret = d_cv_qualifiers (di, &ret, 1); @@ -1134,7 +1137,7 @@ d_nested_name (struct d_info *di) if (*pret == NULL) return NULL; - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; @@ -1174,7 +1177,8 @@ d_prefix (struct d_info *di) if (IS_DIGIT (peek) || IS_LOWER (peek) || peek == 'C' - || peek == 'D') + || peek == 'D' + || peek == 'L') dc = d_unqualified_name (di); else if (peek == 'S') dc = d_substitution (di, 1); @@ -1208,6 +1212,9 @@ d_prefix (struct d_info *di) /* ::= ::= ::= + ::= + + ::= L */ static struct demangle_component * @@ -1229,6 +1236,19 @@ d_unqualified_name (struct d_info *di) } else if (peek == 'C' || peek == 'D') return d_ctor_dtor_name (di); + else if (peek == 'L') + { + struct demangle_component * ret; + + d_advance (di, 1); + + ret = d_source_name (di); + if (ret == NULL) + return NULL; + if (! d_discriminator (di)) + return NULL; + return ret; + } else return NULL; } @@ -1449,11 +1469,8 @@ d_operator_name (struct d_info *di) static struct demangle_component * d_special_name (struct d_info *di) { - char c; - di->expansion += 20; - c = d_next_char (di); - if (c == 'T') + if (d_check_char (di, 'T')) { switch (d_next_char (di)) { @@ -1502,7 +1519,7 @@ d_special_name (struct d_info *di) offset = d_number (di); if (offset < 0) return NULL; - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; base_type = cplus_demangle_type (di); /* We don't display the offset. FIXME: We should display @@ -1523,7 +1540,7 @@ d_special_name (struct d_info *di) return NULL; } } - else if (c == 'G') + else if (d_check_char (di, 'G')) { switch (d_next_char (di)) { @@ -1570,14 +1587,14 @@ d_call_offset (struct d_info *di, int c) else if (c == 'v') { d_number (di); - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return 0; d_number (di); } else return 0; - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return 0; return 1; @@ -1601,13 +1618,13 @@ d_ctor_dtor_name (struct d_info *di) else if (di->last_name->type == DEMANGLE_COMPONENT_SUB_STD) di->expansion += di->last_name->u.s_string.len; } - switch (d_next_char (di)) + switch (d_peek_char (di)) { case 'C': { enum gnu_v3_ctor_kinds kind; - switch (d_next_char (di)) + switch (d_peek_next_char (di)) { case '1': kind = gnu_v3_complete_object_ctor; @@ -1621,6 +1638,7 @@ d_ctor_dtor_name (struct d_info *di) default: return NULL; } + d_advance (di, 2); return d_make_ctor (di, kind, di->last_name); } @@ -1628,7 +1646,7 @@ d_ctor_dtor_name (struct d_info *di) { enum gnu_v3_dtor_kinds kind; - switch (d_next_char (di)) + switch (d_peek_next_char (di)) { case '0': kind = gnu_v3_deleting_dtor; @@ -1642,6 +1660,7 @@ d_ctor_dtor_name (struct d_info *di) default: return NULL; } + d_advance (di, 2); return d_make_dtor (di, kind, di->last_name); } @@ -1735,7 +1754,7 @@ cplus_demangle_type (struct d_info *di) if (pret == NULL) return NULL; *pret = cplus_demangle_type (di); - if (! d_add_substitution (di, ret)) + if (! *pret || ! d_add_substitution (di, ret)) return NULL; return ret; } @@ -1925,7 +1944,7 @@ d_function_type (struct d_info *di) { struct demangle_component *ret; - if (d_next_char (di) != 'F') + if (! d_check_char (di, 'F')) return NULL; if (d_peek_char (di) == 'Y') { @@ -1934,7 +1953,7 @@ d_function_type (struct d_info *di) d_advance (di, 1); } ret = d_bare_function_type (di, 1); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; } @@ -2021,7 +2040,7 @@ d_array_type (struct d_info *di) char peek; struct demangle_component *dim; - if (d_next_char (di) != 'A') + if (! d_check_char (di, 'A')) return NULL; peek = d_peek_char (di); @@ -2049,7 +2068,7 @@ d_array_type (struct d_info *di) return NULL; } - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; return d_make_comp (di, DEMANGLE_COMPONENT_ARRAY_TYPE, dim, @@ -2065,7 +2084,7 @@ d_pointer_to_member_type (struct d_info struct demangle_component *mem; struct demangle_component **pmem; - if (d_next_char (di) != 'M') + if (! d_check_char (di, 'M')) return NULL; cl = cplus_demangle_type (di); @@ -2090,6 +2109,8 @@ d_pointer_to_member_type (struct d_info if (pmem == NULL) return NULL; *pmem = cplus_demangle_type (di); + if (*pmem == NULL) + return NULL; if (pmem != &mem && (*pmem)->type != DEMANGLE_COMPONENT_FUNCTION_TYPE) { @@ -2109,7 +2130,7 @@ d_template_param (struct d_info *di) { long param; - if (d_next_char (di) != 'T') + if (! d_check_char (di, 'T')) return NULL; if (d_peek_char (di) == '_') @@ -2122,7 +2143,7 @@ d_template_param (struct d_info *di) param += 1; } - if (d_next_char (di) != '_') + if (! d_check_char (di, '_')) return NULL; ++di->did_subs; @@ -2144,7 +2165,7 @@ d_template_args (struct d_info *di) constructor or destructor. */ hold_last_name = di->last_name; - if (d_next_char (di) != 'I') + if (! d_check_char (di, 'I')) return NULL; al = NULL; @@ -2189,7 +2210,7 @@ d_template_arg (struct d_info *di) case 'X': d_advance (di, 1); ret = d_expression (di); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; @@ -2316,7 +2337,7 @@ d_expr_primary (struct d_info *di) { struct demangle_component *ret; - if (d_next_char (di) != 'L') + if (! d_check_char (di, 'L')) return NULL; if (d_peek_char (di) == '_') ret = cplus_demangle_mangled_name (di, 0); @@ -2362,7 +2383,7 @@ d_expr_primary (struct d_info *di) } ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s)); } - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; return ret; } @@ -2376,12 +2397,12 @@ d_local_name (struct d_info *di) { struct demangle_component *function; - if (d_next_char (di) != 'Z') + if (! d_check_char (di, 'Z')) return NULL; function = d_encoding (di, 0); - if (d_next_char (di) != 'E') + if (! d_check_char (di, 'E')) return NULL; if (d_peek_char (di) == 's') @@ -2486,7 +2507,7 @@ d_substitution (struct d_info *di, int p { char c; - if (d_next_char (di) != 'S') + if (! d_check_char (di, 'S')) return NULL; c = d_next_char (di); Modified: stable/9/contrib/gcclibs/libiberty/cp-demangle.h ============================================================================== --- stable/9/contrib/gcclibs/libiberty/cp-demangle.h Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcclibs/libiberty/cp-demangle.h Sun Dec 22 00:45:08 2013 (r259705) @@ -123,10 +123,16 @@ struct d_info int expansion; }; +/* To avoid running past the ending '\0', don't: + - call d_peek_next_char if d_peek_char returned '\0' + - call d_advance with an 'i' that is too large + - call d_check_char(di, '\0') + Everything else is safe. */ #define d_peek_char(di) (*((di)->n)) #define d_peek_next_char(di) ((di)->n[1]) #define d_advance(di, i) ((di)->n += (i)) -#define d_next_char(di) (*((di)->n++)) +#define d_check_char(di, c) (d_peek_char(di) == c ? ((di)->n++, 1) : 0) +#define d_next_char(di) (d_peek_char(di) == '\0' ? '\0' : *((di)->n++)) #define d_str(di) ((di)->n) /* Functions and arrays in cp-demangle.c which are referenced by Modified: stable/9/contrib/gcclibs/libiberty/floatformat.c ============================================================================== --- stable/9/contrib/gcclibs/libiberty/floatformat.c Sun Dec 22 00:22:57 2013 (r259704) +++ stable/9/contrib/gcclibs/libiberty/floatformat.c Sun Dec 22 00:45:08 2013 (r259705) @@ -249,53 +249,51 @@ const struct floatformat floatformat_ia6 floatformat_always_valid }; + +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + /* Extract a field which starts at START and is LEN bits long. DATA and TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */ static unsigned long get_field (const unsigned char *data, enum floatformat_byteorders order, unsigned int total_len, unsigned int start, unsigned int len) { - unsigned long result; + unsigned long result = 0; unsigned int cur_byte; - int cur_bitshift; + int lo_bit, hi_bit, cur_bitshift = 0; + int nextbyte = (order == floatformat_little) ? 1 : -1; + + /* Start is in big-endian bit order! Fix that first. */ + start = total_len - (start + len); /* Start at the least significant part of the field. */ - cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT; if (order == floatformat_little) - cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1; - cur_bitshift = - ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT; - result = *(data + cur_byte) >> (-cur_bitshift); - cur_bitshift += FLOATFORMAT_CHAR_BIT; - if (order == floatformat_little) - ++cur_byte; + cur_byte = start / FLOATFORMAT_CHAR_BIT; else - --cur_byte; + cur_byte = (total_len - start - 1) / FLOATFORMAT_CHAR_BIT; - /* Move towards the most significant part of the field. */ - while ((unsigned int) cur_bitshift < len) + lo_bit = start % FLOATFORMAT_CHAR_BIT; + hi_bit = min (lo_bit + len, FLOATFORMAT_CHAR_BIT); + + do { - if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT) - /* This is the last byte; zero out the bits which are not part of - this field. */ - result |= *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 22 01:00:01 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F69A7DA; Sun, 22 Dec 2013 01:00:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCE410A2; Sun, 22 Dec 2013 01:00:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBM101E9092779; Sun, 22 Dec 2013 01:00:01 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBM100vr092765; Sun, 22 Dec 2013 01:00:00 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312220100.rBM100vr092765@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 22 Dec 2013 01:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259707 - in stable/9/contrib/gcc: . config/rs6000 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 01:00:01 -0000 Author: pfg Date: Sun Dec 22 01:00:00 2013 New Revision: 259707 URL: http://svnweb.freebsd.org/changeset/base/259707 Log: MFC r258651, r258943: gcc: Altivec register adjustments from Apple. gcc: On rs6000 update sp_offset depending only on size. Tested by: Justin Hibbits Obtained from: gcc pre-4.3 (rev. 124763, 125116; GPLv2) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/config/rs6000/rs6000.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Sun Dec 22 00:56:05 2013 (r259706) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Sun Dec 22 01:00:00 2013 (r259707) @@ -51,6 +51,14 @@ * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. +2007-05-27 Eric Christopher (r125116) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Update + sp_offset depending on stack size. Save r12 depending + on registers we're saving later. + (rs6000_emit_epilogue): Update sp_offset depending only + on stack size. + 2007-05-24 Richard Sandiford (r125037) * postreload-gcse.c (reg_changed_after_insn_p): New function. @@ -66,6 +74,12 @@ regs_invalidated_by_call, rather than just checking the membership of REGNO (REG). +2007-05-16 Eric Christopher (r124763) + + * config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register + saving after stack push. Set sp_offset whenever we push. + (rs6000_emit_epilogue): Move altivec register restore before stack push. + 2007-05-03 Ian Lance Taylor (r124381) * config/rs6000/rs6000.c (rs6000_override_options): Don't set Modified: stable/9/contrib/gcc/config/rs6000/rs6000.c ============================================================================== --- stable/9/contrib/gcc/config/rs6000/rs6000.c Sun Dec 22 00:56:05 2013 (r259706) +++ stable/9/contrib/gcc/config/rs6000/rs6000.c Sun Dec 22 01:00:00 2013 (r259707) @@ -14466,77 +14466,6 @@ rs6000_emit_prologue (void) sp_offset = info->total_size; } - /* Save AltiVec registers if needed. */ - if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI && info->altivec_size != 0) - { - int i; - - /* There should be a non inline version of this, for when we - are saving lots of vector registers. */ - for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i) - if (info->vrsave_mask & ALTIVEC_REG_BIT (i)) - { - rtx areg, savereg, mem; - int offset; - - offset = info->altivec_save_offset + sp_offset - + 16 * (i - info->first_altivec_reg_save); - - savereg = gen_rtx_REG (V4SImode, i); - - areg = gen_rtx_REG (Pmode, 0); - emit_move_insn (areg, GEN_INT (offset)); - - /* AltiVec addressing mode is [reg+reg]. */ - mem = gen_frame_mem (V4SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, areg)); - - insn = emit_move_insn (mem, savereg); - - rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, - areg, GEN_INT (offset)); - } - } - - /* VRSAVE is a bit vector representing which AltiVec registers - are used. The OS uses this to determine which vector - registers to save on a context switch. We need to save - VRSAVE on the stack frame, add whatever AltiVec registers we - used in this function, and do the corresponding magic in the - epilogue. */ - - if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE - && info->vrsave_mask != 0) - { - rtx reg, mem, vrsave; - int offset; - - /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12 - as frame_reg_rtx and r11 as the static chain pointer for - nested functions. */ - reg = gen_rtx_REG (SImode, 0); - vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO); - if (TARGET_MACHO) - emit_insn (gen_get_vrsave_internal (reg)); - else - emit_insn (gen_rtx_SET (VOIDmode, reg, vrsave)); - - if (!WORLD_SAVE_P (info)) - { - /* Save VRSAVE. */ - offset = info->vrsave_save_offset + sp_offset; - mem = gen_frame_mem (SImode, - gen_rtx_PLUS (Pmode, frame_reg_rtx, - GEN_INT (offset))); - insn = emit_move_insn (mem, reg); - } - - /* Include the registers in the mask. */ - emit_insn (gen_iorsi3 (reg, reg, GEN_INT ((int) info->vrsave_mask))); - - insn = emit_insn (generate_set_vrsave (reg, info, 0)); - } - /* If we use the link register, get it into r0. */ if (!WORLD_SAVE_P (info) && info->lr_save_p) { @@ -14774,7 +14703,19 @@ rs6000_emit_prologue (void) for which it was done previously. */ if (!WORLD_SAVE_P (info) && info->push_p && !(DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return)) - rs6000_emit_allocate_stack (info->total_size, FALSE); + { + if (info->total_size < 32767) + sp_offset = info->total_size; + else + frame_reg_rtx = frame_ptr_rtx; + rs6000_emit_allocate_stack (info->total_size, + (frame_reg_rtx != sp_reg_rtx + && ((info->altivec_size != 0) + || (info->vrsave_mask != 0) + ))); + if (frame_reg_rtx != sp_reg_rtx) + rs6000_emit_stack_tie (); + } /* Set frame pointer, if needed. */ if (frame_pointer_needed) @@ -14784,6 +14725,78 @@ rs6000_emit_prologue (void) RTX_FRAME_RELATED_P (insn) = 1; } + /* Save AltiVec registers if needed. Save here because the red zone does + not include AltiVec registers. */ + if (!WORLD_SAVE_P (info) && TARGET_ALTIVEC_ABI && info->altivec_size != 0) + { + int i; + + /* There should be a non inline version of this, for when we + are saving lots of vector registers. */ + for (i = info->first_altivec_reg_save; i <= LAST_ALTIVEC_REGNO; ++i) + if (info->vrsave_mask & ALTIVEC_REG_BIT (i)) + { + rtx areg, savereg, mem; + int offset; + + offset = info->altivec_save_offset + sp_offset + + 16 * (i - info->first_altivec_reg_save); + + savereg = gen_rtx_REG (V4SImode, i); + + areg = gen_rtx_REG (Pmode, 0); + emit_move_insn (areg, GEN_INT (offset)); + + /* AltiVec addressing mode is [reg+reg]. */ + mem = gen_frame_mem (V4SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, areg)); + + insn = emit_move_insn (mem, savereg); + + rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, + areg, GEN_INT (offset)); + } + } + + /* VRSAVE is a bit vector representing which AltiVec registers + are used. The OS uses this to determine which vector + registers to save on a context switch. We need to save + VRSAVE on the stack frame, add whatever AltiVec registers we + used in this function, and do the corresponding magic in the + epilogue. */ + + if (TARGET_ALTIVEC && TARGET_ALTIVEC_VRSAVE + && info->vrsave_mask != 0) + { + rtx reg, mem, vrsave; + int offset; + + /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12 + as frame_reg_rtx and r11 as the static chain pointer for + nested functions. */ + reg = gen_rtx_REG (SImode, 0); + vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO); + if (TARGET_MACHO) + emit_insn (gen_get_vrsave_internal (reg)); + else + emit_insn (gen_rtx_SET (VOIDmode, reg, vrsave)); + + if (!WORLD_SAVE_P (info)) + { + /* Save VRSAVE. */ + offset = info->vrsave_save_offset + sp_offset; + mem = gen_frame_mem (SImode, + gen_rtx_PLUS (Pmode, frame_reg_rtx, + GEN_INT (offset))); + insn = emit_move_insn (mem, reg); + } + + /* Include the registers in the mask. */ + emit_insn (gen_iorsi3 (reg, reg, GEN_INT ((int) info->vrsave_mask))); + + insn = emit_insn (generate_set_vrsave (reg, info, 0)); + } + /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */ if ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0) || (DEFAULT_ABI == ABI_V4 @@ -15041,33 +15054,9 @@ rs6000_emit_epilogue (int sibcall) return; } - /* If we have a frame pointer, a call to alloca, or a large stack - frame, restore the old stack pointer using the backchain. Otherwise, - we know what size to update it with. */ - if (use_backchain_to_restore_sp) - { - /* Under V.4, don't reset the stack pointer until after we're done - loading the saved registers. */ - if (DEFAULT_ABI == ABI_V4) - frame_reg_rtx = gen_rtx_REG (Pmode, 11); - - emit_move_insn (frame_reg_rtx, - gen_rtx_MEM (Pmode, sp_reg_rtx)); - } - else if (info->push_p) - { - if (DEFAULT_ABI == ABI_V4 - || current_function_calls_eh_return) - sp_offset = info->total_size; - else - { - emit_insn (TARGET_32BIT - ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx, - GEN_INT (info->total_size)) - : gen_adddi3 (sp_reg_rtx, sp_reg_rtx, - GEN_INT (info->total_size))); - } - } + /* Set sp_offset based on the stack push from the prologue. */ + if (info->total_size < 32767) + sp_offset = info->total_size; /* Restore AltiVec registers if needed. */ if (TARGET_ALTIVEC_ABI && info->altivec_size != 0) @@ -15108,6 +15097,36 @@ rs6000_emit_epilogue (int sibcall) emit_insn (generate_set_vrsave (reg, info, 1)); } + sp_offset = 0; + + /* If we have a frame pointer, a call to alloca, or a large stack + frame, restore the old stack pointer using the backchain. Otherwise, + we know what size to update it with. */ + if (use_backchain_to_restore_sp) + { + /* Under V.4, don't reset the stack pointer until after we're done + loading the saved registers. */ + if (DEFAULT_ABI == ABI_V4) + frame_reg_rtx = gen_rtx_REG (Pmode, 11); + + emit_move_insn (frame_reg_rtx, + gen_rtx_MEM (Pmode, sp_reg_rtx)); + } + else if (info->push_p) + { + if (DEFAULT_ABI == ABI_V4 + || current_function_calls_eh_return) + sp_offset = info->total_size; + else + { + emit_insn (TARGET_32BIT + ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx, + GEN_INT (info->total_size)) + : gen_adddi3 (sp_reg_rtx, sp_reg_rtx, + GEN_INT (info->total_size))); + } + } + /* Get the old lr if we saved it. */ if (info->lr_save_p) { From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 22 13:03:34 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5152FF91; Sun, 22 Dec 2013 13:03:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D29D1B2B; Sun, 22 Dec 2013 13:03:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMD3YkE053604; Sun, 22 Dec 2013 13:03:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMD3YMu053603; Sun, 22 Dec 2013 13:03:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201312221303.rBMD3YMu053603@svn.freebsd.org> From: Alexander Motin Date: Sun, 22 Dec 2013 13:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259722 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 13:03:34 -0000 Author: mav Date: Sun Dec 22 13:03:33 2013 New Revision: 259722 URL: http://svnweb.freebsd.org/changeset/base/259722 Log: MFC r259108: When comparing device IDs, make sure that they have the same type (like NAA assigned) and identify the same entity (like device or port). Otherwise there can be false positives since at least some models of Seagate disks use same IDs for the whole device and one of its ports. Modified: stable/9/sys/cam/scsi/scsi_all.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.c Sun Dec 22 13:02:34 2013 (r259721) +++ stable/9/sys/cam/scsi/scsi_all.c Sun Dec 22 13:03:33 2013 (r259722) @@ -6509,7 +6509,11 @@ scsi_devid_match(uint8_t *lhs, size_t lh while (rhs_id <= rhs_last && (rhs_id->identifier + rhs_id->length) <= rhs_end) { - if (rhs_id->length == lhs_id->length + if ((rhs_id->id_type & + (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) == + (lhs_id->id_type & + (SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) + && rhs_id->length == lhs_id->length && memcmp(rhs_id->identifier, lhs_id->identifier, rhs_id->length) == 0) return (0); From owner-svn-src-stable-9@FreeBSD.ORG Sun Dec 22 23:33:27 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E16F7A8B; Sun, 22 Dec 2013 23:33:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1A5D11EB; Sun, 22 Dec 2013 23:33:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBMNXRqe082889; Sun, 22 Dec 2013 23:33:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBMNXRIr082888; Sun, 22 Dec 2013 23:33:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201312222333.rBMNXRIr082888@svn.freebsd.org> From: Warner Losh Date: Sun, 22 Dec 2013 23:33:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259753 - stable/9/sys/arm/at91 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Dec 2013 23:33:28 -0000 Author: imp Date: Sun Dec 22 23:33:27 2013 New Revision: 259753 URL: http://svnweb.freebsd.org/changeset/base/259753 Log: Direct Commit of mountroot> prompt fix r259748 (since there's no sane branching relationship between that branch and this one and since the more general fix in head may be too risky for a stbale branch this mature): Fix mountroot> prompt eating most of the characters by not enabling RXRDY interrupts in the attach routine. Instead, defer this until the first interrupt we see after the device is opened. Given the console use case, we're guaranteed to get a TXRDY interrupt before any reads are posted due to boot messages, which makes this work. The real fix is to use cngrab/cnungrab function pointers to disable RXRDY interrupts while grabbed. However, that touches the MI uart code, so was disallowed for 10.0 due to the lateness of the hour this fix was proposed. It works for mountroot, the most common atmel kernel prompt use cases, but wouldn't work for GELI since it prompts later in the boot process. Modified: stable/9/sys/arm/at91/uart_dev_at91usart.c Modified: stable/9/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/9/sys/arm/at91/uart_dev_at91usart.c Sun Dec 22 23:31:04 2013 (r259752) +++ stable/9/sys/arm/at91/uart_dev_at91usart.c Sun Dec 22 23:33:27 2013 (r259753) @@ -63,7 +63,8 @@ struct at91_usart_softc { bus_dma_tag_t tx_tag; bus_dmamap_t tx_map; uint32_t flags; -#define HAS_TIMEOUT 1 +#define HAS_TIMEOUT 0x1 +#define NEEDS_RXRDY 0x4 bus_dma_tag_t rx_tag; struct at91_usart_rx ping_pong[2]; struct at91_usart_rx *ping; @@ -425,7 +426,13 @@ at91_usart_bus_attach(struct uart_softc WR4(&sc->sc_bas, USART_IER, USART_CSR_TIMEOUT | USART_CSR_RXBUFF | USART_CSR_ENDRX); } else { - WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); + /* + * Defer turning on the RXRDY bit until we're opened. This is to make the + * mountroot prompt work before we've opened the console. This is a workaround + * for not being able to change the UART interface for the 10.0 release. + */ + atsc->flags |= NEEDS_RXRDY; + /* WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); */ } WR4(&sc->sc_bas, USART_IER, USART_CSR_RXBRK); errout: @@ -530,6 +537,13 @@ at91_usart_bus_ipend(struct uart_softc * ipend = 0; atsc = (struct at91_usart_softc *)sc; uart_lock(sc->sc_hwmtx); + + /* Kludge -- Enable the RXRDY we deferred in attach */ + if (sc->sc_opened && (atsc->flags & NEEDS_RXRDY)) { + WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); + atsc->flags &= ~NEEDS_RXRDY; + } + csr = RD4(&sc->sc_bas, USART_CSR); if (csr & USART_CSR_ENDTX) { bus_dmamap_sync(atsc->tx_tag, atsc->tx_map, From owner-svn-src-stable-9@FreeBSD.ORG Mon Dec 23 22:38:41 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8B31A42; Mon, 23 Dec 2013 22:38:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93FE915AC; Mon, 23 Dec 2013 22:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBNMcfqm078009; Mon, 23 Dec 2013 22:38:41 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBNMcf11078008; Mon, 23 Dec 2013 22:38:41 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312232238.rBNMcf11078008@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 23 Dec 2013 22:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259799 - stable/9/usr.sbin/kldxref X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 22:38:41 -0000 Author: jilles Date: Mon Dec 23 22:38:41 2013 New Revision: 259799 URL: http://svnweb.freebsd.org/changeset/base/259799 Log: MFC r256060,r256650: kldxref: Do not depend on the directory order. Sort the filenames to get a consistent result between machines of the same architecture. Also, sort FTS_D entries after other entries so kldxref -R works properly in the uncommon case that a directory contains both subdirectories and modules. Previously, this may have happened to work, depending on the order of files in the directory. PR: bin/182098 Submitted by: Derek Schrock (original version) Tested by: Derek Schrock Modified: stable/9/usr.sbin/kldxref/kldxref.c Directory Properties: stable/9/usr.sbin/kldxref/ (props changed) Modified: stable/9/usr.sbin/kldxref/kldxref.c ============================================================================== --- stable/9/usr.sbin/kldxref/kldxref.c Mon Dec 23 22:37:59 2013 (r259798) +++ stable/9/usr.sbin/kldxref/kldxref.c Mon Dec 23 22:38:41 2013 (r259799) @@ -274,6 +274,16 @@ usage(void) exit(1); } +static int +compare(const FTSENT *const *a, const FTSENT *const *b) +{ + if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D) + return 1; + if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D) + return -1; + return strcmp((*a)->fts_name, (*b)->fts_name); +} + int main(int argc, char *argv[]) { @@ -315,7 +325,7 @@ main(int argc, char *argv[]) err(1, "%s", argv[0]); } - ftsp = fts_open(argv, fts_options, 0); + ftsp = fts_open(argv, fts_options, compare); if (ftsp == NULL) exit(1); From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 24 07:26:44 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E2B44A2; Tue, 24 Dec 2013 07:26:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A5DE1644; Tue, 24 Dec 2013 07:26:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBO7QiS0068152; Tue, 24 Dec 2013 07:26:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBO7QiFh068151; Tue, 24 Dec 2013 07:26:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312240726.rBO7QiFh068151@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 24 Dec 2013 07:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259815 - stable/9/sys/fs/fifofs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 07:26:44 -0000 Author: kib Date: Tue Dec 24 07:26:43 2013 New Revision: 259815 URL: http://svnweb.freebsd.org/changeset/base/259815 Log: MFC r259521: Do not allow O_EXEC opens for fifo, return EINVAL. Modified: stable/9/sys/fs/fifofs/fifo_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- stable/9/sys/fs/fifofs/fifo_vnops.c Tue Dec 24 07:25:49 2013 (r259814) +++ stable/9/sys/fs/fifofs/fifo_vnops.c Tue Dec 24 07:26:43 2013 (r259815) @@ -194,7 +194,7 @@ fifo_open(ap) int error; ASSERT_VOP_ELOCKED(vp, "fifo_open"); - if (fp == NULL) + if (fp == NULL || (ap->a_mode & FEXEC) != 0) return (EINVAL); if ((fip = vp->v_fifoinfo) == NULL) { fip = malloc(sizeof(*fip), M_VNODE, M_WAITOK); From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 24 14:26:33 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B00994FE; Tue, 24 Dec 2013 14:26:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98C8B14E2; Tue, 24 Dec 2013 14:26:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOEQXNK020963; Tue, 24 Dec 2013 14:26:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOEQVBf020950; Tue, 24 Dec 2013 14:26:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312241426.rBOEQVBf020950@svn.freebsd.org> From: Dimitry Andric Date: Tue, 24 Dec 2013 14:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259822 - in stable: 10/lib/clang 10/lib/clang/include 10/lib/clang/include/llvm/Config 10/lib/clang/libllvmpowerpcasmparser 10/usr.bin/clang/clang 10/usr.bin/clang/llc 10/usr.bin/clang... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 14:26:33 -0000 Author: dim Date: Tue Dec 24 14:26:31 2013 New Revision: 259822 URL: http://svnweb.freebsd.org/changeset/base/259822 Log: MFC r259473: Enable llvm's integrated assembler for PowerPC, since it should now be good enough for typical usage. Requested by: rdivacky Added: stable/9/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/9/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/9/lib/clang/Makefile stable/9/lib/clang/include/llvm/Config/AsmParsers.def stable/9/usr.bin/clang/clang/Makefile stable/9/usr.bin/clang/llc/Makefile stable/9/usr.bin/clang/llvm-mc/Makefile stable/9/usr.bin/clang/llvm-objdump/Makefile stable/9/usr.bin/clang/llvm-rtdyld/Makefile stable/9/usr.bin/clang/opt/Makefile Directory Properties: stable/9/lib/clang/ (props changed) stable/9/lib/clang/include/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/clang/ (props changed) Changes in other areas also in this revision: Added: stable/10/lib/clang/include/PPCGenAsmMatcher.inc - copied unchanged from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc stable/10/lib/clang/libllvmpowerpcasmparser/ - copied from r259473, head/lib/clang/libllvmpowerpcasmparser/ Modified: stable/10/lib/clang/Makefile stable/10/lib/clang/include/llvm/Config/AsmParsers.def stable/10/usr.bin/clang/clang/Makefile stable/10/usr.bin/clang/llc/Makefile stable/10/usr.bin/clang/lldb/Makefile stable/10/usr.bin/clang/llvm-mc/Makefile stable/10/usr.bin/clang/llvm-objdump/Makefile stable/10/usr.bin/clang/llvm-rtdyld/Makefile stable/10/usr.bin/clang/opt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/clang/Makefile ============================================================================== --- stable/9/lib/clang/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/lib/clang/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -69,6 +69,7 @@ SUBDIR= libclanganalysis \ libllvmmipsdisassembler \ libllvmmipsinfo \ libllvmmipsinstprinter \ + libllvmpowerpcasmparser \ libllvmpowerpccodegen \ libllvmpowerpcdesc \ libllvmpowerpcinfo \ Copied: stable/9/lib/clang/include/PPCGenAsmMatcher.inc (from r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/clang/include/PPCGenAsmMatcher.inc Tue Dec 24 14:26:31 2013 (r259822, copy of r259473, head/lib/clang/include/PPCGenAsmMatcher.inc) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "PPCGenAsmMatcher.inc.h" Modified: stable/9/lib/clang/include/llvm/Config/AsmParsers.def ============================================================================== --- stable/9/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/lib/clang/include/llvm/Config/AsmParsers.def Tue Dec 24 14:26:31 2013 (r259822) @@ -2,6 +2,7 @@ LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(Mips) +LLVM_ASM_PARSER(PowerPC) LLVM_ASM_PARSER(X86) #undef LLVM_ASM_PARSER Modified: stable/9/usr.bin/clang/clang/Makefile ============================================================================== --- stable/9/usr.bin/clang/clang/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/clang/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -85,8 +85,9 @@ LIBDEPS=clangfrontendtool \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llc/Makefile ============================================================================== --- stable/9/usr.bin/clang/llc/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llc/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmirreader \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llvm-mc/Makefile ============================================================================== --- stable/9/usr.bin/clang/llvm-mc/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llvm-mc/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -24,8 +24,9 @@ LIBDEPS=llvmmcdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llvm-objdump/Makefile ============================================================================== --- stable/9/usr.bin/clang/llvm-objdump/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llvm-objdump/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -30,8 +30,9 @@ LIBDEPS=llvmmcdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/llvm-rtdyld/Makefile ============================================================================== --- stable/9/usr.bin/clang/llvm-rtdyld/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/llvm-rtdyld/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -28,8 +28,9 @@ LIBDEPS=llvmdebuginfo \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ Modified: stable/9/usr.bin/clang/opt/Makefile ============================================================================== --- stable/9/usr.bin/clang/opt/Makefile Tue Dec 24 14:14:05 2013 (r259821) +++ stable/9/usr.bin/clang/opt/Makefile Tue Dec 24 14:26:31 2013 (r259822) @@ -25,8 +25,9 @@ LIBDEPS=llvmarmdisassembler \ llvmmipsinstprinter \ llvmpowerpccodegen \ llvmpowerpcdesc \ - llvmpowerpcinfo \ llvmpowerpcinstprinter \ + llvmpowerpcasmparser \ + llvmpowerpcinfo \ llvmx86disassembler \ llvmx86asmparser \ llvmx86codegen \ From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 24 18:41:18 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 683E1B57; Tue, 24 Dec 2013 18:41:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48660171D; Tue, 24 Dec 2013 18:41:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOIfIL3021071; Tue, 24 Dec 2013 18:41:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOIfHTx021067; Tue, 24 Dec 2013 18:41:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241841.rBOIfHTx021067@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 18:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259829 - in stable/9/usr.bin: kdump truss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 18:41:18 -0000 Author: jhb Date: Tue Dec 24 18:41:17 2013 New Revision: 259829 URL: http://svnweb.freebsd.org/changeset/base/259829 Log: MFC 255493: - Decode the idtype argument passed to wait6() in kdump and truss. - Don't treat an options argument of 0 to wait4() as an error in kdump. - Decode the wait options passed to wait4() and wait6() in truss and decode the returned rusage and exit status. Modified: stable/9/usr.bin/kdump/kdump.c stable/9/usr.bin/kdump/mksubr stable/9/usr.bin/truss/syscall.h stable/9/usr.bin/truss/syscalls.c Directory Properties: stable/9/usr.bin/kdump/ (props changed) stable/9/usr.bin/truss/ (props changed) Modified: stable/9/usr.bin/kdump/kdump.c ============================================================================== --- stable/9/usr.bin/kdump/kdump.c Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/kdump/kdump.c Tue Dec 24 18:41:17 2013 (r259829) @@ -58,6 +58,7 @@ extern int errno; #include #include #include +#include #ifdef IPX #include #include @@ -556,8 +557,30 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_wait4: print_number(ip, narg, c); print_number(ip, narg, c); + /* + * A flags value of zero is valid for + * wait4() but not for wait6(), so + * handle zero special here. + */ + if (*ip == 0) { + print_number(ip, narg, c); + } else { + putchar(','); + wait6optname(*ip); + ip++; + narg--; + } + break; + case SYS_wait6: + putchar('('); + idtypename(*ip, decimal); + c = ','; + ip++; + narg--; + print_number(ip, narg, c); + print_number(ip, narg, c); putchar(','); - wait4optname(*ip); + wait6optname(*ip); ip++; narg--; break; Modified: stable/9/usr.bin/kdump/mksubr ============================================================================== --- stable/9/usr.bin/kdump/mksubr Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/kdump/mksubr Tue Dec 24 18:41:17 2013 (r259829) @@ -314,6 +314,68 @@ flagsandmodename(int flags, int mode, in } } +/* MANUAL */ +void +idtypename(idtype_t idtype, int decimal) +{ + switch(idtype) { + case P_PID: + printf("P_PID"); + break; + case P_PPID: + printf("P_PPID"); + break; + case P_PGID: + printf("P_PGID"); + break; + case P_SID: + printf("P_SID"); + break; + case P_CID: + printf("P_CID"); + break; + case P_UID: + printf("P_UID"); + break; + case P_GID: + printf("P_GID"); + break; + case P_ALL: + printf("P_ALL"); + break; + case P_LWPID: + printf("P_LWPID"); + break; + case P_TASKID: + printf("P_TASKID"); + break; + case P_PROJID: + printf("P_PROJID"); + break; + case P_POOLID: + printf("P_POOLID"); + break; + case P_JAILID: + printf("P_JAILID"); + break; + case P_CTID: + printf("P_CTID"); + break; + case P_CPUID: + printf("P_CPUID"); + break; + case P_PSETID: + printf("P_PSETID"); + break; + default: + if (decimal) { + printf("%d", idtype); + } else { + printf("%#x", idtype); + } + } +} + /* * MANUAL * @@ -393,7 +455,7 @@ auto_switch_type "sockoptname" " auto_switch_type "socktypename" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" auto_or_type "thrcreateflagsname" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" auto_switch_type "vmresultname" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" -auto_or_type "wait4optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" +auto_or_type "wait6optname" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" auto_switch_type "whencename" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" cat <<_EOF_ Modified: stable/9/usr.bin/truss/syscall.h ============================================================================== --- stable/9/usr.bin/truss/syscall.h Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/truss/syscall.h Tue Dec 24 18:41:17 2013 (r259829) @@ -40,7 +40,7 @@ enum Argtype { None = 1, Hex, Octal, Int Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, - Pathconf, Rforkflags }; + Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype }; #define ARG_MASK 0xff #define OUT 0x100 Modified: stable/9/usr.bin/truss/syscalls.c ============================================================================== --- stable/9/usr.bin/truss/syscalls.c Tue Dec 24 17:28:27 2013 (r259828) +++ stable/9/usr.bin/truss/syscalls.c Tue Dec 24 18:41:17 2013 (r259829) @@ -39,12 +39,13 @@ static const char rcsid[] = * arguments. */ -#include #include +#include #include #include #include #include +#include #include #include #include @@ -263,6 +264,12 @@ struct syscall syscalls[] = { .args = { { Name , 0 } , { Name, 1 } } }, { .name = "posix_openpt", .ret_type = 1, .nargs = 1, .args = { { Open, 0 } } }, + { .name = "wait4", .ret_type = 1, .nargs = 4, + .args = { { Int, 0 }, { ExitStatus | OUT, 1 }, { Waitoptions, 2 }, + { Rusage | OUT, 3 } } }, + { .name = "wait6", .ret_type = 1, .nargs = 6, + .args = { { Idtype, 0 }, { Int, 1 }, { ExitStatus | OUT, 2 }, + { Waitoptions, 3 }, { Rusage | OUT, 4 }, { Ptr, 5 } } }, { .name = 0 }, }; @@ -377,6 +384,17 @@ static struct xlat rfork_flags[] = { X(RFSIGSHARE) X(RFTSIGZMB) X(RFLINUXTHPN) XEND }; +static struct xlat wait_options[] = { + X(WNOHANG) X(WUNTRACED) X(WCONTINUED) X(WNOWAIT) X(WEXITED) + X(WTRAPPED) XEND +}; + +static struct xlat idtype_arg[] = { + X(P_PID) X(P_PPID) X(P_PGID) X(P_SID) X(P_CID) X(P_UID) X(P_GID) + X(P_ALL) X(P_LWPID) X(P_TASKID) X(P_PROJID) X(P_POOLID) X(P_JAILID) + X(P_CTID) X(P_CPUID) X(P_PSETID) XEND +}; + #undef X #undef XEND @@ -533,6 +551,16 @@ get_string(pid_t pid, void *offset, int } } +static char * +strsig2(int sig) +{ + char *tmp; + + tmp = strsig(sig); + if (tmp == NULL) + asprintf(&tmp, "%d", sig); + return (tmp); +} /* * print_arg @@ -818,19 +846,14 @@ print_arg(struct syscall_args *sc, unsig free(fds); break; } - case Signal: { - long sig; - - sig = args[sc->offset]; - tmp = strsig(sig); - if (tmp == NULL) - asprintf(&tmp, "%ld", sig); + case Signal: + tmp = strsig2(args[sc->offset]); break; - } case Sigset: { long sig; sigset_t ss; int i, used; + char *signame; sig = args[sc->offset]; if (get_struct(pid, (void *)args[sc->offset], (void *)&ss, @@ -841,8 +864,11 @@ print_arg(struct syscall_args *sc, unsig tmp = malloc(sys_nsig * 8); /* 7 bytes avg per signal name */ used = 0; for (i = 1; i < sys_nsig; i++) { - if (sigismember(&ss, i)) - used += sprintf(tmp + used, "%s|", strsig(i)); + if (sigismember(&ss, i)) { + signame = strsig(i); + used += sprintf(tmp + used, "%s|", signame); + free(signame); + } } if (used) tmp[used-1] = 0; @@ -1139,6 +1165,35 @@ print_arg(struct syscall_args *sc, unsig asprintf(&tmp, "0x%lx", args[sc->offset]); break; } + case ExitStatus: { + char *signame; + int status; + signame = NULL; + if (get_struct(pid, (void *)args[sc->offset], &status, + sizeof(status)) != -1) { + if (WIFCONTINUED(status)) + tmp = strdup("{ CONTINUED }"); + else if (WIFEXITED(status)) + asprintf(&tmp, "{ EXITED,val=%d }", + WEXITSTATUS(status)); + else if (WIFSIGNALED(status)) + asprintf(&tmp, "{ SIGNALED,sig=%s%s }", + signame = strsig2(WTERMSIG(status)), + WCOREDUMP(status) ? ",cored" : ""); + else + asprintf(&tmp, "{ STOPPED,sig=%s }", + signame = strsig2(WTERMSIG(status))); + } else + asprintf(&tmp, "0x%lx", args[sc->offset]); + free(signame); + break; + } + case Waitoptions: + tmp = strdup(xlookup_bits(wait_options, args[sc->offset])); + break; + case Idtype: + tmp = strdup(xlookup(idtype_arg, args[sc->offset])); + break; default: errx(1, "Invalid argument type %d\n", sc->type & ARG_MASK); } From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 24 18:49:25 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B2D2FD1; Tue, 24 Dec 2013 18:49:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D0D041761; Tue, 24 Dec 2013 18:49:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOInOwn022087; Tue, 24 Dec 2013 18:49:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOInO0h022085; Tue, 24 Dec 2013 18:49:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241849.rBOInO0h022085@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 18:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259832 - stable/9/sys/arm/econa X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 18:49:25 -0000 Author: jhb Date: Tue Dec 24 18:49:24 2013 New Revision: 259832 URL: http://svnweb.freebsd.org/changeset/base/259832 Log: MFC 258177: Remove an incorrectly copied and pasted clause from these license statements. Modified: stable/9/sys/arm/econa/uart_bus_ec.c stable/9/sys/arm/econa/uart_cpu_ec.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/arm/econa/uart_bus_ec.c ============================================================================== --- stable/9/sys/arm/econa/uart_bus_ec.c Tue Dec 24 18:48:29 2013 (r259831) +++ stable/9/sys/arm/econa/uart_bus_ec.c Tue Dec 24 18:49:24 2013 (r259832) @@ -11,9 +11,6 @@ * 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. - * 3. Neither the name of MARVELL nor the names of contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/arm/econa/uart_cpu_ec.c ============================================================================== --- stable/9/sys/arm/econa/uart_cpu_ec.c Tue Dec 24 18:48:29 2013 (r259831) +++ stable/9/sys/arm/econa/uart_cpu_ec.c Tue Dec 24 18:49:24 2013 (r259832) @@ -12,9 +12,6 @@ * 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. - * 3. Neither the name of MARVELL nor the names of contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 24 19:02:04 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACA964E5; Tue, 24 Dec 2013 19:02:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9902B1863; Tue, 24 Dec 2013 19:02:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBOJ24X7028463; Tue, 24 Dec 2013 19:02:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBOJ24PJ028462; Tue, 24 Dec 2013 19:02:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312241902.rBOJ24PJ028462@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Dec 2013 19:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259835 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 19:02:04 -0000 Author: jhb Date: Tue Dec 24 19:02:04 2013 New Revision: 259835 URL: http://svnweb.freebsd.org/changeset/base/259835 Log: MFC 258869: Fix an off-by-one error in r228960. The maximum priority delta provided by SCHED_PRI_TICKS should be SCHED_PRI_RANGE - 1 so that the resulting priority value (before nice adjustment) is between SCHED_PRI_MIN and SCHED_PRI_MAX, inclusive. Modified: stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Tue Dec 24 19:01:08 2013 (r259834) +++ stable/9/sys/kern/sched_ule.c Tue Dec 24 19:02:04 2013 (r259835) @@ -1499,7 +1499,7 @@ sched_priority(struct thread *td) pri = SCHED_PRI_MIN; if (td->td_sched->ts_ticks) pri += min(SCHED_PRI_TICKS(td->td_sched), - SCHED_PRI_RANGE); + SCHED_PRI_RANGE - 1); pri += SCHED_PRI_NICE(td->td_proc->p_nice); KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, ("sched_priority: invalid priority %d: nice %d, " From owner-svn-src-stable-9@FreeBSD.ORG Tue Dec 24 23:27:00 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EF4D310; Tue, 24 Dec 2013 23:27:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49F13190E; Tue, 24 Dec 2013 23:27:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBONR0EJ025199; Tue, 24 Dec 2013 23:27:00 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBONR05n025197; Tue, 24 Dec 2013 23:27:00 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201312242327.rBONR05n025197@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 24 Dec 2013 23:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259848 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 23:27:00 -0000 Author: ae Date: Tue Dec 24 23:26:59 2013 New Revision: 259848 URL: http://svnweb.freebsd.org/changeset/base/259848 Log: MFC r259520: Fix copy/paste typo. Modified: stable/9/sys/kern/kern_jail.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_jail.c ============================================================================== --- stable/9/sys/kern/kern_jail.c Tue Dec 24 23:23:44 2013 (r259847) +++ stable/9/sys/kern/kern_jail.c Tue Dec 24 23:26:59 2013 (r259848) @@ -3059,7 +3059,7 @@ prison_restrict_ip6(struct prison *pr, s ii++; continue; } - switch (ij >= ppr->pr_ip4s ? -1 : + switch (ij >= ppr->pr_ip6s ? -1 : qcmp_v6(&pr->pr_ip6[ii], &ppr->pr_ip6[ij])) { case -1: bcopy(pr->pr_ip6 + ii + 1, pr->pr_ip6 + ii, From owner-svn-src-stable-9@FreeBSD.ORG Wed Dec 25 00:40:43 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C0352CE; Wed, 25 Dec 2013 00:40:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 474FF1EEA; Wed, 25 Dec 2013 00:40:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP0eh73051948; Wed, 25 Dec 2013 00:40:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP0eh7H051947; Wed, 25 Dec 2013 00:40:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312250040.rBP0eh7H051947@svn.freebsd.org> From: Dimitry Andric Date: Wed, 25 Dec 2013 00:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259851 - in stable: 10/gnu/lib/csu 9/gnu/lib/csu X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:40:43 -0000 Author: dim Date: Wed Dec 25 00:40:42 2013 New Revision: 259851 URL: http://svnweb.freebsd.org/changeset/base/259851 Log: MFC r259720: For gnu/lib/csu, only use gcc-specific flags when compiling with gcc. Modified: stable/9/gnu/lib/csu/Makefile Directory Properties: stable/9/gnu/lib/csu/ (props changed) Changes in other areas also in this revision: Modified: stable/10/gnu/lib/csu/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/gnu/lib/csu/Makefile ============================================================================== --- stable/9/gnu/lib/csu/Makefile Wed Dec 25 00:39:04 2013 (r259850) +++ stable/9/gnu/lib/csu/Makefile Wed Dec 25 00:40:42 2013 (r259851) @@ -15,10 +15,12 @@ OBJS= crtbegin.o crtend.o crtbeginT.o SOBJS= crtbegin.So crtend.So CSTD?= gnu89 CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -CFLAGS+= -finhibit-size-directive -fno-inline-functions \ - -fno-exceptions -fno-zero-initialized-in-bss \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder \ - -fno-asynchronous-unwind-tables -fno-omit-frame-pointer +.if ${COMPILER_TYPE} == "gcc" +CFLAGS+= -finhibit-size-directive -fno-toplevel-reorder +.endif +CFLAGS+= -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \ + -fno-omit-frame-pointer CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \ -I${CCDIR}/cc_tools CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} From owner-svn-src-stable-9@FreeBSD.ORG Wed Dec 25 00:48:09 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35E34575; Wed, 25 Dec 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 204841F11; Wed, 25 Dec 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP0m8Vm055349; Wed, 25 Dec 2013 00:48:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP0m8MR055348; Wed, 25 Dec 2013 00:48:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312250048.rBP0m8MR055348@svn.freebsd.org> From: Dimitry Andric Date: Wed, 25 Dec 2013 00:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259852 - in stable: 10/contrib/file 8/contrib/file 9/contrib/file X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 00:48:09 -0000 Author: dim Date: Wed Dec 25 00:48:08 2013 New Revision: 259852 URL: http://svnweb.freebsd.org/changeset/base/259852 Log: MFC r259724: Apply upstream commit 33312fd828e59c78ae4ee30fd70d0ca109748cf0 (by zoulasc) to contrib/file: don't write a char to a pointer. Modified: stable/9/contrib/file/compress.c Directory Properties: stable/9/contrib/file/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/file/compress.c stable/8/contrib/file/compress.c Directory Properties: stable/10/ (props changed) stable/8/contrib/file/ (props changed) Modified: stable/9/contrib/file/compress.c ============================================================================== --- stable/9/contrib/file/compress.c Wed Dec 25 00:40:42 2013 (r259851) +++ stable/9/contrib/file/compress.c Wed Dec 25 00:48:08 2013 (r259852) @@ -480,7 +480,7 @@ uncompressbuf(struct magic_set *ms, int #endif free(*newch); n = 0; - newch[0] = '\0'; + *newch = NULL; goto err; } else { n = r; From owner-svn-src-stable-9@FreeBSD.ORG Wed Dec 25 06:09:32 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74AE3A10; Wed, 25 Dec 2013 06:09:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6012214DF; Wed, 25 Dec 2013 06:09:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBP69WMK073759; Wed, 25 Dec 2013 06:09:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBP69WoR073758; Wed, 25 Dec 2013 06:09:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312250609.rBP69WoR073758@svn.freebsd.org> From: Glen Barber Date: Wed, 25 Dec 2013 06:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259862 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 06:09:32 -0000 Author: gjb Date: Wed Dec 25 06:09:31 2013 New Revision: 259862 URL: http://svnweb.freebsd.org/changeset/base/259862 Log: MFC r259729: Bootstrap etcupdate(8) as part of the release build, similar to what is done for mergemaster(8). This allows etcupdate(8) to work out-of-box after the first upgrade of a system. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/Makefile Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Wed Dec 25 06:09:07 2013 (r259861) +++ stable/9/release/Makefile Wed Dec 25 06:09:31 2013 (r259862) @@ -103,6 +103,8 @@ base.txz: # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base" + etcupdate extract -B -M "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" \ + -d "${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate" # Package all components cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} mv ${DISTDIR}/*.txz . From owner-svn-src-stable-9@FreeBSD.ORG Wed Dec 25 22:00:28 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88DD140E; Wed, 25 Dec 2013 22:00:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7255A16D3; Wed, 25 Dec 2013 22:00:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPM0SWH029883; Wed, 25 Dec 2013 22:00:28 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPM0QJ2029862; Wed, 25 Dec 2013 22:00:26 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312252200.rBPM0QJ2029862@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 25 Dec 2013 22:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259891 - in stable/9/contrib: gcc gcc/doc gcclibs/libcpp gcclibs/libcpp/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 22:00:28 -0000 Author: pfg Date: Wed Dec 25 22:00:25 2013 New Revision: 259891 URL: http://svnweb.freebsd.org/changeset/base/259891 Log: MFC r258826, r259555, r 259558: libcpp: Merge fixes from upstream Fixes: GCC preprocessor/29966: GCC preprocessor/28709: GCC c/31924 GCC preprocessor/14331 gcc: add Apple-compatible -Wnewline-eof Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730, 125212, 125255 ; GPLv2) Apple Inc. (Apple GCC 4.2 - 5531) Added: stable/9/contrib/gcclibs/libcpp/ChangeLog.apple - copied unchanged from r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple Modified: stable/9/contrib/gcc/c-opts.c stable/9/contrib/gcc/c.opt stable/9/contrib/gcc/doc/invoke.texi stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 stable/9/contrib/gcclibs/libcpp/charset.c stable/9/contrib/gcclibs/libcpp/expr.c stable/9/contrib/gcclibs/libcpp/include/cpplib.h stable/9/contrib/gcclibs/libcpp/init.c stable/9/contrib/gcclibs/libcpp/lex.c stable/9/contrib/gcclibs/libcpp/macro.c stable/9/contrib/gcclibs/libcpp/pch.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) stable/9/contrib/gcclibs/ (props changed) Modified: stable/9/contrib/gcc/c-opts.c ============================================================================== --- stable/9/contrib/gcc/c-opts.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcc/c-opts.c Wed Dec 25 22:00:25 2013 (r259891) @@ -487,6 +487,12 @@ c_common_handle_option (size_t scode, co cpp_opts->warn_multichar = value; break; + /* APPLE LOCAL begin -Wnewline-eof */ + case OPT_Wnewline_eof: + cpp_opts->warn_newline_at_eof = value; + break; + /* APPLE LOCAL end -Wnewline-eof */ + case OPT_Wnormalized_: if (!value || (arg && strcasecmp (arg, "none") == 0)) cpp_opts->warn_normalize = normalized_none; Modified: stable/9/contrib/gcc/c.opt ============================================================================== --- stable/9/contrib/gcc/c.opt Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcc/c.opt Wed Dec 25 22:00:25 2013 (r259891) @@ -292,6 +292,12 @@ Wnested-externs C ObjC Var(warn_nested_externs) Warn about \"extern\" declarations not at file scope +; APPLE LOCAL begin -Wnewline-eof +Wnewline-eof +C ObjC C++ ObjC++ +Warn about files missing a newline at the end of the file +; APPLE LOCAL end -Wnewline-eof + Wnon-template-friend C++ ObjC++ Var(warn_nontemplate_friend) Init(1) Warn when non-templatized friend functions are declared within a template Modified: stable/9/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/9/contrib/gcc/doc/invoke.texi Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcc/doc/invoke.texi Wed Dec 25 22:00:25 2013 (r259891) @@ -169,6 +169,8 @@ in the following sections. -trigraphs -no-integrated-cpp -traditional -traditional-cpp @gol -fallow-single-precision -fcond-mismatch @gol -fsigned-bitfields -fsigned-char @gol +@c APPLE LOCAL -Wnewline-eof 2001-08-23 --sts ** +-Wnewline-eof (Apple compatible) @gol -funsigned-bitfields -funsigned-char} @item C++ Language Options @@ -2041,6 +2043,12 @@ Inhibit all warning messages. @opindex Wno-import Inhibit warning messages about the use of @samp{#import}. +@c APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts ** +@item -Wnewline-eof +@opindex Wnewline-eof +Warn about files missing a newline at the end of the file. (Apple compatible) +@c APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts ** + @item -Wchar-subscripts @opindex Wchar-subscripts Warn if an array subscript has type @code{char}. This is a common cause Copied: stable/9/contrib/gcclibs/libcpp/ChangeLog.apple (from r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/gcclibs/libcpp/ChangeLog.apple Wed Dec 25 22:00:25 2013 (r259891, copy of r259555, head/contrib/gcclibs/libcpp/ChangeLog.apple) @@ -0,0 +1,9 @@ +2008-08-04 Bill Wendling + + Radar 6121572 + * charset.c (_cpp_convert_input): Don't read to.text[-1]. + +2005-02-17 Devang Patel + + Radar 3958387 + * libcpp/lex.c (_cpp_get_fresh_line): Check warn_newline_at_eof. Modified: stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 Wed Dec 25 22:00:25 2013 (r259891) @@ -7,6 +7,11 @@ * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed binary integer constants. +2007-05-31 Dave Korn (r125212) + + PR preprocessor/14331 + * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. + 2007-05-21 Ian Lance Taylor (r124929) * internal.h (struct cpp_reader): Add new fields: @@ -23,6 +28,29 @@ (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and pfile->nonexistent_file_ob. +2007-05-14 Janis Johnson (r124731) + + PR c/31924 + * expr.c (interpret_float_suffix): Check for invalid suffix. + +2007-05-02 Eric Christopher (r124358) + + * expr.c (num_div_op): Don't overflow if the result is + zero. + +2007-05-02 Tom Tromey (r124356) + + PR preprocessor/28709: + * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. + +2007-01-30 Tom Tromey (r121340) + + PR preprocessor/29966: + * macro.c (lex_expansion_token): Save and restore cpp_reader's + cur_token. + (_cpp_create_definition): Don't restore cur_token here. + * lex.c (_cpp_lex_token): Added assertion. + 2006-12-29 Ian Lance Taylor (r120263) * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't Modified: stable/9/contrib/gcclibs/libcpp/charset.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/charset.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/charset.c Wed Dec 25 22:00:25 2013 (r259891) @@ -1628,6 +1628,7 @@ _cpp_convert_input (cpp_reader *pfile, c terminate with another \r, not an \n, so that we do not mistake the \r\n sequence for a single DOS line ending and erroneously issue the "No newline at end of file" diagnostic. */ + /* APPLE LOCAL don't access to.text[-1] radar 6121572 */ if (to.len > 0 && to.text[to.len - 1] == '\r') to.text[to.len] = '\r'; else Modified: stable/9/contrib/gcclibs/libcpp/expr.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/expr.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/expr.c Wed Dec 25 22:00:25 2013 (r259891) @@ -87,16 +87,19 @@ interpret_float_suffix (const uchar *s, while (len--) switch (s[len]) { - case 'f': case 'F': f++; break; - case 'l': case 'L': l++; break; - case 'i': case 'I': - case 'j': case 'J': i++; break; - case 'd': case 'D': - /* Disallow fd, ld suffixes. */ - if (d && (f || l)) + case 'f': case 'F': + if (d > 0) + return 0; + f++; + break; + case 'l': case 'L': + if (d > 0) return 0; - d++; + l++; break; + case 'i': case 'I': + case 'j': case 'J': i++; break; + case 'd': case 'D': d++; break; default: return 0; } @@ -494,7 +497,7 @@ append_digit (cpp_num num, int digit, in if (add_low + digit < add_low) add_high++; add_low += digit; - + if (result.low + add_low < result.low) add_high++; if (result.high + add_high < result.high) @@ -1580,7 +1583,8 @@ num_div_op (cpp_reader *pfile, cpp_num l { if (negate) result = num_negate (result, precision); - result.overflow = num_positive (result, precision) ^ !negate; + result.overflow = (num_positive (result, precision) ^ !negate + && !num_zerop (result)); } return result; Modified: stable/9/contrib/gcclibs/libcpp/include/cpplib.h ============================================================================== --- stable/9/contrib/gcclibs/libcpp/include/cpplib.h Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/include/cpplib.h Wed Dec 25 22:00:25 2013 (r259891) @@ -320,6 +320,11 @@ struct cpp_options /* Nonzero means warn if there are any trigraphs. */ unsigned char warn_trigraphs; + /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */ + /* Nonzero means warn if no newline at end of file. */ + unsigned char warn_newline_at_eof; + /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */ + /* Nonzero means warn about multicharacter charconsts. */ unsigned char warn_multichar; Modified: stable/9/contrib/gcclibs/libcpp/init.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/init.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/init.c Wed Dec 25 22:00:25 2013 (r259891) @@ -146,6 +146,10 @@ cpp_create_reader (enum c_lang lang, has pfile = XCNEW (cpp_reader); cpp_set_lang (pfile, lang); + /* APPLE LOCAL begin -Wnewline-eof 2001-08-23 --sts */ + /* Suppress warnings about missing newlines at ends of files. */ + CPP_OPTION (pfile, warn_newline_at_eof) = 0; + /* APPLE LOCAL end -Wnewline-eof 2001-08-23 --sts */ CPP_OPTION (pfile, warn_multichar) = 1; CPP_OPTION (pfile, discard_comments) = 1; CPP_OPTION (pfile, discard_comments_in_macro_exp) = 1; Modified: stable/9/contrib/gcclibs/libcpp/lex.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/lex.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/lex.c Wed Dec 25 22:00:25 2013 (r259891) @@ -766,6 +766,11 @@ _cpp_lex_token (cpp_reader *pfile) pfile->cur_run = next_tokenrun (pfile->cur_run); pfile->cur_token = pfile->cur_run->base; } + /* We assume that the current token is somewhere in the current + run. */ + if (pfile->cur_token < pfile->cur_run->base + || pfile->cur_token >= pfile->cur_run->limit) + abort (); if (pfile->lookaheads) { @@ -847,11 +852,16 @@ _cpp_get_fresh_line (cpp_reader *pfile) && buffer->next_line > buffer->rlimit && !buffer->from_stage3) { - /* Only warn once. */ + /* Clip to buffer size. */ buffer->next_line = buffer->rlimit; - cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, - CPP_BUF_COLUMN (buffer, buffer->cur), - "no newline at end of file"); + /* APPLE LOCAL begin suppress no newline warning. */ + if ( CPP_OPTION (pfile, warn_newline_at_eof)) + { + cpp_error_with_line (pfile, CPP_DL_PEDWARN, pfile->line_table->highest_line, + CPP_BUF_COLUMN (buffer, buffer->cur), + "no newline at end of file"); + } + /* APPLE LOCAL end suppress no newline warning. */ } return_at_eof = buffer->return_at_eof; Modified: stable/9/contrib/gcclibs/libcpp/macro.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/macro.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/macro.c Wed Dec 25 22:00:25 2013 (r259891) @@ -1,6 +1,7 @@ /* Part of CPP library. (Macro and #define handling.) Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -438,19 +439,18 @@ static bool paste_tokens (cpp_reader *pfile, const cpp_token **plhs, const cpp_token *rhs) { unsigned char *buf, *end, *lhsend; - const cpp_token *lhs; + cpp_token *lhs; unsigned int len; - lhs = *plhs; - len = cpp_token_len (lhs) + cpp_token_len (rhs) + 1; + len = cpp_token_len (*plhs) + cpp_token_len (rhs) + 1; buf = (unsigned char *) alloca (len); - end = lhsend = cpp_spell_token (pfile, lhs, buf, false); + end = lhsend = cpp_spell_token (pfile, *plhs, buf, false); /* Avoid comment headers, since they are still processed in stage 3. It is simpler to insert a space here, rather than modifying the lexer to ignore comments in some circumstances. Simply returning false doesn't work, since we want to clear the PASTE_LEFT flag. */ - if (lhs->type == CPP_DIV && rhs->type != CPP_EQ) + if ((*plhs)->type == CPP_DIV && rhs->type != CPP_EQ) *end++ = ' '; end = cpp_spell_token (pfile, rhs, end, false); *end = '\n'; @@ -460,13 +460,22 @@ paste_tokens (cpp_reader *pfile, const c /* Set pfile->cur_token as required by _cpp_lex_direct. */ pfile->cur_token = _cpp_temp_token (pfile); - *plhs = _cpp_lex_direct (pfile); + lhs = _cpp_lex_direct (pfile); if (pfile->buffer->cur != pfile->buffer->rlimit) { + source_location saved_loc = lhs->src_loc; + _cpp_pop_buffer (pfile); _cpp_backup_tokens (pfile, 1); *lhsend = '\0'; + /* We have to remove the PASTE_LEFT flag from the old lhs, but + we want to keep the new location. */ + *lhs = **plhs; + *plhs = lhs; + lhs->src_loc = saved_loc; + lhs->flags &= ~PASTE_LEFT; + /* Mandatory error for all apart from assembler. */ if (CPP_OPTION (pfile, lang) != CLK_ASM) cpp_error (pfile, CPP_DL_ERROR, @@ -475,6 +484,7 @@ paste_tokens (cpp_reader *pfile, const c return false; } + *plhs = lhs; _cpp_pop_buffer (pfile); return true; } @@ -1405,10 +1415,12 @@ alloc_expansion_token (cpp_reader *pfile static cpp_token * lex_expansion_token (cpp_reader *pfile, cpp_macro *macro) { - cpp_token *token; + cpp_token *token, *saved_cur_token; + saved_cur_token = pfile->cur_token; pfile->cur_token = alloc_expansion_token (pfile, macro); token = _cpp_lex_direct (pfile); + pfile->cur_token = saved_cur_token; /* Is this a parameter? */ if (token->type == CPP_NAME @@ -1597,18 +1609,12 @@ _cpp_create_definition (cpp_reader *pfil ok = _cpp_create_trad_definition (pfile, macro); else { - cpp_token *saved_cur_token = pfile->cur_token; - ok = create_iso_definition (pfile, macro); - /* Restore lexer position because of games lex_expansion_token() - plays lexing the macro. We set the type for SEEN_EOL() in - directives.c. + /* We set the type for SEEN_EOL() in directives.c. Longer term we should lex the whole line before coming here, and just copy the expansion. */ - saved_cur_token[-1].type = pfile->cur_token[-1].type; - pfile->cur_token = saved_cur_token; /* Stop the lexer accepting __VA_ARGS__. */ pfile->state.va_args_ok = 0; Modified: stable/9/contrib/gcclibs/libcpp/pch.c ============================================================================== --- stable/9/contrib/gcclibs/libcpp/pch.c Wed Dec 25 21:59:56 2013 (r259890) +++ stable/9/contrib/gcclibs/libcpp/pch.c Wed Dec 25 22:00:25 2013 (r259891) @@ -35,14 +35,14 @@ static int write_defs (cpp_reader *, cpp static int save_macros (cpp_reader *, cpp_hashnode *, void *); /* This structure represents a macro definition on disk. */ -struct macrodef_struct +struct macrodef_struct { unsigned int definition_length; unsigned short name_length; unsigned short flags; }; -/* This is how we write out a macro definition. +/* This is how we write out a macro definition. Suitable for being called by cpp_forall_identifiers. */ static int @@ -54,7 +54,7 @@ write_macdef (cpp_reader *pfile, cpp_has case NT_VOID: if (! (hn->flags & NODE_POISONED)) return 1; - + case NT_MACRO: if ((hn->flags & NODE_BUILTIN)) return 1; @@ -76,7 +76,7 @@ write_macdef (cpp_reader *pfile, cpp_has defn = NODE_NAME (hn); s.definition_length = s.name_length; } - + if (fwrite (&s, sizeof (s), 1, f) != 1 || fwrite (defn, 1, s.definition_length, f) != s.definition_length) { @@ -86,7 +86,7 @@ write_macdef (cpp_reader *pfile, cpp_has } } return 1; - + case NT_ASSERTION: /* Not currently implemented. */ return 1; @@ -123,7 +123,7 @@ static int save_idents (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + if (hn->type != NT_VOID) { struct cpp_string news; @@ -136,7 +136,7 @@ save_idents (cpp_reader *pfile ATTRIBUTE { struct cpp_string *sp; unsigned char *text; - + sp = XNEW (struct cpp_string); *slot = sp; @@ -157,7 +157,7 @@ hashmem (const void *p_p, size_t sz) const unsigned char *p = (const unsigned char *)p_p; size_t i; hashval_t h; - + h = 0; for (i = 0; i < sz; i++) h = h * 67 - (*p++ - 113); @@ -194,10 +194,10 @@ cpp_save_state (cpp_reader *r, FILE *f) { /* Save the list of non-void identifiers for the dependency checking. */ r->savedstate = XNEW (struct cpp_savedstate); - r->savedstate->definedhash = htab_create (100, cpp_string_hash, + r->savedstate->definedhash = htab_create (100, cpp_string_hash, cpp_string_eq, NULL); cpp_forall_identifiers (r, save_idents, r->savedstate); - + /* Write out the list of defined identifiers. */ cpp_forall_identifiers (r, write_macdef, f); @@ -210,20 +210,20 @@ static int count_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -249,20 +249,20 @@ static int write_defs (cpp_reader *pfile ATTRIBUTE_UNUSED, cpp_hashnode *hn, void *ss_p) { struct cpp_savedstate *const ss = (struct cpp_savedstate *)ss_p; - + switch (hn->type) { case NT_MACRO: if (hn->flags & NODE_BUILTIN) return 1; - + /* else fall through. */ case NT_VOID: { struct cpp_string news; void **slot; - + news.len = NODE_LEN (hn); news.text = NODE_NAME (hn); slot = (void **) htab_find (ss->definedhash, &news); @@ -303,7 +303,7 @@ cpp_write_pch_deps (cpp_reader *r, FILE struct cpp_savedstate *const ss = r->savedstate; unsigned char *definedstrs; size_t i; - + /* Collect the list of identifiers which have been seen and weren't defined to anything previously. */ ss->hashsize = 0; @@ -404,7 +404,7 @@ collect_ht_nodes (cpp_reader *pfile ATTR with the preprocessor's current definitions. It will be consistent when: - - anything that was defined just before the PCH was generated + - anything that was defined just before the PCH was generated is defined the same way now; and - anything that was not defined then, but is defined now, was not used by the PCH. @@ -430,10 +430,10 @@ cpp_valid_state (cpp_reader *r, const ch { cpp_hashnode *h; const unsigned char *newdefn; - + if (read (fd, &m, sizeof (m)) != sizeof (m)) goto error; - + if (m.name_length == 0) break; @@ -453,10 +453,10 @@ cpp_valid_state (cpp_reader *r, const ch namebuf = XNEWVEC (unsigned char, namebufsz); } - if ((size_t)read (fd, namebuf, m.definition_length) + if ((size_t)read (fd, namebuf, m.definition_length) != m.definition_length) goto error; - + h = cpp_lookup (r, namebuf, m.name_length); if (m.flags & NODE_POISONED || h->type != NT_MACRO @@ -470,7 +470,7 @@ cpp_valid_state (cpp_reader *r, const ch } newdefn = cpp_macro_definition (r, h); - + if (m.definition_length != ustrlen (newdefn) || memcmp (namebuf, newdefn, m.definition_length) != 0) { @@ -498,17 +498,17 @@ cpp_valid_state (cpp_reader *r, const ch nl.defs = XNEWVEC (cpp_hashnode *, nl.asize); cpp_forall_identifiers (r, &collect_ht_nodes, &nl); qsort (nl.defs, nl.n_defs, sizeof (cpp_hashnode *), &comp_hashnodes); - + /* Loop through nl.defs and undeftab, both of which are sorted lists. There should be no matches. */ first = undeftab; last = undeftab + m.definition_length; i = 0; - + while (first < last && i < nl.n_defs) { int cmp = ustrcmp (first, NODE_NAME (nl.defs[i])); - + if (cmp < 0) first += ustrlen (first) + 1; else if (cmp > 0) @@ -516,13 +516,13 @@ cpp_valid_state (cpp_reader *r, const ch else { if (CPP_OPTION (r, warn_invalid_pch)) - cpp_error (r, CPP_DL_WARNING_SYSHDR, + cpp_error (r, CPP_DL_WARNING_SYSHDR, "%s: not used because `%s' is defined", name, first); goto fail; } } - + free(nl.defs); free (undeftab); @@ -545,7 +545,7 @@ cpp_valid_state (cpp_reader *r, const ch /* Save all the existing macros. */ -struct save_macro_data +struct save_macro_data { uchar **defns; size_t count; @@ -567,7 +567,7 @@ struct save_macro_data file were not saved in this way, but this is not done (yet), except for builtins, and for #assert by default. */ -static int +static int save_macros (cpp_reader *r, cpp_hashnode *h, void *data_p) { struct save_macro_data *data = (struct save_macro_data *)data_p; @@ -577,9 +577,9 @@ save_macros (cpp_reader *r, cpp_hashnode if (data->count == data->array_size) { data->array_size *= 2; - data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); + data->defns = XRESIZEVEC (uchar *, data->defns, (data->array_size)); } - + switch (h->type) { case NT_ASSERTION: @@ -596,7 +596,7 @@ save_macros (cpp_reader *r, cpp_hashnode data->defns[data->count][defnlen] = '\n'; } break; - + default: abort (); } @@ -612,7 +612,7 @@ void cpp_prepare_state (cpp_reader *r, struct save_macro_data **data) { struct save_macro_data *d = XNEW (struct save_macro_data); - + d->array_size = 512; d->defns = XNEWVEC (uchar *, d->array_size); d->count = 0; @@ -622,7 +622,7 @@ cpp_prepare_state (cpp_reader *r, struct } /* Given a precompiled header that was previously determined to be valid, - apply all its definitions (and undefinitions) to the current state. + apply all its definitions (and undefinitions) to the current state. DEPNAME is passed to deps_restore. */ int @@ -632,7 +632,7 @@ cpp_read_state (cpp_reader *r, const cha size_t i; struct lexer_state old_state; - /* Restore spec_nodes, which will be full of references to the old + /* Restore spec_nodes, which will be full of references to the old hashtable entries and so will now be invalid. */ { struct spec_nodes *s = &r->spec_nodes; @@ -691,7 +691,7 @@ cpp_read_state (cpp_reader *r, const cha goto error; return 0; - + error: cpp_errno (r, CPP_DL_ERROR, "while reading precompiled header"); return -1; From owner-svn-src-stable-9@FreeBSD.ORG Wed Dec 25 22:32:54 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92FD3C1A; Wed, 25 Dec 2013 22:32:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72AF41898; Wed, 25 Dec 2013 22:32:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPMWsF5042445; Wed, 25 Dec 2013 22:32:54 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPMWrRU042439; Wed, 25 Dec 2013 22:32:53 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312252232.rBPMWrRU042439@svn.freebsd.org> From: Mark Johnston Date: Wed, 25 Dec 2013 22:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259894 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 22:32:54 -0000 Author: markj Date: Wed Dec 25 22:32:52 2013 New Revision: 259894 URL: http://svnweb.freebsd.org/changeset/base/259894 Log: MFC r256661 r257222 r257235 r257248 r257298. MFC r256661: Fix the libproc build when DEBUG is defined. MFC r257222: Clean up the debug printing in libproc a bit. In particular: * Don't print any error messages to stderr unless DEBUG is defined. * Add a DPRINTFX macro for use when errno isn't set. * Print the error string from libelf when appropriate. MFC r257235: Remove an incorrect debug printf. MFC r257248: Fix the build with gcc. MFC r257298: Revert r257248 and fix the problem in a way that doesn't violate style(9). Modified: stable/9/lib/libproc/_libproc.h stable/9/lib/libproc/proc_bkpt.c stable/9/lib/libproc/proc_create.c stable/9/lib/libproc/proc_regs.c stable/9/lib/libproc/proc_sym.c stable/9/lib/libproc/proc_util.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/_libproc.h ============================================================================== --- stable/9/lib/libproc/_libproc.h Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/_libproc.h Wed Dec 25 22:32:52 2013 (r259894) @@ -49,7 +49,9 @@ struct proc_handle { }; #ifdef DEBUG -#define DPRINTF(fmt, ...) warn(fmt, __VA_ARGS__) +#define DPRINTF(...) warn(__VA_ARGS__) +#define DPRINTFX(...) warnx(__VA_ARGS__) #else -#define DPRINTF(fmt, ...) +#define DPRINTF(...) do { } while (0) +#define DPRINTFX(...) do { } while (0) #endif Modified: stable/9/lib/libproc/proc_bkpt.c ============================================================================== --- stable/9/lib/libproc/proc_bkpt.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_bkpt.c Wed Dec 25 22:32:52 2013 (r259894) @@ -72,8 +72,8 @@ proc_bkptset(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - DPRINTF("ERROR: couldn't read instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't read instruction at address 0x%" + PRIuPTR, address); return (-1); } *saved = paddr; @@ -87,8 +87,8 @@ proc_bkptset(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - warn("ERROR: couldn't write instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't write instruction at address 0x%" + PRIuPTR, address); return (-1); } @@ -107,7 +107,7 @@ proc_bkptdel(struct proc_handle *phdl, u errno = ENOENT; return (-1); } - DPRINTF("removing breakpoint at 0x%lx\n", address); + DPRINTFX("removing breakpoint at 0x%lx\n", address); /* * Overwrite the breakpoint instruction that we setup previously. */ @@ -118,8 +118,8 @@ proc_bkptdel(struct proc_handle *phdl, u piod.piod_addr = &paddr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { - DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, - address); + DPRINTF("ERROR: couldn't write instruction at address 0x%" + PRIuPTR, address); return (-1); } @@ -147,12 +147,12 @@ proc_bkptexec(struct proc_handle *phdl, int status; if (proc_regget(phdl, REG_PC, &pc) < 0) { - warn("ERROR: couldn't get PC register"); + DPRINTFX("ERROR: couldn't get PC register"); return (-1); } proc_bkptregadj(&pc); if (proc_bkptdel(phdl, pc, saved) < 0) { - warn("ERROR: couldn't delete breakpoint"); + DPRINTFX("ERROR: couldn't delete breakpoint"); return (-1); } /* @@ -161,13 +161,13 @@ proc_bkptexec(struct proc_handle *phdl, */ proc_regset(phdl, REG_PC, pc); if (ptrace(PT_STEP, proc_getpid(phdl), (caddr_t)1, 0) < 0) { - warn("ERROR: ptrace step failed"); + DPRINTFX("ERROR: ptrace step failed"); return (-1); } proc_wstatus(phdl); status = proc_getwstat(phdl); if (!WIFSTOPPED(status)) { - warn("ERROR: don't know why process stopped"); + DPRINTFX("ERROR: don't know why process stopped"); return (-1); } /* @@ -175,7 +175,7 @@ proc_bkptexec(struct proc_handle *phdl, * the same as the one that we were passed in. */ if (proc_bkptset(phdl, pc, &samesaved) < 0) { - warn("ERROR: couldn't restore breakpoint"); + DPRINTFX("ERROR: couldn't restore breakpoint"); return (-1); } assert(samesaved == saved); Modified: stable/9/lib/libproc/proc_create.c ============================================================================== --- stable/9/lib/libproc/proc_create.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_create.c Wed Dec 25 22:32:52 2013 (r259894) @@ -75,7 +75,7 @@ proc_attach(pid_t pid, int flags, struct /* Check for an unexpected status. */ if (WIFSTOPPED(status) == 0) - DPRINTF("ERROR: child process %d status 0x%x", pid, status); + DPRINTFX("ERROR: child process %d status 0x%x", pid, status); else phdl->status = PS_STOP; @@ -130,14 +130,14 @@ proc_create(const char *file, char * con /* Wait for the child process to stop. */ if (waitpid(pid, &status, WUNTRACED) == -1) { error = errno; - DPRINTF("ERROR: child process %d didn't stop as expected", pid); + DPRINTF("ERROR: child process %d didn't stop as expected", pid); goto bad; } /* Check for an unexpected status. */ if (WIFSTOPPED(status) == 0) { error = errno; - DPRINTF("ERROR: child process %d status 0x%x", pid, status); + DPRINTFX("ERROR: child process %d status 0x%x", pid, status); goto bad; } else phdl->status = PS_STOP; Modified: stable/9/lib/libproc/proc_regs.c ============================================================================== --- stable/9/lib/libproc/proc_regs.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_regs.c Wed Dec 25 22:32:52 2013 (r259894) @@ -68,7 +68,7 @@ proc_regget(struct proc_handle *phdl, pr #endif break; default: - warn("ERROR: no support for reg number %d", reg); + DPRINTFX("ERROR: no support for reg number %d", reg); return (-1); } @@ -103,7 +103,7 @@ proc_regset(struct proc_handle *phdl, pr #endif break; default: - warn("ERROR: no support for reg number %d", reg); + DPRINTFX("ERROR: no support for reg number %d", reg); return (-1); } if (ptrace(PT_SETREGS, proc_getpid(phdl), (caddr_t)®s, 0) < 0) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_sym.c Wed Dec 25 22:32:52 2013 (r259894) @@ -216,16 +216,16 @@ proc_addr2sym(struct proc_handle *p, uin if ((map = proc_addr2map(p, addr)) == NULL) return (-1); - if (!map->pr_mapname || (fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { - warn("ERROR: open %s failed", map->pr_mapname); + if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { + DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } if (gelf_getehdr(e, &ehdr) == NULL) { - warn("ERROR: gelf_getehdr() failed"); + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); goto err2; } /* @@ -253,7 +253,7 @@ proc_addr2sym(struct proc_handle *p, uin * Then look up the string name in STRTAB (.dynstr) */ if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; } i = 0; @@ -286,7 +286,7 @@ proc_addr2sym(struct proc_handle *p, uin if (symtabscn == NULL) goto err2; if ((data = elf_getdata(symtabscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; } i = 0; @@ -391,7 +391,7 @@ proc_name2sym(struct proc_handle *p, con unsigned long symtabstridx = 0, dynsymstridx = 0; if ((map = proc_name2map(p, object)) == NULL) { - DPRINTF("ERROR: couldn't find object %s", object); + DPRINTFX("ERROR: couldn't find object %s", object); goto err0; } if ((fd = open(map->pr_mapname, O_RDONLY, 0)) < 0) { @@ -399,11 +399,11 @@ proc_name2sym(struct proc_handle *p, con goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } if (gelf_getehdr(e, &ehdr) == NULL) { - warn("ERROR: gelf_getehdr() failed"); + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); goto err2; } /* @@ -431,7 +431,6 @@ proc_name2sym(struct proc_handle *p, con * Then look up the string name in STRTAB (.dynstr) */ if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); goto err2; } i = 0; @@ -493,11 +492,11 @@ proc_iter_symbyaddr(struct proc_handle * if ((map = proc_name2map(p, object)) == NULL) return (-1); if ((fd = open(map->pr_mapname, O_RDONLY)) < 0) { - warn("ERROR: open %s failed", map->pr_mapname); + DPRINTF("ERROR: open %s failed", map->pr_mapname); goto err0; } if ((e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { - warn("ERROR: elf_begin() failed"); + DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } /* @@ -520,7 +519,7 @@ proc_iter_symbyaddr(struct proc_handle * return (-1); stridx = shdr.sh_link; if ((data = elf_getdata(foundscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); + DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; } i = 0; Modified: stable/9/lib/libproc/proc_util.c ============================================================================== --- stable/9/lib/libproc/proc_util.c Wed Dec 25 22:32:34 2013 (r259893) +++ stable/9/lib/libproc/proc_util.c Wed Dec 25 22:32:52 2013 (r259894) @@ -146,7 +146,7 @@ proc_wstatus(struct proc_handle *phdl) return (-1); if (waitpid(phdl->pid, &status, WUNTRACED) < 0) { if (errno != EINTR) - warn("waitpid"); + DPRINTF("waitpid"); return (-1); } if (WIFSTOPPED(status)) From owner-svn-src-stable-9@FreeBSD.ORG Thu Dec 26 00:02:16 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD29D4BF; Thu, 26 Dec 2013 00:02:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 990AC1ED1; Thu, 26 Dec 2013 00:02:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ02GTK077444; Thu, 26 Dec 2013 00:02:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ02GGG077443; Thu, 26 Dec 2013 00:02:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201312260002.rBQ02GGG077443@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 26 Dec 2013 00:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259900 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 00:02:16 -0000 Author: bz Date: Thu Dec 26 00:02:16 2013 New Revision: 259900 URL: http://svnweb.freebsd.org/changeset/base/259900 Log: MFC r255792: Update comment from draft to RFC number. Submitted by: Loganaden Velvindron (logan elandsys.com) Modified: stable/9/sys/netinet6/frag6.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/frag6.c ============================================================================== --- stable/9/sys/netinet6/frag6.c Wed Dec 25 23:57:01 2013 (r259899) +++ stable/9/sys/netinet6/frag6.c Thu Dec 26 00:02:16 2013 (r259900) @@ -222,9 +222,8 @@ frag6_input(struct mbuf **mp, int *offp, offset += sizeof(struct ip6_frag); /* - * XXX-BZ RFC XXXX (draft-gont-6man-ipv6-atomic-fragments) - * Handle "atomic" fragments (offset and m bit set to 0) upfront, - * unrelated to any reassembly. Just skip the fragment header. + * RFC 6946: Handle "atomic" fragments (offset and m bit set to 0) + * upfront, unrelated to any reassembly. Just skip the fragment header. */ if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { /* XXX-BZ we want dedicated counters for this. */ From owner-svn-src-stable-9@FreeBSD.ORG Thu Dec 26 00:05:32 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 643717D7; Thu, 26 Dec 2013 00:05:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4FC501EF6; Thu, 26 Dec 2013 00:05:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ05W5n078459; Thu, 26 Dec 2013 00:05:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ05W5B078458; Thu, 26 Dec 2013 00:05:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201312260005.rBQ05W5B078458@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 26 Dec 2013 00:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259901 - stable/9/sys/dev/hwpmc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 00:05:32 -0000 Author: bz Date: Thu Dec 26 00:05:31 2013 New Revision: 259901 URL: http://svnweb.freebsd.org/changeset/base/259901 Log: MFC r254571: Correct a typo in the event mask mnemonic. Modified: stable/9/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/9/sys/dev/hwpmc/pmc_events.h Thu Dec 26 00:02:16 2013 (r259900) +++ stable/9/sys/dev/hwpmc/pmc_events.h Thu Dec 26 00:05:31 2013 (r259901) @@ -3174,7 +3174,7 @@ __PMC_EV_ALIAS("LOCK_CYCLES.SPLIT_LOCK_U IAP_EVENT_63H_01H) \ __PMC_EV_ALIAS("LOCK_CYCLES.CACHE_LOCK_DURATION", IAP_EVENT_63H_02H) \ __PMC_EV_ALIAS("IDQ.EMPTY", IAP_EVENT_79H_02H) \ -__PMC_EV_ALIAS("IQD.MITE_UOPS", IAP_EVENT_79H_04H) \ +__PMC_EV_ALIAS("IDQ.MITE_UOPS", IAP_EVENT_79H_04H) \ __PMC_EV_ALIAS("IDQ.DSB_UOPS", IAP_EVENT_79H_08H) \ __PMC_EV_ALIAS("IDQ.MS_DSB_UOPS", IAP_EVENT_79H_10H) \ __PMC_EV_ALIAS("IDQ.MS_MITE_UOPS", IAP_EVENT_79H_20H) \ From owner-svn-src-stable-9@FreeBSD.ORG Thu Dec 26 01:11:52 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53715E2C; Thu, 26 Dec 2013 01:11:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24FF5127C; Thu, 26 Dec 2013 01:11:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQ1BpiL004643; Thu, 26 Dec 2013 01:11:51 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQ1BppW004640; Thu, 26 Dec 2013 01:11:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312260111.rBQ1BppW004640@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 26 Dec 2013 01:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259903 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 01:11:52 -0000 Author: pfg Date: Thu Dec 26 01:11:51 2013 New Revision: 259903 URL: http://svnweb.freebsd.org/changeset/base/259903 Log: MFC r252397, r258904, r259780: Small ext2fs updates. Use the unsigned random() range in i_gen. Add two new reserved inodes. Make the hashing algorithm match the linux code. PR: kern/183230 Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h stable/9/sys/fs/ext2fs/ext2_hash.c stable/9/sys/fs/ext2fs/ext2_vfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dinode.h Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_dinode.h Thu Dec 26 01:11:51 2013 (r259903) @@ -44,6 +44,8 @@ #define EXT2_UNDELDIRINO ((ino_t)6) #define EXT2_RESIZEINO ((ino_t)7) #define EXT2_JOURNALINO ((ino_t)8) +#define EXT2_EXCLUDEINO ((ino_t)9) +#define EXT2_REPLICAINO ((ino_t)10) #define EXT2_FIRSTINO ((ino_t)11) /* Modified: stable/9/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_hash.c Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_hash.c Thu Dec 26 01:11:51 2013 (r259903) @@ -289,8 +289,8 @@ ext2_htree_hash(const char *name, int le len -= 32; name += 32; } - major = hash[0]; - minor = hash[1]; + major = hash[1]; + minor = hash[2]; break; default: goto error; Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Thu Dec 26 00:11:19 2013 (r259902) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Thu Dec 26 01:11:51 2013 (r259903) @@ -1006,7 +1006,7 @@ ext2_vget(struct mount *mp, ino_t ino, i * already have one. This should only happen on old filesystems. */ if (ip->i_gen == 0) { - ip->i_gen = random() / 2 + 1; + ip->i_gen = random() + 1; if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0) ip->i_flag |= IN_MODIFIED; } From owner-svn-src-stable-9@FreeBSD.ORG Thu Dec 26 10:45:18 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AC189C1; Thu, 26 Dec 2013 10:45:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA4801508; Thu, 26 Dec 2013 10:45:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQAjHGC021065; Thu, 26 Dec 2013 10:45:17 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQAjHMC021064; Thu, 26 Dec 2013 10:45:17 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <201312261045.rBQAjHMC021064@svn.freebsd.org> From: Doug Rabson Date: Thu, 26 Dec 2013 10:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259912 - stable/9/usr.bin/rpcgen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 10:45:18 -0000 Author: dfr Date: Thu Dec 26 10:45:17 2013 New Revision: 259912 URL: http://svnweb.freebsd.org/changeset/base/259912 Log: Generate client sample code which compiles without warnings. For 'rpcgen -a', generate a makefile where 'make clean all' works. Modified: stable/9/usr.bin/rpcgen/rpc_main.c Modified: stable/9/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/9/usr.bin/rpcgen/rpc_main.c Thu Dec 26 09:09:52 2013 (r259911) +++ stable/9/usr.bin/rpcgen/rpc_main.c Thu Dec 26 10:45:17 2013 (r259912) @@ -780,6 +780,8 @@ clnt_output(const char *infile, const ch free(include); } else f_print(fout, "#include \n"); + f_print(fout, "#include \n"); + f_print(fout, "#include \n"); tell = ftell(fout); while ( (def = get_definition()) ) { has_program += write_sample_clnt(def); @@ -867,6 +869,10 @@ $(TARGETS_SVC.c:%%.c=%%.o) "); f_print(fout, "all : $(CLIENT) $(SERVER)\n\n"); f_print(fout, "$(TARGETS) : $(SOURCES.x) \n"); f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n"); + if (allfiles) { + f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", clientname); + f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", servername); + } f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) \ $(TARGETS_CLNT.c) \n\n"); From owner-svn-src-stable-9@FreeBSD.ORG Thu Dec 26 11:31:36 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13CC6290 for ; Thu, 26 Dec 2013 11:31:36 +0000 (UTC) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCDD517E3 for ; Thu, 26 Dec 2013 11:31:35 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id bj1so8206847pad.2 for ; Thu, 26 Dec 2013 03:31:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=/5iRzjkuhDtPmfj//aG8AhAPwJNI9dRs30zNrTL6eAc=; b=D42Rn/LeV+45U1IrN9my9205FAlkL8zRSA5aRJf5GJPRdfsHfxf5hky9WVPcNTRaP5 xU8WPDpfLlMZ7XO+a8xsvbFEbmQQID0qS4OYuuzRgnO3j7FGcaC9XJ5C1b3ZUgfZD3fQ PU2gnq41xRwn/dKYo14Q+bCZfg2F6ui9y40hCr85zuMU+SDhq8JyR0ZpxcqjdbvzwM5p SNKESlR2zvO99xUlu+CVCRu3YAfaoehihyXJnCGgf9I2oeSjN7smy59rkcebP5wP5oMu vwSn8KWo9c2eRUZW/XOMmUcclWjL5DE8NHUkrVLKwvFmcDJ724Aoisz0MoyVCAe24Kjs /XzQ== X-Gm-Message-State: ALoCoQmBUq07hiNVWpHg35CtcLMfkfz4WJLo5dLYYl1bd/mvKaVJj3OrVzWaKLJO2q6aHKHbU3+K MIME-Version: 1.0 X-Received: by 10.66.248.227 with SMTP id yp3mr42930383pac.116.1388057489511; Thu, 26 Dec 2013 03:31:29 -0800 (PST) Received: by 10.70.35.197 with HTTP; Thu, 26 Dec 2013 03:31:29 -0800 (PST) In-Reply-To: <201312261045.rBQAjHMC021064@svn.freebsd.org> References: <201312261045.rBQAjHMC021064@svn.freebsd.org> Date: Thu, 26 Dec 2013 11:31:29 +0000 Message-ID: Subject: Re: svn commit: r259912 - stable/9/usr.bin/rpcgen From: Doug Rabson To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 11:31:36 -0000 Bah! This was intended for head - feel free to back it out if anything breaks. On 26 December 2013 10:45, Doug Rabson wrote: > Author: dfr > Date: Thu Dec 26 10:45:17 2013 > New Revision: 259912 > URL: http://svnweb.freebsd.org/changeset/base/259912 > > Log: > Generate client sample code which compiles without warnings. > For 'rpcgen -a', generate a makefile where 'make clean all' works. > > Modified: > stable/9/usr.bin/rpcgen/rpc_main.c > > Modified: stable/9/usr.bin/rpcgen/rpc_main.c > > ============================================================================== > --- stable/9/usr.bin/rpcgen/rpc_main.c Thu Dec 26 09:09:52 2013 > (r259911) > +++ stable/9/usr.bin/rpcgen/rpc_main.c Thu Dec 26 10:45:17 2013 > (r259912) > @@ -780,6 +780,8 @@ clnt_output(const char *infile, const ch > free(include); > } else > f_print(fout, "#include \n"); > + f_print(fout, "#include \n"); > + f_print(fout, "#include \n"); > tell = ftell(fout); > while ( (def = get_definition()) ) { > has_program += write_sample_clnt(def); > @@ -867,6 +869,10 @@ $(TARGETS_SVC.c:%%.c=%%.o) "); > f_print(fout, "all : $(CLIENT) $(SERVER)\n\n"); > f_print(fout, "$(TARGETS) : $(SOURCES.x) \n"); > f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n"); > + if (allfiles) { > + f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o > %s\n\n", clientname); > + f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o > %s\n\n", servername); > + } > f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) > $(SOURCES_CLNT.h) \ > $(TARGETS_CLNT.c) \n\n"); > > From owner-svn-src-stable-9@FreeBSD.ORG Thu Dec 26 16:58:30 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA129222; Thu, 26 Dec 2013 16:58:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D532810B8; Thu, 26 Dec 2013 16:58:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQGwUbX076870; Thu, 26 Dec 2013 16:58:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQGwUPZ076869; Thu, 26 Dec 2013 16:58:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201312261658.rBQGwUPZ076869@svn.freebsd.org> From: John Baldwin Date: Thu, 26 Dec 2013 16:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259918 - stable/9/sys/security/audit X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 16:58:31 -0000 Author: jhb Date: Thu Dec 26 16:58:30 2013 New Revision: 259918 URL: http://svnweb.freebsd.org/changeset/base/259918 Log: MFC 259014: There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }. Modified: stable/9/sys/security/audit/audit_bsm_klib.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/security/audit/audit_bsm_klib.c ============================================================================== --- stable/9/sys/security/audit/audit_bsm_klib.c Thu Dec 26 16:57:36 2013 (r259917) +++ stable/9/sys/security/audit/audit_bsm_klib.c Thu Dec 26 16:58:30 2013 (r259918) @@ -273,7 +273,6 @@ audit_ctlname_to_sysctlevent(int name[], case KERN_USRSTACK: case KERN_LOGSIGEXIT: case KERN_IOV_MAX: - case KERN_MAXID: return ((valid_arg & ARG_VALUE) ? AUE_SYSCTL : AUE_SYSCTL_NONADMIN); From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 27 11:16:01 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66669132; Fri, 27 Dec 2013 11:16:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C68671656; Fri, 27 Dec 2013 11:10:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRBAWna093383; Fri, 27 Dec 2013 11:10:32 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRBAWLR093382; Fri, 27 Dec 2013 11:10:32 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <201312271110.rBRBAWLR093382@svn.freebsd.org> From: Doug Rabson Date: Fri, 27 Dec 2013 11:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259941 - stable/9/usr.bin/rpcgen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 11:16:01 -0000 Author: dfr Date: Fri Dec 27 11:10:32 2013 New Revision: 259941 URL: http://svnweb.freebsd.org/changeset/base/259941 Log: Back out r259912 - it shouldn't have been committed to this branch. Modified: stable/9/usr.bin/rpcgen/rpc_main.c Modified: stable/9/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/9/usr.bin/rpcgen/rpc_main.c Fri Dec 27 08:06:23 2013 (r259940) +++ stable/9/usr.bin/rpcgen/rpc_main.c Fri Dec 27 11:10:32 2013 (r259941) @@ -780,8 +780,6 @@ clnt_output(const char *infile, const ch free(include); } else f_print(fout, "#include \n"); - f_print(fout, "#include \n"); - f_print(fout, "#include \n"); tell = ftell(fout); while ( (def = get_definition()) ) { has_program += write_sample_clnt(def); @@ -869,10 +867,6 @@ $(TARGETS_SVC.c:%%.c=%%.o) "); f_print(fout, "all : $(CLIENT) $(SERVER)\n\n"); f_print(fout, "$(TARGETS) : $(SOURCES.x) \n"); f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n"); - if (allfiles) { - f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", clientname); - f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", servername); - } f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) \ $(TARGETS_CLNT.c) \n\n"); From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 27 16:08:38 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F29EDA55; Fri, 27 Dec 2013 16:08:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCBB61A2C; Fri, 27 Dec 2013 16:08:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRG8buN004854; Fri, 27 Dec 2013 16:08:37 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRG8YLV004830; Fri, 27 Dec 2013 16:08:34 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312271608.rBRG8YLV004830@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 27 Dec 2013 16:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259948 - in stable/9/contrib/gcc: . config cp doc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 16:08:38 -0000 Author: pfg Date: Fri Dec 27 16:08:34 2013 New Revision: 259948 URL: http://svnweb.freebsd.org/changeset/base/259948 Log: gcc: Merge upstream changes. Include types in error message for build_binary_op. Mostly cosmetic changes, to reduce differences with Apple's gcc. Obtained from: gcc 4.3 (rev. 120611, 124839, 125239; GPLv2) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-common.h stable/9/contrib/gcc/c-typeck.c stable/9/contrib/gcc/config/darwin.h stable/9/contrib/gcc/cp/Make-lang.in stable/9/contrib/gcc/cp/mangle.c stable/9/contrib/gcc/cp/rtti.c stable/9/contrib/gcc/cp/typeck.c stable/9/contrib/gcc/doc/tm.texi stable/9/contrib/gcc/dwarf2out.c stable/9/contrib/gcc/sched-vis.c stable/9/contrib/gcc/target-def.h stable/9/contrib/gcc/target.h stable/9/contrib/gcc/tree-dump.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/9/contrib/gcc/ChangeLog.gcc43 Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/ChangeLog.gcc43 Fri Dec 27 16:08:34 2013 (r259948) @@ -51,6 +51,14 @@ * doc/extend.texi: Document the 0b-prefixed binary integer constant extension. +2007-05-31 Daniel Berlin (r125239) + + * c-typeck.c (build_indirect_ref): Include type in error message. + (build_binary_op): Pass types to binary_op_error. + * c-common.c (binary_op_error): Take two type arguments, print out + types with error. + * c-common.h (binary_op_error): Update prototype. + 2007-05-27 Eric Christopher (r125116) * config/rs6000/rs6000.c (rs6000_emit_prologue): Update @@ -74,6 +82,14 @@ regs_invalidated_by_call, rather than just checking the membership of REGNO (REG). +2007-05-18 Geoffrey Keating (r124839) + + * dwarf2out.c (print_die): Use '%ld' not '%lu' to print a 'long'. + (output_die): Use 'unsigned long' with %x. + * sched-vis.c (print_value): Use 'unsigned HOST_WIDE_INT' and + HOST_WIDE_INT_PRINT_HEX to print HOST_WIDE_INT. + * tree-dump.c (dump_pointer): Use 'unsigned long' for %lx. + 2007-05-16 Eric Christopher (r124763) * config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register @@ -377,6 +393,19 @@ * config.gcc: Support core2 processor. +2007-01-11 Joseph Myers (r120688) + + * c-common.c (vector_types_convertible_p): Treat opaque types as + always convertible if they have the same size, but not otherwise. + +2007-01-08 Geoffrey Keating (r120611) + + * target.h (struct gcc_target): New field library_rtti_comdat. + * target-def.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): New. + (TARGET_CXX): Add TARGET_CXX_LIBRARY_RTTI_COMDAT. + * doc/tm.texi (C++ ABI): Document TARGET_CXX_LIBRARY_RTTI_COMDAT. + * config/darwin.h (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define. + 2007-01-05 Manuel Lopez-Ibanez (r120505) PR c/19978 Modified: stable/9/contrib/gcc/c-common.c ============================================================================== --- stable/9/contrib/gcc/c-common.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/c-common.c Fri Dec 27 16:08:34 2013 (r259948) @@ -1988,10 +1988,10 @@ min_precision (tree value, int unsignedp } /* Print an error message for invalid operands to arith operation - CODE. */ + CODE with TYPE0 for operand 0, and TYPE1 for operand 1. */ void -binary_op_error (enum tree_code code) +binary_op_error (enum tree_code code, tree type0, tree type1) { const char *opname; @@ -2042,7 +2042,8 @@ binary_op_error (enum tree_code code) default: gcc_unreachable (); } - error ("invalid operands to binary %s", opname); + error ("invalid operands to binary %s (have %qT and %qT)", opname, + type0, type1); } /* Subroutine of build_binary_op, used for comparison operations. Modified: stable/9/contrib/gcc/c-common.h ============================================================================== --- stable/9/contrib/gcc/c-common.h Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/c-common.h Fri Dec 27 16:08:34 2013 (r259948) @@ -650,7 +650,7 @@ extern tree c_sizeof_or_alignof_type (tr extern tree c_alignof_expr (tree); /* Print an error message for invalid operands to arith operation CODE. NOP_EXPR is used as a special case (see truthvalue_conversion). */ -extern void binary_op_error (enum tree_code); +extern void binary_op_error (enum tree_code, tree, tree); extern tree fix_string_type (tree); struct varray_head_tag; extern void constant_expression_warning (tree); Modified: stable/9/contrib/gcc/c-typeck.c ============================================================================== --- stable/9/contrib/gcc/c-typeck.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/c-typeck.c Fri Dec 27 16:08:34 2013 (r259948) @@ -1923,7 +1923,7 @@ build_indirect_ref (tree ptr, const char } } else if (TREE_CODE (pointer) != ERROR_MARK) - error ("invalid type argument of %qs", errorstring); + error ("invalid type argument of %qs (have %qT)", errorstring, type); return error_mark_node; } @@ -8135,7 +8135,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1)))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } @@ -8431,7 +8431,7 @@ build_binary_op (enum tree_code code, tr if (!result_type) { - binary_op_error (code); + binary_op_error (code, TREE_TYPE (op0), TREE_TYPE (op1)); return error_mark_node; } Modified: stable/9/contrib/gcc/config/darwin.h ============================================================================== --- stable/9/contrib/gcc/config/darwin.h Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/config/darwin.h Fri Dec 27 16:08:34 2013 (r259948) @@ -467,6 +467,10 @@ extern GTY(()) int darwin_ms_struct; with names, so it's safe to make the class data not comdat. */ #define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false +/* For efficiency, on Darwin the RTTI information that is always + emitted in the standard C++ library should not be COMDAT. */ +#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_false + /* We make exception information linkonce. */ #undef TARGET_USES_WEAK_UNWIND_INFO #define TARGET_USES_WEAK_UNWIND_INFO 1 Modified: stable/9/contrib/gcc/cp/Make-lang.in ============================================================================== --- stable/9/contrib/gcc/cp/Make-lang.in Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/cp/Make-lang.in Fri Dec 27 16:08:34 2013 (r259948) @@ -265,7 +265,7 @@ cp/tree.o: cp/tree.c $(CXX_TREE_H) $(TM_ $(TARGET_H) debug.h cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(TM_H) cp/rtti.o: cp/rtti.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) toplev.h convert.h \ - gt-cp-rtti.h + $(TARGET_H) gt-cp-rtti.h cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(RTL_H) except.h \ toplev.h cp/cfns.h $(EXPR_H) libfuncs.h $(TREE_INLINE_H) $(TARGET_H) cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(RTL_H) $(FLAGS_H) $(EXPR_H) \ Modified: stable/9/contrib/gcc/cp/mangle.c ============================================================================== --- stable/9/contrib/gcc/cp/mangle.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/cp/mangle.c Fri Dec 27 16:08:34 2013 (r259948) @@ -1340,7 +1340,7 @@ write_real_cst (const tree value) for (; i != limit; i += dir) { - sprintf (buffer, "%08lx", target_real[i]); + sprintf (buffer, "%08lx", (unsigned long) target_real[i]); write_chars (buffer, 8); } } Modified: stable/9/contrib/gcc/cp/rtti.c ============================================================================== --- stable/9/contrib/gcc/cp/rtti.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/cp/rtti.c Fri Dec 27 16:08:34 2013 (r259948) @@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */ #include "assert.h" #include "toplev.h" #include "convert.h" +#include "target.h" /* C++ returns type information to the user in struct type_info objects. We also use type information to implement dynamic_cast and @@ -1427,8 +1428,11 @@ emit_support_tinfos (void) comdat_linkage for details.) Since we want these objects to have external linkage so that copies do not have to be emitted in code outside the runtime library, we make them - non-COMDAT here. */ - if (!flag_weak) + non-COMDAT here. + + It might also not be necessary to follow this detail of the + ABI. */ + if (!flag_weak || ! targetm.cxx.library_rtti_comdat ()) { gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo)); DECL_INTERFACE_KNOWN (tinfo) = 1; Modified: stable/9/contrib/gcc/cp/typeck.c ============================================================================== --- stable/9/contrib/gcc/cp/typeck.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/cp/typeck.c Fri Dec 27 16:08:34 2013 (r259948) @@ -3476,7 +3476,7 @@ build_binary_op (enum tree_code code, tr || !same_scalar_type_ignoring_signedness (TREE_TYPE (type0), TREE_TYPE (type1))) { - binary_op_error (code); + binary_op_error (code, type0, type1); return error_mark_node; } arithmetic_types_p = 1; Modified: stable/9/contrib/gcc/doc/tm.texi ============================================================================== --- stable/9/contrib/gcc/doc/tm.texi Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/doc/tm.texi Fri Dec 27 16:08:34 2013 (r259948) @@ -8953,6 +8953,12 @@ classes whose virtual table will be emit unit will not be COMDAT. @end deftypefn +@deftypefn {Target Hook} bool TARGET_CXX_LIBRARY_RTTI_COMDAT (void) +This hook returns true (the default) if the RTTI information for +the basic types which is defined in the C++ runtime should always +be COMDAT, false if it should not be COMDAT. +@end deftypefn + @deftypefn {Target Hook} bool TARGET_CXX_USE_AEABI_ATEXIT (void) This hook returns true if @code{__aeabi_atexit} (as defined by the ARM EABI) should be used to register static destructors when @option{-fuse-cxa-atexit} Modified: stable/9/contrib/gcc/dwarf2out.c ============================================================================== --- stable/9/contrib/gcc/dwarf2out.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/dwarf2out.c Fri Dec 27 16:08:34 2013 (r259948) @@ -5741,11 +5741,11 @@ print_die (dw_die_ref die, FILE *outfile unsigned ix; print_spaces (outfile); - fprintf (outfile, "DIE %4lu: %s\n", + fprintf (outfile, "DIE %4ld: %s\n", die->die_offset, dwarf_tag_name (die->die_tag)); print_spaces (outfile); fprintf (outfile, " abbrev id: %lu", die->die_abbrev); - fprintf (outfile, " offset: %lu\n", die->die_offset); + fprintf (outfile, " offset: %ld\n", die->die_offset); for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++) { @@ -5793,7 +5793,7 @@ print_die (dw_die_ref die, FILE *outfile if (AT_ref (a)->die_symbol) fprintf (outfile, "die -> label: %s", AT_ref (a)->die_symbol); else - fprintf (outfile, "die -> %lu", AT_ref (a)->die_offset); + fprintf (outfile, "die -> %ld", AT_ref (a)->die_offset); } else fprintf (outfile, "die -> "); @@ -7063,7 +7063,8 @@ output_die (dw_die_ref die) output_die_symbol (die); dw2_asm_output_data_uleb128 (die->die_abbrev, "(DIE (0x%lx) %s)", - die->die_offset, dwarf_tag_name (die->die_tag)); + (unsigned long)die->die_offset, + dwarf_tag_name (die->die_tag)); for (ix = 0; VEC_iterate (dw_attr_node, die->die_attr, ix, a); ix++) { @@ -7245,7 +7246,7 @@ output_die (dw_die_ref die) /* Add null byte to terminate sibling list. */ if (die->die_child != NULL) dw2_asm_output_data (1, 0, "end of children of DIE 0x%lx", - die->die_offset); + (unsigned long) die->die_offset); } /* Output the compilation unit that appears at the beginning of the Modified: stable/9/contrib/gcc/sched-vis.c ============================================================================== --- stable/9/contrib/gcc/sched-vis.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/sched-vis.c Fri Dec 27 16:08:34 2013 (r259948) @@ -430,7 +430,10 @@ print_value (char *buf, rtx x, int verbo if (FLOAT_MODE_P (GET_MODE (x))) real_to_decimal (t, CONST_DOUBLE_REAL_VALUE (x), sizeof (t), 0, 1); else - sprintf (t, "<0x%lx,0x%lx>", (long) CONST_DOUBLE_LOW (x), (long) CONST_DOUBLE_HIGH (x)); + sprintf (t, + "<" HOST_WIDE_INT_PRINT_HEX "," HOST_WIDE_INT_PRINT_HEX ">", + (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x), + (unsigned HOST_WIDE_INT) CONST_DOUBLE_HIGH (x)); cur = safe_concat (buf, cur, t); break; case CONST_STRING: Modified: stable/9/contrib/gcc/target-def.h ============================================================================== --- stable/9/contrib/gcc/target-def.h Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/target-def.h Fri Dec 27 16:08:34 2013 (r259948) @@ -587,6 +587,10 @@ Foundation, 51 Franklin Street, Fifth Fl #define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_true #endif +#ifndef TARGET_CXX_LIBRARY_RTTI_COMDAT +#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_true +#endif + #ifndef TARGET_CXX_USE_AEABI_ATEXIT #define TARGET_CXX_USE_AEABI_ATEXIT hook_bool_void_false #endif @@ -606,6 +610,7 @@ Foundation, 51 Franklin Street, Fifth Fl TARGET_CXX_KEY_METHOD_MAY_BE_INLINE, \ TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY, \ TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT, \ + TARGET_CXX_LIBRARY_RTTI_COMDAT, \ TARGET_CXX_USE_AEABI_ATEXIT, \ TARGET_CXX_ADJUST_CLASS_AT_DEFINITION \ } Modified: stable/9/contrib/gcc/target.h ============================================================================== --- stable/9/contrib/gcc/target.h Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/target.h Fri Dec 27 16:08:34 2013 (r259948) @@ -783,6 +783,10 @@ struct gcc_target class data for classes whose virtual table will be emitted in only one translation unit will not be COMDAT. */ bool (*class_data_always_comdat) (void); + /* Returns true (the default) if the RTTI for the basic types, + which is always defined in the C++ runtime, should be COMDAT; + false if it should not be COMDAT. */ + bool (*library_rtti_comdat) (void); /* Returns true if __aeabi_atexit should be used to register static destructors. */ bool (*use_aeabi_atexit) (void); Modified: stable/9/contrib/gcc/tree-dump.c ============================================================================== --- stable/9/contrib/gcc/tree-dump.c Fri Dec 27 16:06:08 2013 (r259947) +++ stable/9/contrib/gcc/tree-dump.c Fri Dec 27 16:08:34 2013 (r259948) @@ -166,7 +166,7 @@ void dump_pointer (dump_info_p di, const char *field, void *ptr) { dump_maybe_newline (di); - fprintf (di->stream, "%-4s: %-8lx ", field, (long) ptr); + fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr); di->column += 15; } From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 27 17:32:48 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4E2BCB5; Fri, 27 Dec 2013 17:32:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C01361149; Fri, 27 Dec 2013 17:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRHWmNc039168; Fri, 27 Dec 2013 17:32:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRHWmg0039167; Fri, 27 Dec 2013 17:32:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201312271732.rBRHWmg0039167@svn.freebsd.org> From: Glen Barber Date: Fri, 27 Dec 2013 17:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259954 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 17:32:48 -0000 Author: gjb Date: Fri Dec 27 17:32:48 2013 New Revision: 259954 URL: http://svnweb.freebsd.org/changeset/base/259954 Log: MFC r254298: Remove get_rev_branch(), functionality exists in the release/Makefile. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/release.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/release.sh ============================================================================== --- stable/9/release/release.sh Fri Dec 27 17:09:59 2013 (r259953) +++ stable/9/release/release.sh Fri Dec 27 17:32:48 2013 (r259954) @@ -81,17 +81,6 @@ NOPORTS= # Set to non-empty value to build dvd1.iso as part of the release. WITH_DVD= -get_rev_branch () { - # Set up the OSVERSION, BRANCH, and REVISION based on the src/ tree - # checked out. - OSVERSION=$(grep '#define __FreeBSD_version' ${CHROOTDIR}/usr/src/sys/sys/param.h | awk '{print $3}') - BRANCH=$(grep '^BRANCH=' ${CHROOTDIR}/usr/src/sys/conf/newvers.sh \ - | awk -F\= '{print $2}' | sed -e 's,",,g') - REVISION=$(grep '^REVISION=' ${CHROOTDIR}/usr/src/sys/conf/newvers.sh \ - | awk -F\= '{print $2}' | sed -e 's,",,g') - OSRELEASE="${REVISION}-${BRANCH}" -} - usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -175,8 +164,6 @@ if [ "x${NOPORTS}" = "x" ]; then svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports $PORTREVISION fi -get_rev_branch - cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf cd ${CHROOTDIR}/usr/src make ${CHROOT_WMAKEFLAGS} buildworld From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 27 22:14:04 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ECF4571; Fri, 27 Dec 2013 22:14:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6A613DD; Fri, 27 Dec 2013 22:14:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRME4tA047763; Fri, 27 Dec 2013 22:14:04 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRME4WS047762; Fri, 27 Dec 2013 22:14:04 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272214.rBRME4WS047762@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259964 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:14:04 -0000 Author: markj Date: Fri Dec 27 22:14:03 2013 New Revision: 259964 URL: http://svnweb.freebsd.org/changeset/base/259964 Log: MFC r257300: Fix an off-by-one error when checking whether a given address is within the extent of a symbol. Modified: stable/9/lib/libproc/proc_sym.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:05:51 2013 (r259963) +++ stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:14:03 2013 (r259964) @@ -263,7 +263,7 @@ proc_addr2sym(struct proc_handle *p, uin * by rtld. */ rsym = map->pr_vaddr + sym.st_value; - if (addr >= rsym && addr <= (rsym + sym.st_size)) { + if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { strlcpy(name, s, namesz); @@ -299,7 +299,7 @@ proc_addr2sym(struct proc_handle *p, uin rsym = map->pr_vaddr + sym.st_value; else rsym = sym.st_value; - if (addr >= rsym && addr <= (rsym + sym.st_size)) { + if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s) { strlcpy(name, s, namesz); From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 27 22:29:21 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66543F72; Fri, 27 Dec 2013 22:29:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5146A15AA; Fri, 27 Dec 2013 22:29:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRMTLjO052444; Fri, 27 Dec 2013 22:29:21 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRMTLgl052443; Fri, 27 Dec 2013 22:29:21 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272229.rBRMTLgl052443@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259968 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:29:21 -0000 Author: markj Date: Fri Dec 27 22:29:20 2013 New Revision: 259968 URL: http://svnweb.freebsd.org/changeset/base/259968 Log: MFC r257670: Modify the libproc breakpoint add/remove functions to stop the target process if it has not already been stopped, since this is required for ptrace(2) to work. libdtrace does not seem to stop target processes before trying to remove their breakpoints, so we were previously failing to remove the breakpoint on r_debug_state() in rtld. This was causing processes to die with SIGTRAP if they called dlopen(3) after dtrace(1) had detached. Modified: stable/9/lib/libproc/proc_bkpt.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_bkpt.c ============================================================================== --- stable/9/lib/libproc/proc_bkpt.c Fri Dec 27 22:26:43 2013 (r259967) +++ stable/9/lib/libproc/proc_bkpt.c Fri Dec 27 22:29:20 2013 (r259968) @@ -37,8 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include "_libproc.h" #if defined(__i386__) || defined(__amd64__) @@ -48,12 +49,39 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif +static void +proc_cont(struct proc_handle *phdl) +{ + + ptrace(PT_CONTINUE, proc_getpid(phdl), (caddr_t)1, 0); +} + +static int +proc_stop(struct proc_handle *phdl) +{ + int status; + + if (kill(proc_getpid(phdl), SIGSTOP) == -1) { + DPRINTF("kill %d", proc_getpid(phdl)); + return (-1); + } else if (waitpid(proc_getpid(phdl), &status, WSTOPPED) == -1) { + DPRINTF("waitpid %d", proc_getpid(phdl)); + return (-1); + } else if (!WIFSTOPPED(status)) { + DPRINTFX("waitpid: unexpected status 0x%x", status); + return (-1); + } + + return (0); +} + int proc_bkptset(struct proc_handle *phdl, uintptr_t address, unsigned long *saved) { struct ptrace_io_desc piod; unsigned long paddr, caddr; + int ret = 0; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -62,6 +90,12 @@ proc_bkptset(struct proc_handle *phdl, u return (-1); } + DPRINTFX("adding breakpoint at 0x%lx", address); + + if (phdl->status != PS_STOP) + if (proc_stop(phdl) != 0) + return (-1); + /* * Read the original instruction. */ @@ -74,7 +108,8 @@ proc_bkptset(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't read instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; + goto done; } *saved = paddr; /* @@ -89,10 +124,16 @@ proc_bkptset(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; + goto done; } - return (0); +done: + if (phdl->status != PS_STOP) + /* Restart the process if we had to stop it. */ + proc_cont(phdl); + + return (ret); } int @@ -101,13 +142,20 @@ proc_bkptdel(struct proc_handle *phdl, u { struct ptrace_io_desc piod; unsigned long paddr, caddr; + int ret = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { errno = ENOENT; return (-1); } - DPRINTFX("removing breakpoint at 0x%lx\n", address); + + DPRINTFX("removing breakpoint at 0x%lx", address); + + if (phdl->status != PS_STOP) + if (proc_stop(phdl) != 0) + return (-1); + /* * Overwrite the breakpoint instruction that we setup previously. */ @@ -120,10 +168,14 @@ proc_bkptdel(struct proc_handle *phdl, u if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" PRIuPTR, address); - return (-1); + ret = -1; } + + if (phdl->status != PS_STOP) + /* Restart the process if we had to stop it. */ + proc_cont(phdl); - return (0); + return (ret); } /* From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 27 22:54:39 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38AEB892; Fri, 27 Dec 2013 22:54:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0AAF617A9; Fri, 27 Dec 2013 22:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRMscPf062930; Fri, 27 Dec 2013 22:54:38 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRMscDw062929; Fri, 27 Dec 2013 22:54:38 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272254.rBRMscDw062929@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259970 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:54:39 -0000 Author: markj Date: Fri Dec 27 22:54:38 2013 New Revision: 259970 URL: http://svnweb.freebsd.org/changeset/base/259970 Log: MFC r240040 (rpaulo): Make sure we visit both symbol sections even if one of them doesn't exist. This makes it possible to dtrace some C++ programs like devd. MFC r254177 (rpaulo): Fix the return value when we found a symbol in .dynstr. This nasty bug was preventing a lot of symbol lookups in dtruss -s, for example. Modified: stable/9/lib/libproc/proc_sym.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:30:36 2013 (r259969) +++ stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:54:38 2013 (r259970) @@ -254,7 +254,7 @@ proc_addr2sym(struct proc_handle *p, uin */ if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); - goto err2; + goto symtab; } i = 0; while (gelf_getsym(data, i++, &sym) != NULL) { @@ -279,6 +279,7 @@ proc_addr2sym(struct proc_handle *p, uin } } } +symtab: /* * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) @@ -430,17 +431,16 @@ proc_name2sym(struct proc_handle *p, con * Iterate over the Dynamic Symbols table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if ((data = elf_getdata(dynsymscn, NULL)) == NULL) { - goto err2; - } - i = 0; - while (gelf_getsym(data, i++, &sym) != NULL) { - s = elf_strptr(e, dynsymstridx, sym.st_name); - if (s && strcmp(s, symbol) == 0) { - memcpy(symcopy, &sym, sizeof(sym)); - symcopy->st_value = map->pr_vaddr + sym.st_value; - error = 0; - goto out; + if ((data = elf_getdata(dynsymscn, NULL))) { + i = 0; + while (gelf_getsym(data, i++, &sym) != NULL) { + s = elf_strptr(e, dynsymstridx, sym.st_name); + if (s && strcmp(s, symbol) == 0) { + memcpy(symcopy, &sym, sizeof(sym)); + symcopy->st_value = map->pr_vaddr + sym.st_value; + error = 0; + goto out; + } } } /* @@ -449,17 +449,15 @@ proc_name2sym(struct proc_handle *p, con */ if (symtabscn == NULL) goto err2; - if ((data = elf_getdata(symtabscn, NULL)) == NULL) { - DPRINTF("ERROR: elf_getdata() failed"); - goto err2; - } - i = 0; - while (gelf_getsym(data, i++, &sym) != NULL) { - s = elf_strptr(e, symtabstridx, sym.st_name); - if (s && strcmp(s, symbol) == 0) { - memcpy(symcopy, &sym, sizeof(sym)); - error = 0; - goto out; + if ((data = elf_getdata(symtabscn, NULL))) { + i = 0; + while (gelf_getsym(data, i++, &sym) != NULL) { + s = elf_strptr(e, symtabstridx, sym.st_name); + if (s && strcmp(s, symbol) == 0) { + memcpy(symcopy, &sym, sizeof(sym)); + error = 0; + goto out; + } } } out: From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 27 22:59:17 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D967EB4E; Fri, 27 Dec 2013 22:59:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B982617CC; Fri, 27 Dec 2013 22:59:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRMxGiM063611; Fri, 27 Dec 2013 22:59:16 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRMxGrw063610; Fri, 27 Dec 2013 22:59:16 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201312272259.rBRMxGrw063610@svn.freebsd.org> From: Mark Johnston Date: Fri, 27 Dec 2013 22:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259971 - stable/9/lib/libproc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 22:59:17 -0000 Author: markj Date: Fri Dec 27 22:59:16 2013 New Revision: 259971 URL: http://svnweb.freebsd.org/changeset/base/259971 Log: MFC r258000: Consistently add the relocation offset only when the ELF type is not ET_EXEC. This fixes several problems with the DTrace pid provider not being able to match probes. Modified: stable/9/lib/libproc/proc_sym.c Directory Properties: stable/9/lib/libproc/ (props changed) Modified: stable/9/lib/libproc/proc_sym.c ============================================================================== --- stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:54:38 2013 (r259970) +++ stable/9/lib/libproc/proc_sym.c Fri Dec 27 22:59:16 2013 (r259971) @@ -262,7 +262,10 @@ proc_addr2sym(struct proc_handle *p, uin * Calculate the address mapped to the virtual memory * by rtld. */ - rsym = map->pr_vaddr + sym.st_value; + if (ehdr.e_type != ET_EXEC) + rsym = map->pr_vaddr + sym.st_value; + else + rsym = sym.st_value; if (addr >= rsym && addr < rsym + sym.st_size) { s = elf_strptr(e, dynsymstridx, sym.st_name); if (s) { @@ -284,8 +287,6 @@ symtab: * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if (symtabscn == NULL) - goto err2; if ((data = elf_getdata(symtabscn, NULL)) == NULL) { DPRINTFX("ERROR: elf_getdata() failed: %s", elf_errmsg(-1)); goto err2; @@ -437,7 +438,8 @@ proc_name2sym(struct proc_handle *p, con s = elf_strptr(e, dynsymstridx, sym.st_name); if (s && strcmp(s, symbol) == 0) { memcpy(symcopy, &sym, sizeof(sym)); - symcopy->st_value = map->pr_vaddr + sym.st_value; + if (ehdr.e_type != ET_EXEC) + symcopy->st_value += map->pr_vaddr; error = 0; goto out; } @@ -447,20 +449,21 @@ proc_name2sym(struct proc_handle *p, con * Iterate over the Symbols Table to find the symbol. * Then look up the string name in STRTAB (.dynstr) */ - if (symtabscn == NULL) - goto err2; if ((data = elf_getdata(symtabscn, NULL))) { i = 0; while (gelf_getsym(data, i++, &sym) != NULL) { s = elf_strptr(e, symtabstridx, sym.st_name); if (s && strcmp(s, symbol) == 0) { memcpy(symcopy, &sym, sizeof(sym)); + if (ehdr.e_type != ET_EXEC) + symcopy->st_value += map->pr_vaddr; error = 0; goto out; } } } out: + DPRINTFX("found addr 0x%lx for %s", symcopy->st_value, symbol); err2: elf_end(e); err1: @@ -481,6 +484,7 @@ proc_iter_symbyaddr(struct proc_handle * prmap_t *map; Elf_Scn *scn, *foundscn = NULL; Elf_Data *data; + GElf_Ehdr ehdr; GElf_Shdr shdr; GElf_Sym sym; unsigned long stridx = -1; @@ -497,6 +501,10 @@ proc_iter_symbyaddr(struct proc_handle * DPRINTFX("ERROR: elf_begin() failed: %s", elf_errmsg(-1)); goto err1; } + if (gelf_getehdr(e, &ehdr) == NULL) { + DPRINTFX("ERROR: gelf_getehdr() failed: %s", elf_errmsg(-1)); + goto err2; + } /* * Find the section we are looking for. */ @@ -547,7 +555,8 @@ proc_iter_symbyaddr(struct proc_handle * (mask & TYPE_FILE) == 0) continue; s = elf_strptr(e, stridx, sym.st_name); - sym.st_value += map->pr_vaddr; + if (ehdr.e_type != ET_EXEC) + sym.st_value += map->pr_vaddr; (*func)(cd, &sym, s); } error = 0; From owner-svn-src-stable-9@FreeBSD.ORG Fri Dec 27 23:09:40 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B63351D9; Fri, 27 Dec 2013 23:09:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8726B188E; Fri, 27 Dec 2013 23:09:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBRN9eo0067956; Fri, 27 Dec 2013 23:09:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBRN9ebN067955; Fri, 27 Dec 2013 23:09:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201312272309.rBRN9ebN067955@svn.freebsd.org> From: Xin LI Date: Fri, 27 Dec 2013 23:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259974 - in stable: 10/etc 8/etc 9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 23:09:40 -0000 Author: delphij Date: Fri Dec 27 23:09:40 2013 New Revision: 259974 URL: http://svnweb.freebsd.org/changeset/base/259974 Log: MFC r259973: Tighten default restrictions for ntpd(8) server and provide a link to NTP access restriction documentation. Modified: stable/9/etc/ntp.conf Directory Properties: stable/9/etc/ (props changed) Changes in other areas also in this revision: Modified: stable/10/etc/ntp.conf stable/8/etc/ntp.conf Directory Properties: stable/10/ (props changed) stable/8/etc/ (props changed) Modified: stable/9/etc/ntp.conf ============================================================================== --- stable/9/etc/ntp.conf Fri Dec 27 23:06:15 2013 (r259973) +++ stable/9/etc/ntp.conf Fri Dec 27 23:09:40 2013 (r259974) @@ -17,7 +17,7 @@ # users with a static IP and good upstream NTP servers to add a server # to the pool. See http://www.pool.ntp.org/join.html if you are interested. # -# The option `iburst' is used for faster initial synchronisation. +# The option `iburst' is used for faster initial synchronization. # server 0.freebsd.pool.ntp.org iburst server 1.freebsd.pool.ntp.org iburst @@ -35,21 +35,37 @@ server 2.freebsd.pool.ntp.org iburst # server 2.CC.pool.ntp.org iburst # -# Security: Only accept NTP traffic from the following hosts. -# The following configuration example only accepts traffic from the -# above defined servers. +# Security: +# +# By default, only allow time queries and block all other requests +# from unauthenticated clients. +# +# See http://support.ntp.org/bin/view/Support/AccessRestrictions +# for more information. +# +restrict default kod nomodify notrap nopeer noquery +restrict -6 default kod nomodify notrap nopeer noquery +# +# Alternatively, the following rules would block all unauthorized access. +# +#restrict default ignore +#restrict -6 default ignore +# +# In this case, all remote NTP time servers also need to be explicitly +# allowed or they would not be able to exchange time information with +# this server. # # Please note that this example doesn't work for the servers in # the pool.ntp.org domain since they return multiple A records. -# (This is the reason that by default they are commented out) # -#restrict default ignore #restrict 0.pool.ntp.org nomodify nopeer noquery notrap #restrict 1.pool.ntp.org nomodify nopeer noquery notrap #restrict 2.pool.ntp.org nomodify nopeer noquery notrap -#restrict 127.0.0.1 -#restrict -6 ::1 -#restrict 127.127.1.0 +# +# The following settings allow unrestricted access from the localhost +restrict 127.0.0.1 +restrict -6 ::1 +restrict 127.127.1.0 # # If a server loses sync with all upstream servers, NTP clients From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 00:03:16 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C0A4176; Sat, 28 Dec 2013 00:03:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 463B01CE2; Sat, 28 Dec 2013 00:03:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS03G5p090455; Sat, 28 Dec 2013 00:03:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS03GBR090453; Sat, 28 Dec 2013 00:03:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280003.rBS03GBR090453@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259976 - in stable: 10/contrib/gperf/lib 8/contrib/gperf/lib 9/contrib/gperf/lib X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:03:16 -0000 Author: dim Date: Sat Dec 28 00:03:15 2013 New Revision: 259976 URL: http://svnweb.freebsd.org/changeset/base/259976 Log: MFC r259756: Get rid of register keyword usage in gperf, it is totally obsolete for C++, and this allows gperf to be compiled for C++11 without a warning about it. Modified: stable/9/contrib/gperf/lib/getline.cc Directory Properties: stable/9/contrib/gperf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/gperf/lib/getline.cc stable/8/contrib/gperf/lib/getline.cc Directory Properties: stable/10/ (props changed) stable/8/contrib/gperf/ (props changed) Modified: stable/9/contrib/gperf/lib/getline.cc ============================================================================== --- stable/9/contrib/gperf/lib/getline.cc Fri Dec 27 23:13:38 2013 (r259975) +++ stable/9/contrib/gperf/lib/getline.cc Sat Dec 28 00:03:15 2013 (r259976) @@ -57,7 +57,7 @@ getstr (char **lineptr, size_t *n, FILE for (;;) { - register int c = getc (stream); + int c = getc (stream); /* We always want at least one char left in the buffer, since we always (unless we get an error while reading the first char) From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 00:16:59 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58B1C615; Sat, 28 Dec 2013 00:16:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B6911D78; Sat, 28 Dec 2013 00:16:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS0GxbN094996; Sat, 28 Dec 2013 00:16:59 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS0GxL0094995; Sat, 28 Dec 2013 00:16:59 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280016.rBS0GxL0094995@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:16:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259977 - in stable: 10/sys/dev/advansys 9/sys/dev/advansys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:16:59 -0000 Author: dim Date: Sat Dec 28 00:16:58 2013 New Revision: 259977 URL: http://svnweb.freebsd.org/changeset/base/259977 Log: MFC r259825: Remove unused static function adwccbstatus() from adw(4). Reviewed by: gibbs Modified: stable/9/sys/dev/advansys/adwcam.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/advansys/adwcam.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/advansys/adwcam.c ============================================================================== --- stable/9/sys/dev/advansys/adwcam.c Sat Dec 28 00:03:15 2013 (r259976) +++ stable/9/sys/dev/advansys/adwcam.c Sat Dec 28 00:16:58 2013 (r259977) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #define ccb_acb_ptr spriv_ptr0 #define ccb_adw_ptr spriv_ptr1 -static __inline cam_status adwccbstatus(union ccb*); static __inline struct acb* adwgetacb(struct adw_softc *adw); static __inline void adwfreeacb(struct adw_softc *adw, struct acb *acb); @@ -100,12 +99,6 @@ static void adw_handle_device_reset(str static void adw_handle_bus_reset(struct adw_softc *adw, int initiated); -static __inline cam_status -adwccbstatus(union ccb* ccb) -{ - return (ccb->ccb_h.status & CAM_STATUS_MASK); -} - static __inline struct acb* adwgetacb(struct adw_softc *adw) { From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 00:53:20 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C63D6CEF; Sat, 28 Dec 2013 00:53:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1E9D1F5B; Sat, 28 Dec 2013 00:53:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS0rKJ8009101; Sat, 28 Dec 2013 00:53:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS0rKZZ009100; Sat, 28 Dec 2013 00:53:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280053.rBS0rKZZ009100@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 00:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259979 - in stable: 10/sys/dev/aic7xxx 9/sys/dev/aic7xxx X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 00:53:20 -0000 Author: dim Date: Sat Dec 28 00:53:20 2013 New Revision: 259979 URL: http://svnweb.freebsd.org/changeset/base/259979 Log: MFC r259827: Remove unused static const variable num_chip_names from aic79xx.c. Reviewed by: gibbs Modified: stable/9/sys/dev/aic7xxx/aic79xx.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/aic7xxx/aic79xx.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- stable/9/sys/dev/aic7xxx/aic79xx.c Sat Dec 28 00:20:55 2013 (r259978) +++ stable/9/sys/dev/aic7xxx/aic79xx.c Sat Dec 28 00:53:20 2013 (r259979) @@ -64,7 +64,6 @@ char *ahd_chip_names[] = "aic7902", "aic7901A" }; -static const u_int num_chip_names = NUM_ELEMENTS(ahd_chip_names); /* * Hardware error codes. From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:08:41 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 364FD5C9; Sat, 28 Dec 2013 01:08:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1ECEF1050; Sat, 28 Dec 2013 01:08:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS18eKP013918; Sat, 28 Dec 2013 01:08:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS18et3013917; Sat, 28 Dec 2013 01:08:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280108.rBS18et3013917@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259981 - in stable: 10/sys/dev/aic7xxx 9/sys/dev/aic7xxx X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:08:41 -0000 Author: dim Date: Sat Dec 28 01:08:40 2013 New Revision: 259981 URL: http://svnweb.freebsd.org/changeset/base/259981 Log: MFC r259833: Remove another unused static const variable num_chip_names, from aic7xxx.c this time. Noticed by: pluknet Modified: stable/9/sys/dev/aic7xxx/aic7xxx.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/aic7xxx/aic7xxx.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/aic7xxx/aic7xxx.c ============================================================================== --- stable/9/sys/dev/aic7xxx/aic7xxx.c Sat Dec 28 01:03:30 2013 (r259980) +++ stable/9/sys/dev/aic7xxx/aic7xxx.c Sat Dec 28 01:08:40 2013 (r259981) @@ -73,7 +73,6 @@ char *ahc_chip_names[] = "aic7892", "aic7899" }; -static const u_int num_chip_names = NUM_ELEMENTS(ahc_chip_names); /* * Hardware error codes. From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:15:35 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13354A68; Sat, 28 Dec 2013 01:15:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F2BF510DE; Sat, 28 Dec 2013 01:15:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1FY4T017488; Sat, 28 Dec 2013 01:15:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1FYos017487; Sat, 28 Dec 2013 01:15:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280115.rBS1FYos017487@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259982 - in stable: 10/sys/netinet 9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:15:35 -0000 Author: dim Date: Sat Dec 28 01:15:34 2013 New Revision: 259982 URL: http://svnweb.freebsd.org/changeset/base/259982 Log: MFC r259839: In sys/netinet/in_mcast.c, inm_is_ifp_detached() is only used whenever KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. Modified: stable/9/sys/netinet/in_mcast.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netinet/in_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/netinet/in_mcast.c ============================================================================== --- stable/9/sys/netinet/in_mcast.c Sat Dec 28 01:08:40 2013 (r259981) +++ stable/9/sys/netinet/in_mcast.c Sat Dec 28 01:15:34 2013 (r259982) @@ -138,7 +138,9 @@ static int in_getmulti(struct ifnet *, c struct in_multi **); static int inm_get_source(struct in_multi *inm, const in_addr_t haddr, const int noalloc, struct ip_msource **pims); +#ifdef KTR static int inm_is_ifp_detached(const struct in_multi *); +#endif static int inm_merge(struct in_multi *, /*const*/ struct in_mfilter *); static void inm_purge(struct in_multi *); static void inm_reap(struct in_multi *); @@ -179,6 +181,7 @@ static SYSCTL_NODE(_net_inet_ip_mcast, O CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip_mcast_filters, "Per-interface stack-wide source filters"); +#ifdef KTR /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -201,6 +204,7 @@ inm_is_ifp_detached(const struct in_mult return (ifp == NULL); } +#endif /* * Initialize an in_mfilter structure to a known state at t0, t1 From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:19:48 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0EB7D79; Sat, 28 Dec 2013 01:19:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC20B10F9; Sat, 28 Dec 2013 01:19:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1JmDi017953; Sat, 28 Dec 2013 01:19:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1JmlQ017952; Sat, 28 Dec 2013 01:19:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280119.rBS1JmlQ017952@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:19:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259983 - in stable: 10/sys/netinet6 9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:19:48 -0000 Author: dim Date: Sat Dec 28 01:19:48 2013 New Revision: 259983 URL: http://svnweb.freebsd.org/changeset/base/259983 Log: MFC r259840: In sys/netinet6/in6_mcast.c, in6m_is_ifp_detached() is only used whenever KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. Modified: stable/9/sys/netinet6/in6_mcast.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netinet6/in6_mcast.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/netinet6/in6_mcast.c ============================================================================== --- stable/9/sys/netinet6/in6_mcast.c Sat Dec 28 01:15:34 2013 (r259982) +++ stable/9/sys/netinet6/in6_mcast.c Sat Dec 28 01:19:48 2013 (r259983) @@ -131,7 +131,9 @@ static int in6_mc_get(struct ifnet *, co static int in6m_get_source(struct in6_multi *inm, const struct in6_addr *addr, const int noalloc, struct ip6_msource **pims); +#ifdef KTR static int in6m_is_ifp_detached(const struct in6_multi *); +#endif static int in6m_merge(struct in6_multi *, /*const*/ struct in6_mfilter *); static void in6m_purge(struct in6_multi *); static void in6m_reap(struct in6_multi *); @@ -175,6 +177,7 @@ static SYSCTL_NODE(_net_inet6_ip6_mcast, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip6_mcast_filters, "Per-interface stack-wide source filters"); +#ifdef KTR /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -197,6 +200,7 @@ in6m_is_ifp_detached(const struct in6_mu return (ifp == NULL); } +#endif /* * Initialize an in6_mfilter structure to a known state at t0, t1 From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:26:27 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 890DB186; Sat, 28 Dec 2013 01:26:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8681168; Sat, 28 Dec 2013 01:26:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1QRvf021253; Sat, 28 Dec 2013 01:26:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1QQdL021250; Sat, 28 Dec 2013 01:26:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280126.rBS1QQdL021250@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259984 - in stable: 10/sys/rpc 9/sys/rpc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:26:27 -0000 Author: dim Date: Sat Dec 28 01:26:26 2013 New Revision: 259984 URL: http://svnweb.freebsd.org/changeset/base/259984 Log: MFC r259842: Remove some unused static const strings under sys/rpc, which have never been used since the initial commit (r177633). MFC r259843: Move a static const variable to the #if 0 part where it is only used. (Note the #if 0 part has been inactive since the initial commit, r177633, so maybe it should be removed altogether). Modified: stable/9/sys/rpc/clnt_dg.c stable/9/sys/rpc/clnt_vc.c stable/9/sys/rpc/rpcb_clnt.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/rpc/clnt_dg.c stable/10/sys/rpc/clnt_vc.c stable/10/sys/rpc/rpcb_clnt.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/rpc/clnt_dg.c ============================================================================== --- stable/9/sys/rpc/clnt_dg.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/9/sys/rpc/clnt_dg.c Sat Dec 28 01:26:26 2013 (r259984) @@ -93,8 +93,6 @@ static struct clnt_ops clnt_dg_ops = { .cl_control = clnt_dg_control }; -static const char mem_err_clnt_dg[] = "clnt_dg_create: out of memory"; - /* * A pending RPC request which awaits a reply. Requests which have * received their reply will have cr_xid set to zero and cr_mrep to Modified: stable/9/sys/rpc/clnt_vc.c ============================================================================== --- stable/9/sys/rpc/clnt_vc.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/9/sys/rpc/clnt_vc.c Sat Dec 28 01:26:26 2013 (r259984) @@ -145,11 +145,6 @@ struct ct_data { static void clnt_vc_upcallsdone(struct ct_data *); -static const char clnt_vc_errstr[] = "%s : %s"; -static const char clnt_vc_str[] = "clnt_vc_create"; -static const char clnt_read_vc_str[] = "read_vc"; -static const char __no_mem_str[] = "out of memory"; - /* * Create a client handle for a connection. * Default options are set, which the user can change using clnt_control()'s. Modified: stable/9/sys/rpc/rpcb_clnt.c ============================================================================== --- stable/9/sys/rpc/rpcb_clnt.c Sat Dec 28 01:19:48 2013 (r259983) +++ stable/9/sys/rpc/rpcb_clnt.c Sat Dec 28 01:26:26 2013 (r259984) @@ -82,13 +82,13 @@ __FBSDID("$FreeBSD$"); #include static struct timeval tottimeout = { 60, 0 }; -static const struct timeval rmttimeout = { 3, 0 }; static const char nullstring[] = "\000"; static CLIENT *local_rpcb(void); #if 0 +static const struct timeval rmttimeout = { 3, 0 }; static struct timeval rpcbrmttime = { 15, 0 }; #define CACHESIZE 6 From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:33:43 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14D28625; Sat, 28 Dec 2013 01:33:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F352711F9; Sat, 28 Dec 2013 01:33:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1XgiA024587; Sat, 28 Dec 2013 01:33:42 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1XgUC024586; Sat, 28 Dec 2013 01:33:42 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280133.rBS1XgUC024586@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259985 - in stable: 10/sys/dev/mwl 9/sys/dev/mwl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:33:43 -0000 Author: dim Date: Sat Dec 28 01:33:42 2013 New Revision: 259985 URL: http://svnweb.freebsd.org/changeset/base/259985 Log: MFC r259869: In sys/dev/mwl/if_mwl.c, put the static RD4() function under #ifdef MWL_DEBUG guards, since it only used in DPRINTF statements. Modified: stable/9/sys/dev/mwl/if_mwl.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/mwl/if_mwl.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/9/sys/dev/mwl/if_mwl.c Sat Dec 28 01:26:26 2013 (r259984) +++ stable/9/sys/dev/mwl/if_mwl.c Sat Dec 28 01:33:42 2013 (r259985) @@ -280,11 +280,13 @@ struct mwltxrec { * that all BAR 1 operations are done in the "hal" and * there should be no reference to them here. */ +#ifdef MWL_DEBUG static __inline uint32_t RD4(struct mwl_softc *sc, bus_size_t off) { return bus_space_read_4(sc->sc_io0t, sc->sc_io0h, off); } +#endif static __inline void WR4(struct mwl_softc *sc, bus_size_t off, uint32_t val) From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:42:20 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3C8D972; Sat, 28 Dec 2013 01:42:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FA01128C; Sat, 28 Dec 2013 01:42:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1gKtV027995; Sat, 28 Dec 2013 01:42:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1gKAo027994; Sat, 28 Dec 2013 01:42:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280142.rBS1gKAo027994@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259986 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:42:20 -0000 Author: dim Date: Sat Dec 28 01:42:20 2013 New Revision: 259986 URL: http://svnweb.freebsd.org/changeset/base/259986 Log: MFC r259875: In sys/kern/sched_ule.c, remove static function sched_both(), which is unused since r232207. Modified: stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Sat Dec 28 01:33:42 2013 (r259985) +++ stable/9/sys/kern/sched_ule.c Sat Dec 28 01:42:20 2013 (r259986) @@ -779,30 +779,6 @@ sched_highest(const struct cpu_group *cg return high.cs_cpu; } -/* - * Simultaneously find the highest and lowest loaded cpu reachable via - * cg. - */ -static inline void -sched_both(const struct cpu_group *cg, cpuset_t mask, int *lowcpu, int *highcpu) -{ - struct cpu_search high; - struct cpu_search low; - - low.cs_cpu = -1; - low.cs_prefer = -1; - low.cs_pri = -1; - low.cs_limit = INT_MAX; - low.cs_mask = mask; - high.cs_cpu = -1; - high.cs_limit = -1; - high.cs_mask = mask; - cpu_search_both(cg, &low, &high); - *lowcpu = low.cs_cpu; - *highcpu = high.cs_cpu; - return; -} - static void sched_balance_group(struct cpu_group *cg) { From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:47:19 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2FC6D23; Sat, 28 Dec 2013 01:47:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE72812A7; Sat, 28 Dec 2013 01:47:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1lJGb028613; Sat, 28 Dec 2013 01:47:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1lJdB028612; Sat, 28 Dec 2013 01:47:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280147.rBS1lJdB028612@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259987 - in stable: 10/sys/dev/sym 9/sys/dev/sym X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:47:19 -0000 Author: dim Date: Sat Dec 28 01:47:19 2013 New Revision: 259987 URL: http://svnweb.freebsd.org/changeset/base/259987 Log: MFC r259880: In sys/dev/sym/sym_hipd.c, remove static functions sym_que_first(), sym_que_last() and sym_remque_tail(), which are all unused since r53790. Modified: stable/9/sys/dev/sym/sym_hipd.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/sym/sym_hipd.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/9/sys/dev/sym/sym_hipd.c Sat Dec 28 01:42:20 2013 (r259986) +++ stable/9/sys/dev/sym/sym_hipd.c Sat Dec 28 01:47:19 2013 (r259987) @@ -151,16 +151,6 @@ typedef struct sym_quehead { (ptr)->flink = (ptr); (ptr)->blink = (ptr); \ } while (0) -static __inline struct sym_quehead *sym_que_first(struct sym_quehead *head) -{ - return (head->flink == head) ? NULL : head->flink; -} - -static __inline struct sym_quehead *sym_que_last(struct sym_quehead *head) -{ - return (head->blink == head) ? NULL : head->blink; -} - static __inline void __sym_que_add(struct sym_quehead * new, struct sym_quehead * blink, struct sym_quehead * flink) @@ -222,17 +212,6 @@ static __inline struct sym_quehead *sym_ #define sym_insque_tail(new, head) __sym_que_add(new, (head)->blink, head) -static __inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head) -{ - struct sym_quehead *elem = head->blink; - - if (elem != head) - __sym_que_del(elem->blink, head); - else - elem = NULL; - return elem; -} - /* * This one may be useful. */ From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:52:52 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC6A5FE8; Sat, 28 Dec 2013 01:52:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7A35130E; Sat, 28 Dec 2013 01:52:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1qq36031692; Sat, 28 Dec 2013 01:52:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1qqtv031691; Sat, 28 Dec 2013 01:52:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280152.rBS1qqtv031691@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:52:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259988 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:52:52 -0000 Author: dim Date: Sat Dec 28 01:52:52 2013 New Revision: 259988 URL: http://svnweb.freebsd.org/changeset/base/259988 Log: MFC r259876: In sys/kern/subr_witness.c, remove static function witness_lock_order_key_empty(), which is unused since r181695. Modified: stable/9/sys/kern/subr_witness.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/subr_witness.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/subr_witness.c ============================================================================== --- stable/9/sys/kern/subr_witness.c Sat Dec 28 01:47:19 2013 (r259987) +++ stable/9/sys/kern/subr_witness.c Sat Dec 28 01:52:52 2013 (r259988) @@ -305,13 +305,6 @@ witness_lock_type_equal(struct witness * } static __inline int -witness_lock_order_key_empty(const struct witness_lock_order_key *key) -{ - - return (key->from == 0 && key->to == 0); -} - -static __inline int witness_lock_order_key_equal(const struct witness_lock_order_key *a, const struct witness_lock_order_key *b) { From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 01:56:05 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42675426; Sat, 28 Dec 2013 01:56:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14141131C; Sat, 28 Dec 2013 01:56:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS1u45P032132; Sat, 28 Dec 2013 01:56:04 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS1u4Hh032131; Sat, 28 Dec 2013 01:56:04 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280156.rBS1u4Hh032131@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 01:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259989 - in stable: 10/contrib/llvm/lib/Target/X86 9/contrib/llvm/lib/Target/X86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 01:56:05 -0000 Author: dim Date: Sat Dec 28 01:56:04 2013 New Revision: 259989 URL: http://svnweb.freebsd.org/changeset/base/259989 Log: MFC r259888: Pull in r183971 from upstream llvm trunk: X86: cvtpi2ps is just an SSE instruction with MMX operands. It has no AVX equivalent. Give it the right register format so we can also emit it when AVX is enabled. This should fix a "Cannot select: intrinsic %llvm.x86.sse.cvtpi2ps" fatal error in clang while building the gnuradio port for amd64. Reported by: db Modified: stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/lib/Target/X86/X86InstrMMX.td Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td Sat Dec 28 01:52:52 2013 (r259988) +++ stable/9/contrib/llvm/lib/Target/X86/X86InstrMMX.td Sat Dec 28 01:56:04 2013 (r259989) @@ -189,13 +189,14 @@ multiclass sse12_cvt_pint opc, R multiclass sse12_cvt_pint_3addr opc, RegisterClass SrcRC, RegisterClass DstRC, Intrinsic Int, X86MemOperand x86memop, PatFrag ld_frag, string asm, Domain d> { - def irr : PI; - def irm : PI; + def irr : MMXPI; + def irm : MMXPI; } //===----------------------------------------------------------------------===// From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 02:00:33 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC4537EA; Sat, 28 Dec 2013 02:00:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D81FB132B; Sat, 28 Dec 2013 02:00:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS20XDr033457; Sat, 28 Dec 2013 02:00:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS20Xna033456; Sat, 28 Dec 2013 02:00:33 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280200.rBS20Xna033456@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259990 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:00:34 -0000 Author: dim Date: Sat Dec 28 02:00:33 2013 New Revision: 259990 URL: http://svnweb.freebsd.org/changeset/base/259990 Log: MFC r259892: In sys/kern/vfs_mountroot.c, remove static function parse_isspace(), which is unused since r214006. Modified: stable/9/sys/kern/vfs_mountroot.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/vfs_mountroot.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/vfs_mountroot.c ============================================================================== --- stable/9/sys/kern/vfs_mountroot.c Sat Dec 28 01:56:04 2013 (r259989) +++ stable/9/sys/kern/vfs_mountroot.c Sat Dec 28 02:00:33 2013 (r259990) @@ -389,13 +389,6 @@ parse_advance(char **conf) (*conf)++; } -static __inline int -parse_isspace(int c) -{ - - return ((c == ' ' || c == '\t' || c == '\n') ? 1 : 0); -} - static int parse_skipto(char **conf, int mc) { From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 02:11:18 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 066EDBC3; Sat, 28 Dec 2013 02:11:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E490813AC; Sat, 28 Dec 2013 02:11:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS2BH5a039630; Sat, 28 Dec 2013 02:11:17 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS2BHpB039629; Sat, 28 Dec 2013 02:11:17 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280211.rBS2BHpB039629@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259992 - in stable: 10/sys/dev/cxgb/common 9/sys/dev/cxgb/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:11:18 -0000 Author: dim Date: Sat Dec 28 02:11:17 2013 New Revision: 259992 URL: http://svnweb.freebsd.org/changeset/base/259992 Log: MFC r259896: In sys/dev/cxgb/common/cxgb_mc5.c, remove static function dbgi_wr_addr3(), which is unused since r167514. Modified: stable/9/sys/dev/cxgb/common/cxgb_mc5.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/cxgb/common/cxgb_mc5.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/cxgb/common/cxgb_mc5.c ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_mc5.c Sat Dec 28 02:07:29 2013 (r259991) +++ stable/9/sys/dev/cxgb/common/cxgb_mc5.c Sat Dec 28 02:11:17 2013 (r259992) @@ -98,13 +98,6 @@ static int mc5_cmd_write(adapter_t *adap F_DBGIRSPVALID, 1, MAX_WRITE_ATTEMPTS, 1); } -static inline void dbgi_wr_addr3(adapter_t *adapter, u32 v1, u32 v2, u32 v3) -{ - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR0, v1); - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR1, v2); - t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_ADDR2, v3); -} - static inline void dbgi_wr_data3(adapter_t *adapter, u32 v1, u32 v2, u32 v3) { t3_write_reg(adapter, A_MC5_DB_DBGI_REQ_DATA0, v1); From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 02:15:31 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C4E6ED5; Sat, 28 Dec 2013 02:15:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1C921451; Sat, 28 Dec 2013 02:15:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBS2FUk2040324; Sat, 28 Dec 2013 02:15:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBS2FUgV040323; Sat, 28 Dec 2013 02:15:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201312280215.rBS2FUgV040323@svn.freebsd.org> From: Dimitry Andric Date: Sat, 28 Dec 2013 02:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259993 - in stable: 10/sys/dev/cxgb/ulp/tom 9/sys/dev/cxgb/ulp/tom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 02:15:31 -0000 Author: dim Date: Sat Dec 28 02:15:30 2013 New Revision: 259993 URL: http://svnweb.freebsd.org/changeset/base/259993 Log: MFC r259897: In sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c, remove static functions mk_cpl_barrier_ulp(), mk_get_tcb_ulp() and mk_set_tcb_field_ulp(), which are all unused since r237263. Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sat Dec 28 02:11:17 2013 (r259992) +++ stable/9/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Sat Dec 28 02:15:30 2013 (r259993) @@ -1794,53 +1794,6 @@ do_wr_ack(struct sge_qset *qs, struct rs return (0); } -/* - * Build a CPL_BARRIER message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_cpl_barrier_ulp(struct cpl_barrier *b) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)b; - - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*b) / 8)); - b->opcode = CPL_BARRIER; -} - -/* - * Build a CPL_GET_TCB message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_get_tcb_ulp(struct cpl_get_tcb *req, unsigned int tid, unsigned int cpuno) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - - txpkt = (struct ulp_txpkt *)req; - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_GET_TCB, tid)); - req->cpuno = htons(cpuno); -} - -/* - * Build a CPL_SET_TCB_FIELD message as payload of a ULP_TX_PKT command. - */ -static inline void -mk_set_tcb_field_ulp(struct cpl_set_tcb_field *req, unsigned int tid, - unsigned int word, uint64_t mask, uint64_t val) -{ - struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; - - txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); - txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); - OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); - req->reply = V_NO_REPLY(1); - req->cpu_idx = 0; - req->word = htons(word); - req->mask = htobe64(mask); - req->val = htobe64(val); -} - void t3_init_cpl_io(struct adapter *sc) { From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 19:22:25 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C5B73C5; Sat, 28 Dec 2013 19:22:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 660E31383; Sat, 28 Dec 2013 19:22:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSJMPui018485; Sat, 28 Dec 2013 19:22:25 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSJMN6G018473; Sat, 28 Dec 2013 19:22:23 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201312281922.rBSJMN6G018473@svn.freebsd.org> From: Mikolaj Golub Date: Sat, 28 Dec 2013 19:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260007 - in stable/9/sbin: hastctl hastd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 19:22:25 -0000 Author: trociny Date: Sat Dec 28 19:22:23 2013 New Revision: 260007 URL: http://svnweb.freebsd.org/changeset/base/260007 Log: MFC r257155, r257582, r259191, r259192, r259193, r259194, r259195, r259196: r257155: Make hastctl list command output current queue sizes. Reviewed by: pjd r257582 (pjd): Correct alignment. r259191: For memsync replication, hio_countdown is used not only as an indication when a request can be moved to done queue, but also for detecting the current state of memsync request. This approach has problems, e.g. leaking a request if memsynk ack from the secondary failed, or racy usage of write_complete, which should be called only once per write request, but for memsync can be entered by local_send_thread and ggate_send_thread simultaneously. So the following approach is implemented instead: 1) Use hio_countdown only for counting components we waiting to complete, i.e. initially it is always 2 for any replication mode. 2) To distinguish between "memsync ack" and "memsync fin" responses from the secondary, add and use hio_memsyncacked field. 3) write_complete() in component threads is called only before releasing hio_countdown (i.e. before the hio may be returned to the done queue). 4) Add and use hio_writecount refcounter to detect when write_complete() can be called in memsync case. Reported by: Pete French petefrench ingresso.co.uk Tested by: Pete French petefrench ingresso.co.uk r259192: Add some macros to make the code more readable (no functional chages). r259193: Fix compiler warnings. r259194: In remote_send_thread, if sending a request fails don't take the request back from the receive queue -- it might already be processed by remote_recv_thread, which lead to crashes like below: (primary) Unable to receive reply header: Connection reset by peer. (primary) Unable to send request (Connection reset by peer): WRITE(954662912, 131072). (primary) Disconnected from kopusha:7772. (primary) Increasing localcnt to 1. (primary) Assertion failed: (old > 0), function refcnt_release, file refcnt.h, line 62. Taking the request back was not necessary (it would properly be processed by the remote_recv_thread) and only complicated things. r259195: Send wakeup to threads waiting on empty queue before releasing the lock to decrease spurious wakeups. Submitted by: davidxu r259196: Check remote protocol version only for the first connection (when it is actually sent by the remote node). Otherwise it generated confusing "Negotiated protocol version 1" debug messages when processing the second connection. Modified: stable/9/sbin/hastctl/hastctl.c stable/9/sbin/hastd/control.c stable/9/sbin/hastd/hast.h stable/9/sbin/hastd/hastd.8 stable/9/sbin/hastd/hastd.c stable/9/sbin/hastd/nv.c stable/9/sbin/hastd/primary.c stable/9/sbin/hastd/proto.c stable/9/sbin/hastd/secondary.c Directory Properties: stable/9/sbin/hastctl/ (props changed) stable/9/sbin/hastd/ (props changed) Modified: stable/9/sbin/hastctl/hastctl.c ============================================================================== --- stable/9/sbin/hastctl/hastctl.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastctl/hastctl.c Sat Dec 28 19:22:23 2013 (r260007) @@ -355,6 +355,13 @@ control_list(struct nv *nv) (uintmax_t)nv_get_uint64(nv, "stat_write_error%u", ii), (uintmax_t)nv_get_uint64(nv, "stat_delete_error%u", ii), (uintmax_t)nv_get_uint64(nv, "stat_flush_error%u", ii)); + printf(" queues: " + "local: %ju, send: %ju, recv: %ju, done: %ju, idle: %ju\n", + (uintmax_t)nv_get_uint64(nv, "local_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "send_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "recv_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "done_queue_size%u", ii), + (uintmax_t)nv_get_uint64(nv, "idle_queue_size%u", ii)); } return (ret); } Modified: stable/9/sbin/hastd/control.c ============================================================================== --- stable/9/sbin/hastd/control.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/control.c Sat Dec 28 19:22:23 2013 (r260007) @@ -215,6 +215,16 @@ control_status_worker(struct hast_resour "stat_delete_error%u", no); nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_flush_error"), "stat_flush_error%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "idle_queue_size"), + "idle_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "local_queue_size"), + "local_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "send_queue_size"), + "send_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "recv_queue_size"), + "recv_queue_size%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "done_queue_size"), + "done_queue_size%u", no); end: if (cnvin != NULL) nv_free(cnvin); @@ -478,6 +488,7 @@ ctrl_thread(void *arg) nv_add_uint64(nvout, res->hr_stat_flush_error + res->hr_stat_activemap_flush_error, "stat_flush_error"); + res->output_status_aux(nvout); nv_add_int16(nvout, 0, "error"); break; case CONTROL_RELOAD: Modified: stable/9/sbin/hastd/hast.h ============================================================================== --- stable/9/sbin/hastd/hast.h Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/hast.h Sat Dec 28 19:22:23 2013 (r260007) @@ -137,6 +137,8 @@ struct hastd_config { #define HAST_CHECKSUM_CRC32 1 #define HAST_CHECKSUM_SHA256 2 +struct nv; + /* * Structure that describes single resource. */ @@ -254,6 +256,9 @@ struct hast_resource { /* Number of activemap flush errors. */ uint64_t hr_stat_activemap_flush_error; + /* Function to output worker specific info on control status request. */ + void (*output_status_aux)(struct nv *); + /* Next resource. */ TAILQ_ENTRY(hast_resource) hr_next; }; Modified: stable/9/sbin/hastd/hastd.8 ============================================================================== --- stable/9/sbin/hastd/hastd.8 Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/hastd.8 Sat Dec 28 19:22:23 2013 (r260007) @@ -171,7 +171,7 @@ The default location is .Pa /var/run/hastd.pid . .El .Sh FILES -.Bl -tag -width ".Pa /var/run/hastctl" -compact +.Bl -tag -width ".Pa /var/run/hastd.pid" -compact .It Pa /etc/hast.conf The configuration file for .Nm Modified: stable/9/sbin/hastd/hastd.c ============================================================================== --- stable/9/sbin/hastd/hastd.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/hastd.c Sat Dec 28 19:22:23 2013 (r260007) @@ -806,12 +806,6 @@ listen_accept(struct hastd_listen *lst) */ version = 1; } - if (version > HAST_PROTO_VERSION) { - pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", - version, (unsigned char)HAST_PROTO_VERSION); - version = HAST_PROTO_VERSION; - } - pjdlog_debug(1, "Negotiated protocol version %hhu.", version); token = nv_get_uint8_array(nvin, &size, "token"); /* * NULL token means that this is first connection. @@ -925,6 +919,12 @@ listen_accept(struct hastd_listen *lst) */ if (token == NULL) { + if (version > HAST_PROTO_VERSION) { + pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", + version, (unsigned char)HAST_PROTO_VERSION); + version = HAST_PROTO_VERSION; + } + pjdlog_debug(1, "Negotiated protocol version %hhu.", version); res->hr_version = version; arc4random_buf(res->hr_token, sizeof(res->hr_token)); nvout = nv_alloc(); Modified: stable/9/sbin/hastd/nv.c ============================================================================== --- stable/9/sbin/hastd/nv.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/nv.c Sat Dec 28 19:22:23 2013 (r260007) @@ -566,7 +566,7 @@ nv_get_string(struct nv *nv, const char return (NULL); PJDLOG_ASSERT((nvh->nvh_type & NV_ORDER_MASK) == NV_ORDER_HOST); PJDLOG_ASSERT(nvh->nvh_dsize >= 1); - str = NVH_DATA(nvh); + str = (char *)NVH_DATA(nvh); PJDLOG_ASSERT(str[nvh->nvh_dsize - 1] == '\0'); PJDLOG_ASSERT(strlen(str) == nvh->nvh_dsize - 1); return (str); Modified: stable/9/sbin/hastd/primary.c ============================================================================== --- stable/9/sbin/hastd/primary.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/primary.c Sat Dec 28 19:22:23 2013 (r260007) @@ -94,6 +94,15 @@ struct hio { */ bool hio_done; /* + * Number of components we are still waiting before sending write + * completion ack to GEOM Gate. Used for memsync. + */ + unsigned int hio_writecount; + /* + * Memsync request was acknowleged by remote. + */ + bool hio_memsyncacked; + /* * Remember replication from the time the request was initiated, * so we won't get confused when replication changes on reload. */ @@ -108,6 +117,7 @@ struct hio { * until some in-progress requests are freed. */ static TAILQ_HEAD(, hio) hio_free_list; +static size_t hio_free_list_size; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* @@ -116,20 +126,26 @@ static pthread_cond_t hio_free_list_cond * responsible for managing his own send list. */ static TAILQ_HEAD(, hio) *hio_send_list; +static size_t *hio_send_list_size; static pthread_mutex_t *hio_send_list_lock; static pthread_cond_t *hio_send_list_cond; +#define hio_send_local_list_size hio_send_list_size[0] +#define hio_send_remote_list_size hio_send_list_size[1] /* * There is one recv list for every component, although local components don't * use recv lists as local requests are done synchronously. */ static TAILQ_HEAD(, hio) *hio_recv_list; +static size_t *hio_recv_list_size; static pthread_mutex_t *hio_recv_list_lock; static pthread_cond_t *hio_recv_list_cond; +#define hio_recv_remote_list_size hio_recv_list_size[1] /* * Request is placed on done list by the slowest component (the one that * decreased hio_countdown from 1 to 0). */ static TAILQ_HEAD(, hio) hio_done_list; +static size_t hio_done_list_size; static pthread_mutex_t hio_done_list_lock; static pthread_cond_t hio_done_list_cond; /* @@ -164,25 +180,21 @@ static pthread_mutex_t metadata_lock; ((res)->hr_remotein != NULL && (res)->hr_remoteout != NULL) #define QUEUE_INSERT1(hio, name, ncomp) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock[(ncomp)]); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list[(ncomp)]); \ + if (TAILQ_EMPTY(&hio_##name##_list[(ncomp)])) \ + cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ TAILQ_INSERT_TAIL(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ - mtx_unlock(&hio_##name##_list_lock[ncomp]); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond[(ncomp)]); \ + hio_##name##_list_size[(ncomp)]++; \ + mtx_unlock(&hio_##name##_list_lock[(ncomp)]); \ } while (0) #define QUEUE_INSERT2(hio, name) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_##name##_next);\ + hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE1(hio, name, ncomp, timeout) do { \ bool _last; \ @@ -196,6 +208,8 @@ static pthread_mutex_t metadata_lock; _last = true; \ } \ if (hio != NULL) { \ + PJDLOG_ASSERT(hio_##name##_list_size[(ncomp)] != 0); \ + hio_##name##_list_size[(ncomp)]--; \ TAILQ_REMOVE(&hio_##name##_list[(ncomp)], (hio), \ hio_next[(ncomp)]); \ } \ @@ -207,10 +221,16 @@ static pthread_mutex_t metadata_lock; cv_wait(&hio_##name##_list_cond, \ &hio_##name##_list_lock); \ } \ + PJDLOG_ASSERT(hio_##name##_list_size != 0); \ + hio_##name##_list_size--; \ TAILQ_REMOVE(&hio_##name##_list, (hio), hio_##name##_next); \ mtx_unlock(&hio_##name##_list_lock); \ } while (0) +#define ISFULLSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_FULLSYNC) +#define ISMEMSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_MEMSYNC) +#define ISASYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_ASYNC) + #define SYNCREQ(hio) do { \ (hio)->hio_ggio.gctl_unit = -1; \ (hio)->hio_ggio.gctl_seq = 1; \ @@ -219,6 +239,9 @@ static pthread_mutex_t metadata_lock; #define SYNCREQDONE(hio) do { (hio)->hio_ggio.gctl_unit = -2; } while (0) #define ISSYNCREQDONE(hio) ((hio)->hio_ggio.gctl_unit == -2) +#define ISMEMSYNCWRITE(hio) (ISMEMSYNC(hio) && \ + (hio)->hio_ggio.gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) + static struct hast_resource *gres; static pthread_mutex_t range_lock; @@ -239,6 +262,22 @@ static void *sync_thread(void *arg); static void *guard_thread(void *arg); static void +output_status_aux(struct nv *nvout) +{ + + nv_add_uint64(nvout, (uint64_t)hio_free_list_size, + "idle_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_local_list_size, + "local_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_remote_list_size, + "send_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_recv_remote_list_size, + "recv_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_done_list_size, + "done_queue_size"); +} + +static void cleanup(struct hast_resource *res) { int rerrno; @@ -355,6 +394,12 @@ init_environment(struct hast_resource *r "Unable to allocate %zu bytes of memory for send lists.", sizeof(hio_send_list[0]) * ncomps); } + hio_send_list_size = malloc(sizeof(hio_send_list_size[0]) * ncomps); + if (hio_send_list_size == NULL) { + primary_exitx(EX_TEMPFAIL, + "Unable to allocate %zu bytes of memory for send list counters.", + sizeof(hio_send_list_size[0]) * ncomps); + } hio_send_list_lock = malloc(sizeof(hio_send_list_lock[0]) * ncomps); if (hio_send_list_lock == NULL) { primary_exitx(EX_TEMPFAIL, @@ -373,6 +418,12 @@ init_environment(struct hast_resource *r "Unable to allocate %zu bytes of memory for recv lists.", sizeof(hio_recv_list[0]) * ncomps); } + hio_recv_list_size = malloc(sizeof(hio_recv_list_size[0]) * ncomps); + if (hio_recv_list_size == NULL) { + primary_exitx(EX_TEMPFAIL, + "Unable to allocate %zu bytes of memory for recv list counters.", + sizeof(hio_recv_list_size[0]) * ncomps); + } hio_recv_list_lock = malloc(sizeof(hio_recv_list_lock[0]) * ncomps); if (hio_recv_list_lock == NULL) { primary_exitx(EX_TEMPFAIL, @@ -393,16 +444,18 @@ init_environment(struct hast_resource *r } /* - * Initialize lists, their locks and theirs condition variables. + * Initialize lists, their counters, locks and condition variables. */ TAILQ_INIT(&hio_free_list); mtx_init(&hio_free_list_lock); cv_init(&hio_free_list_cond); for (ii = 0; ii < HAST_NCOMPONENTS; ii++) { TAILQ_INIT(&hio_send_list[ii]); + hio_send_list_size[ii] = 0; mtx_init(&hio_send_list_lock[ii]); cv_init(&hio_send_list_cond[ii]); TAILQ_INIT(&hio_recv_list[ii]); + hio_recv_list_size[ii] = 0; mtx_init(&hio_recv_list_lock[ii]); cv_init(&hio_recv_list_cond[ii]); rw_init(&hio_remote_lock[ii]); @@ -445,6 +498,7 @@ init_environment(struct hast_resource *r hio->hio_ggio.gctl_length = MAXPHYS; hio->hio_ggio.gctl_error = 0; TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_free_next); + hio_free_list_size++; } } @@ -963,6 +1017,7 @@ hastd_primary(struct hast_resource *res) } gres = res; + res->output_status_aux = output_status_aux; mode = pjdlog_mode_get(); debuglevel = pjdlog_debug_get(); @@ -1299,6 +1354,10 @@ ggate_recv_thread(void *arg) } else { mtx_unlock(&res->hr_amp_lock); } + if (ISMEMSYNC(hio)) { + hio->hio_memsyncacked = false; + hio->hio_writecount = ncomps; + } break; case BIO_DELETE: res->hr_stat_delete++; @@ -1310,11 +1369,6 @@ ggate_recv_thread(void *arg) pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); hio->hio_countdown = ncomps; - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE) { - /* Each remote request needs two responses in memsync. */ - hio->hio_countdown++; - } for (ii = ncomp; ii < ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } @@ -1385,8 +1439,7 @@ local_send_thread(void *arg) ret, (intmax_t)ggio->gctl_length); } else { hio->hio_errors[ncomp] = 0; - if (hio->hio_replication == - HAST_REPLICATION_ASYNC) { + if (ISASYNC(hio)) { ggio->gctl_error = 0; write_complete(res, hio); } @@ -1424,42 +1477,13 @@ local_send_thread(void *arg) } break; } - - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - ggio->gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * 0: remote memsync, remote final, local write - * 1: remote memsync, local write, (remote final) - * 2: local write, (remote memsync), (remote final) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Local write finished as last. - */ - break; - case 1: - /* - * Local write finished after remote memsync - * reply arrvied. We can complete the write now. - */ - if (hio->hio_errors[0] == 0) - write_complete(res, hio); - continue; - case 2: - /* - * Local write finished as first. - */ - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + write_complete(res, hio); } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1581,10 +1605,8 @@ remote_send_thread(void *arg) nv_add_uint64(nv, (uint64_t)ggio->gctl_seq, "seq"); nv_add_uint64(nv, offset, "offset"); nv_add_uint64(nv, length, "length"); - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && - ggio->gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) { + if (ISMEMSYNCWRITE(hio)) nv_add_uint8(nv, 1, "memsync"); - } if (nv_error(nv) != 0) { hio->hio_errors[ncomp] = nv_error(nv); pjdlog_debug(2, @@ -1616,6 +1638,7 @@ remote_send_thread(void *arg) mtx_lock(&hio_recv_list_lock[ncomp]); wakeup = TAILQ_EMPTY(&hio_recv_list[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); if (hast_proto_send(res, res->hr_remoteout, nv, data, data != NULL ? length : 0) == -1) { @@ -1627,17 +1650,9 @@ remote_send_thread(void *arg) "Unable to send request (%s): ", strerror(hio->hio_errors[ncomp])); remote_close(res, ncomp); - /* - * Take request back from the receive queue and move - * it immediately to the done queue. - */ - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_REMOVE(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - mtx_unlock(&hio_recv_list_lock[ncomp]); - goto done_queue; + } else { + rw_unlock(&hio_remote_lock[ncomp]); } - rw_unlock(&hio_remote_lock[ncomp]); nv_free(nv); if (wakeup) cv_signal(&hio_recv_list_cond[ncomp]); @@ -1661,8 +1676,12 @@ done_queue: } else { mtx_unlock(&res->hr_amp_lock); } - if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) - (void)refcnt_release(&hio->hio_countdown); + if (ISMEMSYNCWRITE(hio)) { + if (refcnt_release(&hio->hio_writecount) == 0) { + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + } + } } if (refcnt_release(&hio->hio_countdown) > 0) continue; @@ -1718,7 +1737,9 @@ remote_recv_thread(void *arg) PJDLOG_ASSERT(hio != NULL); TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]--; mtx_unlock(&hio_recv_list_lock[ncomp]); + hio->hio_errors[ncomp] = ENOTCONN; goto done_queue; } if (hast_proto_recv_hdr(res->hr_remotein, &nv) == -1) { @@ -1741,6 +1762,7 @@ remote_recv_thread(void *arg) if (hio->hio_ggio.gctl_seq == seq) { TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]--; break; } } @@ -1791,80 +1813,34 @@ remote_recv_thread(void *arg) hio->hio_errors[ncomp] = 0; nv_free(nv); done_queue: - if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || - hio->hio_ggio.gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { - if (refcnt_release(&hio->hio_countdown) > 0) - continue; - } else { - /* - * Depending on hio_countdown value, requests finished - * in the following order: - * - * 0: local write, remote memsync, remote final - * or - * 0: remote memsync, local write, remote final - * - * 1: local write, remote memsync, (remote final) - * or - * 1: remote memsync, remote final, (local write) - * - * 2: remote memsync, (local write), (remote final) - * or - * 2: remote memsync, (remote final), (local write) - */ - switch (refcnt_release(&hio->hio_countdown)) { - case 0: - /* - * Remote final reply arrived. - */ - PJDLOG_ASSERT(!memsyncack); - break; - case 1: - if (memsyncack) { - /* - * Local request already finished, so we - * can complete the write. - */ + if (ISMEMSYNCWRITE(hio)) { + if (!hio->hio_memsyncacked) { + PJDLOG_ASSERT(memsyncack || + hio->hio_errors[ncomp] != 0); + /* Remote ack arrived. */ + if (refcnt_release(&hio->hio_writecount) == 0) { if (hio->hio_errors[0] == 0) write_complete(res, hio); - /* - * We still need to wait for final - * remote reply. - */ + } + hio->hio_memsyncacked = true; + if (hio->hio_errors[ncomp] == 0) { pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); + "remote_recv: (%p) Moving request " + "back to the recv queue.", hio); mtx_lock(&hio_recv_list_lock[ncomp]); TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]); + hio_recv_list_size[ncomp]++; mtx_unlock(&hio_recv_list_lock[ncomp]); - } else { - /* - * Remote final reply arrived before - * local write finished. - * Nothing to do in such case. - */ + continue; } - continue; - case 2: - /* - * We received remote memsync reply even before - * local write finished. - */ - PJDLOG_ASSERT(memsyncack); - - pjdlog_debug(2, - "remote_recv: (%p) Moving request back to the recv queue.", - hio); - mtx_lock(&hio_recv_list_lock[ncomp]); - TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, - hio_next[ncomp]); - mtx_unlock(&hio_recv_list_lock[ncomp]); - continue; - default: - PJDLOG_ABORT("Invalid hio_countdown."); + } else { + PJDLOG_ASSERT(!memsyncack); + /* Remote final reply arrived. */ } } + if (refcnt_release(&hio->hio_countdown) > 0) + continue; if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); Modified: stable/9/sbin/hastd/proto.c ============================================================================== --- stable/9/sbin/hastd/proto.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/proto.c Sat Dec 28 19:22:23 2013 (r260007) @@ -298,8 +298,8 @@ proto_connection_send(const struct proto protoname = mconn->pc_proto->prt_name; PJDLOG_ASSERT(protoname != NULL); - ret = conn->pc_proto->prt_send(conn->pc_ctx, protoname, - strlen(protoname) + 1, fd); + ret = conn->pc_proto->prt_send(conn->pc_ctx, + (const unsigned char *)protoname, strlen(protoname) + 1, fd); proto_close(mconn); if (ret != 0) { errno = ret; @@ -325,7 +325,7 @@ proto_connection_recv(const struct proto bzero(protoname, sizeof(protoname)); - ret = conn->pc_proto->prt_recv(conn->pc_ctx, protoname, + ret = conn->pc_proto->prt_recv(conn->pc_ctx, (unsigned char *)protoname, sizeof(protoname) - 1, &fd); if (ret != 0) { errno = ret; Modified: stable/9/sbin/hastd/secondary.c ============================================================================== --- stable/9/sbin/hastd/secondary.c Sat Dec 28 19:21:22 2013 (r260006) +++ stable/9/sbin/hastd/secondary.c Sat Dec 28 19:22:23 2013 (r260007) @@ -82,18 +82,21 @@ static struct hast_resource *gres; * until some in-progress requests are freed. */ static TAILQ_HEAD(, hio) hio_free_list; +static size_t hio_free_list_size; static pthread_mutex_t hio_free_list_lock; static pthread_cond_t hio_free_list_cond; /* * Disk thread (the one that does I/O requests) takes requests from this list. */ static TAILQ_HEAD(, hio) hio_disk_list; +static size_t hio_disk_list_size; static pthread_mutex_t hio_disk_list_lock; static pthread_cond_t hio_disk_list_cond; /* * Thread that sends requests back to primary takes requests from this list. */ static TAILQ_HEAD(, hio) hio_send_list; +static size_t hio_send_list_size; static pthread_mutex_t hio_send_list_lock; static pthread_cond_t hio_send_list_cond; @@ -107,14 +110,12 @@ static void *disk_thread(void *arg); static void *send_thread(void *arg); #define QUEUE_INSERT(name, hio) do { \ - bool _wakeup; \ - \ mtx_lock(&hio_##name##_list_lock); \ - _wakeup = TAILQ_EMPTY(&hio_##name##_list); \ + if (TAILQ_EMPTY(&hio_##name##_list)) \ + cv_broadcast(&hio_##name##_list_cond); \ TAILQ_INSERT_TAIL(&hio_##name##_list, (hio), hio_next); \ + hio_##name##_list_size++; \ mtx_unlock(&hio_##name##_list_lock); \ - if (_wakeup) \ - cv_broadcast(&hio_##name##_list_cond); \ } while (0) #define QUEUE_TAKE(name, hio) do { \ mtx_lock(&hio_##name##_list_lock); \ @@ -122,11 +123,22 @@ static void *send_thread(void *arg); cv_wait(&hio_##name##_list_cond, \ &hio_##name##_list_lock); \ } \ + PJDLOG_ASSERT(hio_##name##_list_size != 0); \ + hio_##name##_list_size--; \ TAILQ_REMOVE(&hio_##name##_list, (hio), hio_next); \ mtx_unlock(&hio_##name##_list_lock); \ } while (0) static void +output_status_aux(struct nv *nvout) +{ + + nv_add_uint64(nvout, (uint64_t)hio_free_list_size, "idle_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_disk_list_size, "local_queue_size"); + nv_add_uint64(nvout, (uint64_t)hio_send_list_size, "send_queue_size"); +} + +static void hio_clear(struct hio *hio) { @@ -190,6 +202,7 @@ init_environment(void) } hio_clear(hio); TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_next); + hio_free_list_size++; } } @@ -441,6 +454,7 @@ hastd_secondary(struct hast_resource *re } gres = res; + res->output_status_aux = output_status_aux; mode = pjdlog_mode_get(); debuglevel = pjdlog_debug_get(); From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 28 20:03:17 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC6A0F73; Sat, 28 Dec 2013 20:03:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C712C1617; Sat, 28 Dec 2013 20:03:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBSK3H8U033589; Sat, 28 Dec 2013 20:03:17 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBSK3EPG033570; Sat, 28 Dec 2013 20:03:14 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312282003.rBSK3EPG033570@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 28 Dec 2013 20:03:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260012 - in stable/9/contrib/gcc: . cp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Dec 2013 20:03:17 -0000 Author: pfg Date: Sat Dec 28 20:03:14 2013 New Revision: 260012 URL: http://svnweb.freebsd.org/changeset/base/260012 Log: MFC r259666, r259696: gcc: warnings from -Wformat-security Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921) Modified: stable/9/contrib/gcc/c-common.c stable/9/contrib/gcc/c-convert.c stable/9/contrib/gcc/c-incpath.c stable/9/contrib/gcc/c-typeck.c stable/9/contrib/gcc/cfg.c stable/9/contrib/gcc/collect2.c stable/9/contrib/gcc/cp/cvt.c stable/9/contrib/gcc/cp/pt.c stable/9/contrib/gcc/cp/typeck.c stable/9/contrib/gcc/fold-const.c stable/9/contrib/gcc/gcc.c stable/9/contrib/gcc/gcov.c stable/9/contrib/gcc/tlink.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/c-common.c ============================================================================== --- stable/9/contrib/gcc/c-common.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/c-common.c Sat Dec 28 20:03:14 2013 (r260012) @@ -5983,11 +5983,11 @@ c_parse_error (const char *gmsgid, enum message = NULL; } else - error (gmsgid); + error (gmsgid, ""); if (message) { - error (message); + error (message, ""); free (message); } #undef catenate_messages Modified: stable/9/contrib/gcc/c-convert.c ============================================================================== --- stable/9/contrib/gcc/c-convert.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/c-convert.c Sat Dec 28 20:03:14 2013 (r260012) @@ -80,7 +80,7 @@ convert (tree type, tree expr) if ((invalid_conv_diag = targetm.invalid_conversion (TREE_TYPE (expr), type))) { - error (invalid_conv_diag); + error (invalid_conv_diag, ""); return error_mark_node; } Modified: stable/9/contrib/gcc/c-incpath.c ============================================================================== --- stable/9/contrib/gcc/c-incpath.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/c-incpath.c Sat Dec 28 20:03:14 2013 (r260012) @@ -72,7 +72,7 @@ free_path (struct cpp_dir *path, int rea case REASON_DUP_SYS: fprintf (stderr, _("ignoring duplicate directory \"%s\"\n"), path->name); if (reason == REASON_DUP_SYS) - fprintf (stderr, + fprintf (stderr, "%s", _(" as it is a non-system directory that duplicates a system directory\n")); break; @@ -292,16 +292,16 @@ merge_include_chains (cpp_reader *pfile, { struct cpp_dir *p; - fprintf (stderr, _("#include \"...\" search starts here:\n")); + fprintf (stderr, "%s", _("#include \"...\" search starts here:\n")); for (p = heads[QUOTE];; p = p->next) { if (p == heads[BRACKET]) - fprintf (stderr, _("#include <...> search starts here:\n")); + fprintf (stderr, "%s", _("#include <...> search starts here:\n")); if (!p) break; fprintf (stderr, " %s\n", p->name); } - fprintf (stderr, _("End of search list.\n")); + fprintf (stderr, "%s", _("End of search list.\n")); } } Modified: stable/9/contrib/gcc/c-typeck.c ============================================================================== --- stable/9/contrib/gcc/c-typeck.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/c-typeck.c Sat Dec 28 20:03:14 2013 (r260012) @@ -2584,7 +2584,7 @@ convert_arguments (tree typelist, tree v else if ((invalid_func_diag = targetm.calls.invalid_arg_for_unprototyped_fn (typelist, fundecl, val))) { - error (invalid_func_diag); + error (invalid_func_diag, ""); return error_mark_node; } else @@ -2781,7 +2781,7 @@ build_unary_op (enum tree_code code, tre if ((invalid_op_diag = targetm.invalid_unary_op (code, TREE_TYPE (xarg)))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } @@ -7819,7 +7819,7 @@ build_binary_op (enum tree_code code, tr if ((invalid_op_diag = targetm.invalid_binary_op (code, type0, type1))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } Modified: stable/9/contrib/gcc/cfg.c ============================================================================== --- stable/9/contrib/gcc/cfg.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/cfg.c Sat Dec 28 20:03:14 2013 (r260012) @@ -830,7 +830,7 @@ dump_cfg_bb_info (FILE *file, basic_bloc else fprintf (file, ", "); first = false; - fputs (bb_bitnames[i], file); + fprintf (file, "%s", bb_bitnames[i]); } if (!first) fprintf (file, ")"); Modified: stable/9/contrib/gcc/collect2.c ============================================================================== --- stable/9/contrib/gcc/collect2.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/collect2.c Sat Dec 28 20:03:14 2013 (r260012) @@ -1562,10 +1562,10 @@ collect_execute (const char *prog, char if (err != 0) { errno = err; - fatal_perror (errmsg); + fatal_perror ("%s", errmsg); } else - fatal (errmsg); + fatal ("%s", errmsg); } return pex; @@ -2050,10 +2050,10 @@ scan_prog_file (const char *prog_name, e if (err != 0) { errno = err; - fatal_perror (errmsg); + fatal_perror ("%s", errmsg); } else - fatal (errmsg); + fatal ("%s", errmsg); } int_handler = (void (*) (int)) signal (SIGINT, SIG_IGN); Modified: stable/9/contrib/gcc/cp/cvt.c ============================================================================== --- stable/9/contrib/gcc/cp/cvt.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/cp/cvt.c Sat Dec 28 20:03:14 2013 (r260012) @@ -615,7 +615,7 @@ ocp_convert (tree type, tree expr, int c if ((invalid_conv_diag = targetm.invalid_conversion (TREE_TYPE (expr), type))) { - error (invalid_conv_diag); + error (invalid_conv_diag, ""); return error_mark_node; } Modified: stable/9/contrib/gcc/cp/pt.c ============================================================================== --- stable/9/contrib/gcc/cp/pt.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/cp/pt.c Sat Dec 28 20:03:14 2013 (r260012) @@ -8925,7 +8925,7 @@ tsubst_copy_and_build (tree t, /*template_arg_p=*/false, &error_msg); if (error_msg) - error (error_msg); + error ("%s", error_msg); if (!function_p && TREE_CODE (decl) == IDENTIFIER_NODE) decl = unqualified_name_lookup_error (decl); return decl; Modified: stable/9/contrib/gcc/cp/typeck.c ============================================================================== --- stable/9/contrib/gcc/cp/typeck.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/cp/typeck.c Sat Dec 28 20:03:14 2013 (r260012) @@ -3107,7 +3107,7 @@ build_binary_op (enum tree_code code, tr if ((invalid_op_diag = targetm.invalid_binary_op (code, type0, type1))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } @@ -4034,7 +4034,7 @@ build_unary_op (enum tree_code code, tre : code), TREE_TYPE (xarg)))) { - error (invalid_op_diag); + error (invalid_op_diag, ""); return error_mark_node; } Modified: stable/9/contrib/gcc/fold-const.c ============================================================================== --- stable/9/contrib/gcc/fold-const.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/fold-const.c Sat Dec 28 20:03:14 2013 (r260012) @@ -992,7 +992,7 @@ fold_overflow_warning (const char* gmsgi } } else if (issue_strict_overflow_warning (wc)) - warning (OPT_Wstrict_overflow, gmsgid); + warning (OPT_Wstrict_overflow, "%s", gmsgid); } /* Return true if the built-in mathematical function specified by CODE Modified: stable/9/contrib/gcc/gcc.c ============================================================================== --- stable/9/contrib/gcc/gcc.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/gcc.c Sat Dec 28 20:03:14 2013 (r260012) @@ -2974,7 +2974,7 @@ execute (void) if (errmsg != NULL) { if (err == 0) - fatal (errmsg); + fatal ("%s", errmsg); else { errno = err; @@ -6525,7 +6525,7 @@ main (int argc, char **argv) if (! verbose_flag) { - printf (_("\nFor bug reporting instructions, please see:\n")); + printf ("%s", _("\nFor bug reporting instructions, please see:\n")); printf ("%s.\n", bug_report_url); return (0); Modified: stable/9/contrib/gcc/gcov.c ============================================================================== --- stable/9/contrib/gcc/gcov.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/gcov.c Sat Dec 28 20:03:14 2013 (r260012) @@ -417,7 +417,7 @@ print_version (void) fnotice (stdout, "gcov (GCC) %s\n", version_string); fprintf (stdout, "Copyright %s 2006 Free Software Foundation, Inc.\n", _("(C)")); - fnotice (stdout, + fnotice (stdout, "%s", _("This is free software; see the source for copying conditions.\n" "There is NO warranty; not even for MERCHANTABILITY or \n" "FITNESS FOR A PARTICULAR PURPOSE.\n\n")); Modified: stable/9/contrib/gcc/tlink.c ============================================================================== --- stable/9/contrib/gcc/tlink.c Sat Dec 28 20:02:49 2013 (r260011) +++ stable/9/contrib/gcc/tlink.c Sat Dec 28 20:03:14 2013 (r260012) @@ -381,7 +381,7 @@ read_repo_file (file *f) FILE *stream = fopen (f->key, "r"); if (tlink_verbose >= 2) - fprintf (stderr, _("collect: reading %s\n"), f->key); + fprintf (stderr, "%s", _("collect: reading %s\n"), f->key); while (fscanf (stream, "%c ", &c) == 1) {