From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:16 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE79FCA807A; Mon, 9 Jan 2017 21:23:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7641D116F; Mon, 9 Jan 2017 21:23:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNFv6095539; Mon, 9 Jan 2017 21:23:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNFNv095538; Mon, 9 Jan 2017 21:23:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNFNv095538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311819 - vendor/llvm/llvm-trunk-r291476 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:16 -0000 Author: dim Date: Mon Jan 9 21:23:15 2017 New Revision: 311819 URL: https://svnweb.freebsd.org/changeset/base/311819 Log: Tag llvm trunk r291476. Added: vendor/llvm/llvm-trunk-r291476/ - copied from r311818, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:25 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52ADFCA80B2; Mon, 9 Jan 2017 21:23:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C320122F; Mon, 9 Jan 2017 21:23:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNOVs095609; Mon, 9 Jan 2017 21:23:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNMpZ095589; Mon, 9 Jan 2017 21:23:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNMpZ095589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311820 - in vendor/clang/dist: docs include/clang/AST include/clang/Basic include/clang/Driver include/clang/Frontend include/clang/Index include/clang/Sema include/clang/StaticAnalyze... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:25 -0000 Author: dim Date: Mon Jan 9 21:23:21 2017 New Revision: 311820 URL: https://svnweb.freebsd.org/changeset/base/311820 Log: Vendor import of clang trunk r291476: https://llvm.org/svn/llvm-project/cfe/trunk@291476 Added: vendor/clang/dist/lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp (contents, props changed) vendor/clang/dist/test/Analysis/iterator-past-end.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/dllexport-ctor-closure.cpp (contents, props changed) vendor/clang/dist/test/Modules/Inputs/pch-with-module-name/ vendor/clang/dist/test/Modules/Inputs/pch-with-module-name/A.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/pch-with-module-name/C.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/pch-with-module-name/C.m vendor/clang/dist/test/Modules/Inputs/pch-with-module-name/D.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/pch-with-module-name/module.modulemap vendor/clang/dist/test/Modules/Inputs/pch-with-module-name/test.h (contents, props changed) vendor/clang/dist/test/Modules/pch-with-module-name.m vendor/clang/dist/test/Sema/diagnose_if.c (contents, props changed) vendor/clang/dist/test/SemaCXX/diagnose_if.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/libstdcxx_gets_hack.cpp (contents, props changed) Modified: vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.def vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Index/IndexSymbol.h vendor/clang/dist/include/clang/Sema/Initialization.h vendor/clang/dist/include/clang/Sema/Overload.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/MicrosoftMangle.cpp vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGCleanup.h vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Index/IndexSymbol.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseInit.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprMember.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLambda.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CMakeLists.txt vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngine.cpp vendor/clang/dist/test/Analysis/Inputs/system-header-simulator-cxx.h vendor/clang/dist/test/Analysis/diagnostics/explicit-suppression.cpp vendor/clang/dist/test/Analysis/inlining/stl.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p15.cpp vendor/clang/dist/test/CXX/drs/dr13xx.cpp vendor/clang/dist/test/CXX/drs/dr19xx.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp vendor/clang/dist/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p1-0x.cpp vendor/clang/dist/test/CXX/temp/temp.param/p5.cpp vendor/clang/dist/test/CodeGen/lifetime2.c vendor/clang/dist/test/CodeGen/thinlto_backend.ll vendor/clang/dist/test/CodeGenCXX/arm.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-class.cpp vendor/clang/dist/test/CodeGenCXX/dllexport.cpp vendor/clang/dist/test/CodeGenCXX/eh-aggregate-copy-destroy.cpp vendor/clang/dist/test/CodeGenCXX/exceptions.cpp vendor/clang/dist/test/CodeGenCXX/goto.cpp vendor/clang/dist/test/Driver/B-opt.c vendor/clang/dist/test/Driver/coverage-ld.c vendor/clang/dist/test/Driver/cross-linux.c vendor/clang/dist/test/Driver/fuchsia.c vendor/clang/dist/test/Driver/fuchsia.cpp vendor/clang/dist/test/Driver/fuse-ld.c vendor/clang/dist/test/Driver/instrprof-ld.c vendor/clang/dist/test/Driver/mips-mti-linux.c vendor/clang/dist/test/Driver/netbsd.c vendor/clang/dist/test/Driver/netbsd.cpp vendor/clang/dist/test/Driver/nostdlib.c vendor/clang/dist/test/Driver/prefixed-tools.c vendor/clang/dist/test/Driver/sanitizer-ld.c vendor/clang/dist/test/Driver/windows-cross.c vendor/clang/dist/test/Index/Core/index-source.cpp vendor/clang/dist/test/Misc/diag-template-diffing.cpp vendor/clang/dist/test/OpenMP/atomic_codegen.cpp vendor/clang/dist/test/OpenMP/threadprivate_codegen.cpp vendor/clang/dist/test/SemaCXX/PR10177.cpp vendor/clang/dist/test/SemaCXX/attr-mode-tmpl.cpp vendor/clang/dist/test/SemaCXX/attr-noreturn.cpp vendor/clang/dist/test/SemaCXX/constant-expression-cxx11.cpp vendor/clang/dist/test/SemaCXX/cxx1z-constexpr-lambdas.cpp vendor/clang/dist/test/SemaCXX/enable_if.cpp vendor/clang/dist/test/SemaCXX/implicit-exception-spec.cpp vendor/clang/dist/test/SemaCXX/member-init.cpp vendor/clang/dist/test/SemaCXX/overload-call.cpp vendor/clang/dist/test/SemaCXX/overload-member-call.cpp vendor/clang/dist/test/SemaCXX/undefined-internal.cpp vendor/clang/dist/test/SemaTemplate/alias-templates.cpp vendor/clang/dist/test/SemaTemplate/constexpr-instantiate.cpp vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/SemaTemplate/default-arguments-cxx0x.cpp vendor/clang/dist/test/SemaTemplate/instantiate-init.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_nontype.cpp vendor/clang/dist/tools/c-index-test/core_main.cpp vendor/clang/dist/tools/driver/CMakeLists.txt vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/unittests/Format/FormatTestJS.cpp vendor/clang/dist/www/cxx_dr_status.html Modified: vendor/clang/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/clang/dist/docs/ReleaseNotes.rst Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/docs/ReleaseNotes.rst Mon Jan 9 21:23:21 2017 (r311820) @@ -47,6 +47,10 @@ sections with improvements to Clang's su Major New Features ------------------ +- The ``diagnose_if`` attribute has been added to clang. This attribute allows + clang to emit a warning or error if a function call meets one or more + user-specified conditions. + - ... Improvements to Clang's diagnostics Modified: vendor/clang/dist/include/clang/AST/Expr.h ============================================================================== --- vendor/clang/dist/include/clang/AST/Expr.h Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/AST/Expr.h Mon Jan 9 21:23:21 2017 (r311820) @@ -651,7 +651,8 @@ public: /// constant. bool EvaluateWithSubstitution(APValue &Value, ASTContext &Ctx, const FunctionDecl *Callee, - ArrayRef Args) const; + ArrayRef Args, + const Expr *This = nullptr) const; /// \brief If the current Expr is a pointer, this will try to statically /// determine the number of bytes available where the pointer is pointing. Modified: vendor/clang/dist/include/clang/Basic/Attr.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/Attr.td Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Basic/Attr.td Mon Jan 9 21:23:21 2017 (r311820) @@ -140,12 +140,15 @@ class Argument : Argument; +class BoolArgument : Argument; class IdentifierArgument : Argument; class IntArgument : Argument; class StringArgument : Argument; class ExprArgument : Argument; -class FunctionArgument : Argument; +class FunctionArgument : Argument; class TypeArgument : Argument; class UnsignedArgument : Argument; class VariadicUnsignedArgument : Argument; @@ -1591,6 +1594,26 @@ def Unavailable : InheritableAttr { let Documentation = [Undocumented]; } +def DiagnoseIf : InheritableAttr { + let Spellings = [GNU<"diagnose_if">]; + let Subjects = SubjectList<[Function]>; + let Args = [ExprArgument<"Cond">, StringArgument<"Message">, + EnumArgument<"DiagnosticType", + "DiagnosticType", + ["error", "warning"], + ["DT_Error", "DT_Warning"]>, + BoolArgument<"ArgDependent", 0, /*fake*/ 1>, + FunctionArgument<"Parent", 0, /*fake*/ 1>]; + let DuplicatesAllowedWhileMerging = 1; + let LateParsed = 1; + let AdditionalMembers = [{ + bool isError() const { return diagnosticType == DT_Error; } + bool isWarning() const { return diagnosticType == DT_Warning; } + }]; + let TemplateDependent = 1; + let Documentation = [DiagnoseIfDocs]; +} + def ArcWeakrefUnavailable : InheritableAttr { let Spellings = [GNU<"objc_arc_weak_reference_unavailable">]; let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; Modified: vendor/clang/dist/include/clang/Basic/AttrDocs.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/AttrDocs.td Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Basic/AttrDocs.td Mon Jan 9 21:23:21 2017 (r311820) @@ -378,6 +378,65 @@ template instantiation, so the value for }]; } +def DiagnoseIfDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``diagnose_if`` attribute can be placed on function declarations to emit +warnings or errors at compile-time if calls to the attributed function meet +certain user-defined criteria. For example: + +.. code-block:: c + void abs(int a) + __attribute__((diagnose_if(a >= 0, "Redundant abs call", "warning"))); + void must_abs(int a) + __attribute__((diagnose_if(a >= 0, "Redundant abs call", "error"))); + + int val = abs(1); // warning: Redundant abs call + int val2 = must_abs(1); // error: Redundant abs call + int val3 = abs(val); + int val4 = must_abs(val); // Because run-time checks are not emitted for + // diagnose_if attributes, this executes without + // issue. + + +``diagnose_if`` is closely related to ``enable_if``, with a few key differences: + +* Overload resolution is not aware of ``diagnose_if`` attributes: they're + considered only after we select the best candidate from a given candidate set. +* Function declarations that differ only in their ``diagnose_if`` attributes are + considered to be redeclarations of the same function (not overloads). +* If the condition provided to ``diagnose_if`` cannot be evaluated, no + diagnostic will be emitted. + +Otherwise, ``diagnose_if`` is essentially the logical negation of ``enable_if``. + +As a result of bullet number two, ``diagnose_if`` attributes will stack on the +same function. For example: + +.. code-block:: c + + int foo() __attribute__((diagnose_if(1, "diag1", "warning"))); + int foo() __attribute__((diagnose_if(1, "diag2", "warning"))); + + int bar = foo(); // warning: diag1 + // warning: diag2 + int (*fooptr)(void) = foo; // warning: diag1 + // warning: diag2 + + constexpr int supportsAPILevel(int N) { return N < 5; } + int baz(int a) + __attribute__((diagnose_if(!supportsAPILevel(10), + "Upgrade to API level 10 to use baz", "error"))); + int baz(int a) + __attribute__((diagnose_if(!a, "0 is not recommended.", "warning"))); + + int (*bazptr)(int) = baz; // error: Upgrade to API level 10 to use baz + int v = baz(0); // error: Upgrade to API level 10 to use baz + +Query for this feature with ``__has_attribute(diagnose_if)``. + }]; +} + def PassObjectSizeDocs : Documentation { let Category = DocCatVariable; // Technically it's a parameter doc, but eh. let Content = [{ Modified: vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td Mon Jan 9 21:23:21 2017 (r311820) @@ -161,6 +161,8 @@ def ext_old_implicitly_unsigned_long_cxx InGroup; def ext_clang_enable_if : Extension<"'enable_if' is a clang extension">, InGroup; +def ext_clang_diagnose_if : Extension<"'diagnose_if' is a clang extension">, + InGroup; // SEH def err_seh_expected_handler : Error< Modified: vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td Mon Jan 9 21:23:21 2017 (r311820) @@ -495,6 +495,7 @@ def UnusedPropertyIvar : DiagGroup<"unu def UnusedGetterReturnValue : DiagGroup<"unused-getter-return-value">; def UsedButMarkedUnused : DiagGroup<"used-but-marked-unused">; def UserDefinedLiterals : DiagGroup<"user-defined-literals">; +def UserDefinedWarnings : DiagGroup<"user-defined-warnings">; def Reorder : DiagGroup<"reorder">; def UndeclaredSelector : DiagGroup<"undeclared-selector">; def ImplicitAtomic : DiagGroup<"implicit-atomic-properties">; @@ -683,7 +684,8 @@ def Most : DiagGroup<"most", [ OverloadedVirtual, PrivateExtern, SelTypeCast, - ExternCCompat + ExternCCompat, + UserDefinedWarnings ]>; // Thread Safety warnings Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Mon Jan 9 21:23:21 2017 (r311820) @@ -2141,8 +2141,11 @@ def err_constexpr_local_var_no_init : Er def ext_constexpr_function_never_constant_expr : ExtWarn< "constexpr %select{function|constructor}0 never produces a " "constant expression">, InGroup>, DefaultError; -def err_enable_if_never_constant_expr : Error< - "'enable_if' attribute expression never produces a constant expression">; +def err_attr_cond_never_constant_expr : Error< + "%0 attribute expression never produces a constant expression">; +def err_diagnose_if_invalid_diagnostic_type : Error< + "invalid diagnostic type for 'diagnose_if'; use \"error\" or \"warning\" " + "instead">; def err_constexpr_body_no_return : Error< "no return statement in constexpr function">; def err_constexpr_return_missing_expr : Error< @@ -3333,6 +3336,9 @@ def note_ovl_candidate : Note<"candidate def note_ovl_candidate_inherited_constructor : Note< "constructor from base class %0 inherited here">; +def note_ovl_candidate_inherited_constructor_slice : Note< + "constructor inherited from base class cannot be used to initialize from " + "an argument of the derived class type">; def note_ovl_candidate_illegal_constructor : Note< "candidate %select{constructor|template}0 ignored: " "instantiation %select{takes|would take}0 its own class type by value">; @@ -3366,7 +3372,9 @@ def note_ovl_candidate_disabled_by_enabl def note_ovl_candidate_has_pass_object_size_params: Note< "candidate address cannot be taken because parameter %0 has " "pass_object_size attribute">; -def note_ovl_candidate_disabled_by_enable_if_attr : Note< +def err_diagnose_if_succeeded : Error<"%0">; +def warn_diagnose_if_succeeded : Warning<"%0">, InGroup; +def note_ovl_candidate_disabled_by_function_cond_attr : Note< "candidate disabled: %0">; def note_ovl_candidate_disabled_by_extension : Note< "candidate disabled due to OpenCL extension">; @@ -4395,6 +4403,7 @@ def note_not_found_by_two_phase_lookup : def err_undeclared_use : Error<"use of undeclared %0">; def warn_deprecated : Warning<"%0 is deprecated">, InGroup; +def note_from_diagnose_if : Note<"from 'diagnose_if' attribute on %0:">; def warn_property_method_deprecated : Warning<"property access is using %0 method which is deprecated">, InGroup; Modified: vendor/clang/dist/include/clang/Basic/LangOptions.def ============================================================================== --- vendor/clang/dist/include/clang/Basic/LangOptions.def Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Basic/LangOptions.def Mon Jan 9 21:23:21 2017 (r311820) @@ -146,6 +146,7 @@ LANGOPT(Modules , 1, 0, "modul COMPATIBLE_LANGOPT(ModulesTS , 1, 0, "C++ Modules TS") BENIGN_ENUM_LANGOPT(CompilingModule, CompilingModuleKind, 2, CMK_None, "compiling a module interface") +BENIGN_LANGOPT(CompilingPCH, 1, 0, "building a pch") COMPATIBLE_LANGOPT(ModulesDeclUse , 1, 0, "require declaration of module uses") BENIGN_LANGOPT(ModulesSearchAll , 1, 1, "searching even non-imported modules to find unresolved references") COMPATIBLE_LANGOPT(ModulesStrictDeclUse, 1, 0, "requiring declaration of module uses and all headers to be in modules") Modified: vendor/clang/dist/include/clang/Driver/CC1Options.td ============================================================================== --- vendor/clang/dist/include/clang/Driver/CC1Options.td Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Driver/CC1Options.td Mon Jan 9 21:23:21 2017 (r311820) @@ -167,6 +167,9 @@ def disable_llvm_passes : Flag<["-"], "d "frontend by not running any LLVM passes at all">; def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">, Alias; +def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">, + HelpText<"Disable lifetime-markers emission even when optimizations are " + "enabled">; def disable_red_zone : Flag<["-"], "disable-red-zone">, HelpText<"Do not emit code that uses the red zone.">; def dwarf_column_info : Flag<["-"], "dwarf-column-info">, Modified: vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def ============================================================================== --- vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def Mon Jan 9 21:23:21 2017 (r311820) @@ -52,6 +52,7 @@ CODEGENOPT(DisableGCov , 1, 0) /// CODEGENOPT(DisableLLVMPasses , 1, 0) ///< Don't run any LLVM IR passes to get ///< the pristine IR generated by the ///< frontend. +CODEGENOPT(DisableLifetimeMarkers, 1, 0) ///< Don't emit any lifetime markers CODEGENOPT(ExperimentalNewPassManager, 1, 0) ///< Enables the new, experimental ///< pass manager. CODEGENOPT(DisableRedZone , 1, 0) ///< Set when -mno-red-zone is enabled. Modified: vendor/clang/dist/include/clang/Frontend/FrontendActions.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/FrontendActions.h Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Frontend/FrontendActions.h Mon Jan 9 21:23:21 2017 (r311820) @@ -88,6 +88,8 @@ public: static std::unique_ptr ComputeASTConsumerArguments(CompilerInstance &CI, StringRef InFile, std::string &Sysroot, std::string &OutputFile); + + bool BeginSourceFileAction(CompilerInstance &CI, StringRef Filename) override; }; class GenerateModuleAction : public ASTFrontendAction { Modified: vendor/clang/dist/include/clang/Index/IndexSymbol.h ============================================================================== --- vendor/clang/dist/include/clang/Index/IndexSymbol.h Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Index/IndexSymbol.h Mon Jan 9 21:23:21 2017 (r311820) @@ -59,6 +59,13 @@ enum class SymbolLanguage { CXX, }; +/// Language specific sub-kinds. +enum class SymbolSubKind { + None, + CXXCopyConstructor, + CXXMoveConstructor, +}; + /// Set of properties that provide additional info about a symbol. enum class SymbolProperty : uint8_t { Generic = 1 << 0, @@ -107,6 +114,7 @@ struct SymbolRelation { struct SymbolInfo { SymbolKind Kind; + SymbolSubKind SubKind; SymbolPropertySet Properties; SymbolLanguage Lang; }; @@ -121,6 +129,7 @@ void printSymbolRoles(SymbolRoleSet Role bool printSymbolName(const Decl *D, const LangOptions &LO, raw_ostream &OS); StringRef getSymbolKindString(SymbolKind K); +StringRef getSymbolSubKindString(SymbolSubKind K); StringRef getSymbolLanguageString(SymbolLanguage K); void applyForEachSymbolProperty(SymbolPropertySet Props, Modified: vendor/clang/dist/include/clang/Sema/Initialization.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Initialization.h Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Sema/Initialization.h Mon Jan 9 21:23:21 2017 (r311820) @@ -215,14 +215,14 @@ public: /// \brief Create the initialization entity for a parameter. static InitializedEntity InitializeParameter(ASTContext &Context, - ParmVarDecl *Parm) { + const ParmVarDecl *Parm) { return InitializeParameter(Context, Parm, Parm->getType()); } /// \brief Create the initialization entity for a parameter, but use /// another type. static InitializedEntity InitializeParameter(ASTContext &Context, - ParmVarDecl *Parm, + const ParmVarDecl *Parm, QualType Type) { bool Consumed = (Context.getLangOpts().ObjCAutoRefCount && Parm->hasAttr()); Modified: vendor/clang/dist/include/clang/Sema/Overload.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Overload.h Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Sema/Overload.h Mon Jan 9 21:23:21 2017 (r311820) @@ -531,6 +531,13 @@ namespace clang { Ambiguous.construct(); } + void setAsIdentityConversion(QualType T) { + setStandard(); + Standard.setAsIdentityConversion(); + Standard.setFromType(T); + Standard.setAllToTypes(T); + } + /// \brief Whether the target is really a std::initializer_list, and the /// sequence only represents the worst element conversion. bool isStdInitializerListElement() const { @@ -601,8 +608,17 @@ namespace clang { /// This candidate was not viable because its OpenCL extension is disabled. ovl_fail_ext_disabled, + + /// This inherited constructor is not viable because it would slice the + /// argument. + ovl_fail_inhctor_slice, }; + /// A list of implicit conversion sequences for the arguments of an + /// OverloadCandidate. + typedef llvm::MutableArrayRef + ConversionSequenceList; + /// OverloadCandidate - A single candidate in an overload set (C++ 13.3). struct OverloadCandidate { /// Function - The actual function that this candidate @@ -627,18 +643,13 @@ namespace clang { /// is a surrogate, but only if IsSurrogate is true. CXXConversionDecl *Surrogate; - /// Conversions - The conversion sequences used to convert the - /// function arguments to the function parameters, the pointer points to a - /// fixed size array with NumConversions elements. The memory is owned by - /// the OverloadCandidateSet. - ImplicitConversionSequence *Conversions; + /// The conversion sequences used to convert the function arguments + /// to the function parameters. + ConversionSequenceList Conversions; /// The FixIt hints which can be used to fix the Bad candidate. ConversionFixItGenerator Fix; - /// NumConversions - The number of elements in the Conversions array. - unsigned NumConversions; - /// Viable - True to indicate that this overload candidate is viable. bool Viable; @@ -664,6 +675,26 @@ namespace clang { /// to be used while performing partial ordering of function templates. unsigned ExplicitCallArguments; + /// The number of diagnose_if attributes that this overload triggered. + /// If any of the triggered attributes are errors, this won't count + /// diagnose_if warnings. + unsigned NumTriggeredDiagnoseIfs = 0; + + /// Basically a TinyPtrVector that doesn't own the vector: + /// If NumTriggeredDiagnoseIfs is 0 or 1, this is a DiagnoseIfAttr *, + /// otherwise it's a pointer to an array of `NumTriggeredDiagnoseIfs` + /// DiagnoseIfAttr *s. + llvm::PointerUnion DiagnoseIfInfo; + + /// Gets an ArrayRef for the data at DiagnoseIfInfo. Note that this may give + /// you a pointer into DiagnoseIfInfo. + ArrayRef getDiagnoseIfInfo() const { + auto *Ptr = NumTriggeredDiagnoseIfs <= 1 + ? DiagnoseIfInfo.getAddrOfPtr1() + : DiagnoseIfInfo.get(); + return {Ptr, NumTriggeredDiagnoseIfs}; + } + union { DeductionFailureInfo DeductionFailure; @@ -677,9 +708,9 @@ namespace clang { /// hasAmbiguousConversion - Returns whether this overload /// candidate requires an ambiguous conversion or not. bool hasAmbiguousConversion() const { - for (unsigned i = 0, e = NumConversions; i != e; ++i) { - if (!Conversions[i].isInitialized()) return false; - if (Conversions[i].isAmbiguous()) return true; + for (auto &C : Conversions) { + if (!C.isInitialized()) return false; + if (C.isAmbiguous()) return true; } return false; } @@ -728,17 +759,42 @@ namespace clang { SmallVector Candidates; llvm::SmallPtrSet Functions; - // Allocator for OverloadCandidate::Conversions. We store the first few - // elements inline to avoid allocation for small sets. - llvm::BumpPtrAllocator ConversionSequenceAllocator; + // Allocator for ConversionSequenceLists and DiagnoseIfAttr* arrays. + // We store the first few of each of these inline to avoid allocation for + // small sets. + llvm::BumpPtrAllocator SlabAllocator; SourceLocation Loc; CandidateSetKind Kind; - unsigned NumInlineSequences; - llvm::AlignedCharArray - InlineSpace; + constexpr static unsigned NumInlineBytes = + 24 * sizeof(ImplicitConversionSequence); + unsigned NumInlineBytesUsed; + llvm::AlignedCharArray InlineSpace; + + /// If we have space, allocates from inline storage. Otherwise, allocates + /// from the slab allocator. + /// FIXME: It would probably be nice to have a SmallBumpPtrAllocator + /// instead. + template + T *slabAllocate(unsigned N) { + // It's simpler if this doesn't need to consider alignment. + static_assert(alignof(T) == alignof(void *), + "Only works for pointer-aligned types."); + static_assert(std::is_trivial::value || + std::is_same::value, + "Add destruction logic to OverloadCandidateSet::clear()."); + + unsigned NBytes = sizeof(T) * N; + if (NBytes > NumInlineBytes - NumInlineBytesUsed) + return SlabAllocator.Allocate(N); + char *FreeSpaceStart = InlineSpace.buffer + NumInlineBytesUsed; + assert(uintptr_t(FreeSpaceStart) % alignof(void *) == 0 && + "Misaligned storage!"); + + NumInlineBytesUsed += NBytes; + return reinterpret_cast(FreeSpaceStart); + } OverloadCandidateSet(const OverloadCandidateSet &) = delete; void operator=(const OverloadCandidateSet &) = delete; @@ -747,12 +803,17 @@ namespace clang { public: OverloadCandidateSet(SourceLocation Loc, CandidateSetKind CSK) - : Loc(Loc), Kind(CSK), NumInlineSequences(0) {} + : Loc(Loc), Kind(CSK), NumInlineBytesUsed(0) {} ~OverloadCandidateSet() { destroyCandidates(); } SourceLocation getLocation() const { return Loc; } CandidateSetKind getKind() const { return Kind; } + /// Make a DiagnoseIfAttr* array in a block of memory that will live for + /// as long as this OverloadCandidateSet. Returns a pointer to the start + /// of that array. + DiagnoseIfAttr **addDiagnoseIfComplaints(ArrayRef CA); + /// \brief Determine when this overload candidate will be new to the /// overload set. bool isNewCandidate(Decl *F) { @@ -769,30 +830,32 @@ namespace clang { size_t size() const { return Candidates.size(); } bool empty() const { return Candidates.empty(); } + /// \brief Allocate storage for conversion sequences for NumConversions + /// conversions. + ConversionSequenceList + allocateConversionSequences(unsigned NumConversions) { + ImplicitConversionSequence *Conversions = + slabAllocate(NumConversions); + + // Construct the new objects. + for (unsigned I = 0; I != NumConversions; ++I) + new (&Conversions[I]) ImplicitConversionSequence(); + + return ConversionSequenceList(Conversions, NumConversions); + } + /// \brief Add a new candidate with NumConversions conversion sequence slots /// to the overload set. - OverloadCandidate &addCandidate(unsigned NumConversions = 0) { + OverloadCandidate &addCandidate(unsigned NumConversions = 0, + ConversionSequenceList Conversions = None) { + assert((Conversions.empty() || Conversions.size() == NumConversions) && + "preallocated conversion sequence has wrong length"); + Candidates.push_back(OverloadCandidate()); OverloadCandidate &C = Candidates.back(); - - // Assign space from the inline array if there are enough free slots - // available. - if (NumConversions + NumInlineSequences <= 16) { - ImplicitConversionSequence *I = - (ImplicitConversionSequence *)InlineSpace.buffer; - C.Conversions = &I[NumInlineSequences]; - NumInlineSequences += NumConversions; - } else { - // Otherwise get memory from the allocator. - C.Conversions = ConversionSequenceAllocator - .Allocate(NumConversions); - } - - // Construct the new objects. - for (unsigned i = 0; i != NumConversions; ++i) - new (&C.Conversions[i]) ImplicitConversionSequence(); - - C.NumConversions = NumConversions; + C.Conversions = Conversions.empty() + ? allocateConversionSequences(NumConversions) + : Conversions; return C; } Modified: vendor/clang/dist/include/clang/Sema/Sema.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Sema.h Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/Sema/Sema.h Mon Jan 9 21:23:21 2017 (r311820) @@ -27,6 +27,7 @@ #include "clang/AST/NSAPI.h" #include "clang/AST/PrettyPrinter.h" #include "clang/AST/TypeLoc.h" +#include "clang/AST/TypeOrdering.h" #include "clang/Basic/ExpressionTraits.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/Module.h" @@ -119,6 +120,7 @@ namespace clang { class FunctionProtoType; class FunctionTemplateDecl; class ImplicitConversionSequence; + typedef MutableArrayRef ConversionSequenceList; class InitListExpr; class InitializationKind; class InitializationSequence; @@ -806,6 +808,12 @@ public: /// run time. Unevaluated, + /// \brief The current expression occurs within a braced-init-list within + /// an unevaluated operand. This is mostly like a regular unevaluated + /// context, except that we still instantiate constexpr functions that are + /// referenced here so that we can perform narrowing checks correctly. + UnevaluatedList, + /// \brief The current expression occurs within a discarded statement. /// This behaves largely similarly to an unevaluated operand in preventing /// definitions from being required, but not in other ways. @@ -898,7 +906,8 @@ public: MangleNumberingContext &getMangleNumberingContext(ASTContext &Ctx); bool isUnevaluated() const { - return Context == Unevaluated || Context == UnevaluatedAbstract; + return Context == Unevaluated || Context == UnevaluatedAbstract || + Context == UnevaluatedList; } }; @@ -2510,10 +2519,11 @@ public: void AddOverloadCandidate(FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef Args, - OverloadCandidateSet& CandidateSet, + OverloadCandidateSet &CandidateSet, bool SuppressUserConversions = false, bool PartialOverloading = false, - bool AllowExplicit = false); + bool AllowExplicit = false, + ConversionSequenceList EarlyConversions = None); void AddFunctionCandidates(const UnresolvedSetImpl &Functions, ArrayRef Args, OverloadCandidateSet &CandidateSet, @@ -2523,23 +2533,25 @@ public: void AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, - ArrayRef Args, + Expr *ThisArg, ArrayRef Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversion = false); void AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, QualType ObjectType, Expr::Classification ObjectClassification, - ArrayRef Args, + Expr *ThisArg, ArrayRef Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false, - bool PartialOverloading = false); + bool PartialOverloading = false, + ConversionSequenceList EarlyConversions = None); void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, + Expr *ThisArg, ArrayRef Args, OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false, @@ -2551,6 +2563,16 @@ public: OverloadCandidateSet& CandidateSet, bool SuppressUserConversions = false, bool PartialOverloading = false); + bool CheckNonDependentConversions(FunctionTemplateDecl *FunctionTemplate, + ArrayRef ParamTypes, + ArrayRef Args, + OverloadCandidateSet &CandidateSet, + ConversionSequenceList &Conversions, + bool SuppressUserConversions, + CXXRecordDecl *ActingContext = nullptr, + QualType ObjectType = QualType(), + Expr::Classification + ObjectClassification = {}); void AddConversionCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, @@ -2603,6 +2625,38 @@ public: EnableIfAttr *CheckEnableIf(FunctionDecl *Function, ArrayRef Args, bool MissingImplicitThis = false); + /// Check the diagnose_if attributes on the given function. Returns the + /// first succesful fatal attribute, or null if calling Function(Args) isn't + /// an error. + /// + /// This only considers ArgDependent DiagnoseIfAttrs. + /// + /// This will populate Nonfatal with all non-error DiagnoseIfAttrs that + /// succeed. If this function returns non-null, the contents of Nonfatal are + /// unspecified. + DiagnoseIfAttr * + checkArgDependentDiagnoseIf(FunctionDecl *Function, ArrayRef Args, + SmallVectorImpl &Nonfatal, + bool MissingImplicitThis = false, + Expr *ThisArg = nullptr); + + /// Check the diagnose_if expressions on the given function. Returns the + /// first succesful fatal attribute, or null if using Function isn't + /// an error. + /// + /// This ignores all ArgDependent DiagnoseIfAttrs. + /// + /// This will populate Nonfatal with all non-error DiagnoseIfAttrs that + /// succeed. If this function returns non-null, the contents of Nonfatal are + /// unspecified. + DiagnoseIfAttr * + checkArgIndependentDiagnoseIf(FunctionDecl *Function, + SmallVectorImpl &Nonfatal); + + /// Emits the diagnostic contained in the given DiagnoseIfAttr at Loc. Also + /// emits a note about the location of said attribute. + void emitDiagnoseIfDiagnostic(SourceLocation Loc, const DiagnoseIfAttr *DIA); + /// Returns whether the given function's address can be taken or not, /// optionally emitting a diagnostic if the address can't be taken. /// @@ -3801,6 +3855,9 @@ public: /// variable will have in the given scope. QualType getCapturedDeclRefType(VarDecl *Var, SourceLocation Loc); + /// Mark all of the declarations referenced within a particular AST node as + /// referenced. Used when template instantiation instantiates a non-dependent + /// type -- entities referenced by the type are now referenced. void MarkDeclarationsReferencedInType(SourceLocation Loc, QualType T); void MarkDeclarationsReferencedInExpr(Expr *E, bool SkipLocalVariables = false); @@ -6580,6 +6637,8 @@ public: /// \brief The explicitly-specified template arguments were not valid /// template arguments for the given template. TDK_InvalidExplicitArguments, + /// \brief Checking non-dependent argument conversions failed. + TDK_NonDependentConversionFailure, /// \brief Deduction failed; that's all we know. TDK_MiscellaneousDeductionFailure, /// \brief CUDA Target attributes do not match. @@ -6618,22 +6677,21 @@ public: QualType OriginalArgType; }; - TemplateDeductionResult - FinishTemplateArgumentDeduction(FunctionTemplateDecl *FunctionTemplate, - SmallVectorImpl &Deduced, - unsigned NumExplicitlySpecified, - FunctionDecl *&Specialization, - sema::TemplateDeductionInfo &Info, - SmallVectorImpl const *OriginalCallArgs = nullptr, - bool PartialOverloading = false); + TemplateDeductionResult FinishTemplateArgumentDeduction( + FunctionTemplateDecl *FunctionTemplate, + SmallVectorImpl &Deduced, + unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, + sema::TemplateDeductionInfo &Info, + SmallVectorImpl const *OriginalCallArgs = nullptr, + bool PartialOverloading = false, + llvm::function_ref CheckNonDependent = []{ return false; }); - TemplateDeductionResult - DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate, - TemplateArgumentListInfo *ExplicitTemplateArgs, - ArrayRef Args, - FunctionDecl *&Specialization, - sema::TemplateDeductionInfo &Info, - bool PartialOverloading = false); + TemplateDeductionResult DeduceTemplateArguments( + FunctionTemplateDecl *FunctionTemplate, + TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef Args, + FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, + bool PartialOverloading, + llvm::function_ref)> CheckNonDependent); TemplateDeductionResult DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate, @@ -6877,6 +6935,10 @@ public: /// Specializations whose definitions are currently being instantiated. llvm::DenseSet> InstantiatingSpecializations; + /// Non-dependent types used in templates that have already been instantiated + /// by some template instantiation. + llvm::DenseSet InstantiatedNonDependentTypes; + /// \brief Extra modules inspected when performing a lookup during a template /// instantiation. Computed lazily. SmallVector ActiveTemplateInstantiationLookupModules; @@ -10186,6 +10248,22 @@ public: IsDecltype); } + enum InitListTag { InitList }; + EnterExpressionEvaluationContext(Sema &Actions, InitListTag, + bool ShouldEnter = true) + : Actions(Actions), Entered(false) { + // In C++11 onwards, narrowing checks are performed on the contents of + // braced-init-lists, even when they occur within unevaluated operands. + // Therefore we still need to instantiate constexpr functions used in such + // a context. + if (ShouldEnter && Actions.isUnevaluatedContext() && + Actions.getLangOpts().CPlusPlus11) { + Actions.PushExpressionEvaluationContext(Sema::UnevaluatedList, nullptr, + false); + Entered = true; + } + } + ~EnterExpressionEvaluationContext() { if (Entered) Actions.PopExpressionEvaluationContext(); Modified: vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td ============================================================================== --- vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/Checkers.td Mon Jan 9 21:23:21 2017 (r311820) @@ -278,6 +278,14 @@ def VirtualCallChecker : Checker<"Virtua } // end: "optin.cplusplus" +let ParentPackage = CplusplusAlpha in { + +def IteratorPastEndChecker : Checker<"IteratorPastEnd">, + HelpText<"Check iterators used past end">, + DescFile<"IteratorPastEndChecker.cpp">; + +} // end: "alpha.cplusplus" + //===----------------------------------------------------------------------===// // Valist checkers. Modified: vendor/clang/dist/lib/AST/ExprConstant.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ExprConstant.cpp Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/lib/AST/ExprConstant.cpp Mon Jan 9 21:23:21 2017 (r311820) @@ -4543,6 +4543,12 @@ public: Call.getLValueBase().dyn_cast()); if (!FD) return Error(Callee); + // Don't call function pointers which have been cast to some other type. + // Per DR (no number yet), the caller and callee can differ in noexcept. + if (!Info.Ctx.hasSameFunctionTypeIgnoringExceptionSpec( + CalleeType->getPointeeType(), FD->getType())) { + return Error(E); + } // Overloaded operator calls to member functions are represented as normal // calls with '*this' as the first argument. @@ -4558,14 +4564,42 @@ public: return false; This = &ThisVal; Args = Args.slice(1); + } else if (MD && MD->isLambdaStaticInvoker()) { + // Map the static invoker for the lambda back to the call operator. + // Conveniently, we don't have to slice out the 'this' argument (as is + // being done for the non-static case), since a static member function + // doesn't have an implicit argument passed in. + const CXXRecordDecl *ClosureClass = MD->getParent(); + assert( + ClosureClass->captures_begin() == ClosureClass->captures_end() && + "Number of captures must be zero for conversion to function-ptr"); + + const CXXMethodDecl *LambdaCallOp = + ClosureClass->getLambdaCallOperator(); + + // Set 'FD', the function that will be called below, to the call + // operator. If the closure object represents a generic lambda, find + // the corresponding specialization of the call operator. + + if (ClosureClass->isGenericLambda()) { + assert(MD->isFunctionTemplateSpecialization() && + "A generic lambda's static-invoker function must be a " + "template specialization"); + const TemplateArgumentList *TAL = MD->getTemplateSpecializationArgs(); + FunctionTemplateDecl *CallOpTemplate = + LambdaCallOp->getDescribedFunctionTemplate(); + void *InsertPos = nullptr; + FunctionDecl *CorrespondingCallOpSpecialization = + CallOpTemplate->findSpecialization(TAL->asArray(), InsertPos); + assert(CorrespondingCallOpSpecialization && + "We must always have a function call operator specialization " + "that corresponds to our static invoker specialization"); + FD = cast(CorrespondingCallOpSpecialization); + } else + FD = LambdaCallOp; } - // Don't call function pointers which have been cast to some other type. - // Per DR (no number yet), the caller and callee can differ in noexcept. - if (!Info.Ctx.hasSameFunctionTypeIgnoringExceptionSpec( - CalleeType->getPointeeType(), FD->getType())) { - return Error(E); - } + } else return Error(E); @@ -5834,6 +5868,7 @@ namespace { bool VisitCXXConstructExpr(const CXXConstructExpr *E) { return VisitCXXConstructExpr(E, E->getType()); } + bool VisitLambdaExpr(const LambdaExpr *E); bool VisitCXXInheritedCtorInitExpr(const CXXInheritedCtorInitExpr *E); bool VisitCXXConstructExpr(const CXXConstructExpr *E, QualType T); bool VisitCXXStdInitializerListExpr(const CXXStdInitializerListExpr *E); @@ -6168,6 +6203,21 @@ bool RecordExprEvaluator::VisitCXXStdIni return true; } +bool RecordExprEvaluator::VisitLambdaExpr(const LambdaExpr *E) { + const CXXRecordDecl *ClosureClass = E->getLambdaClass(); + if (ClosureClass->isInvalidDecl()) return false; + + if (Info.checkingPotentialConstantExpression()) return true; + if (E->capture_size()) { + Info.FFDiag(E, diag::note_unimplemented_constexpr_lambda_feature_ast) + << "can not evaluate lambda expressions with captures"; + return false; + } + // FIXME: Implement captures. + Result = APValue(APValue::UninitStruct(), /*NumBases*/0, /*NumFields*/0); + return true; +} + static bool EvaluateRecord(const Expr *E, const LValue &This, APValue &Result, EvalInfo &Info) { assert(E->isRValue() && E->getType()->isRecordType() && @@ -6217,6 +6267,9 @@ public: bool VisitCXXStdInitializerListExpr(const CXXStdInitializerListExpr *E) { return VisitConstructExpr(E); } + bool VisitLambdaExpr(const LambdaExpr *E) { + return VisitConstructExpr(E); + } }; } // end anonymous namespace @@ -10357,10 +10410,25 @@ bool Expr::isCXX11ConstantExpr(const AST bool Expr::EvaluateWithSubstitution(APValue &Value, ASTContext &Ctx, const FunctionDecl *Callee, - ArrayRef Args) const { + ArrayRef Args, + const Expr *This) const { Expr::EvalStatus Status; EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpressionUnevaluated); + LValue ThisVal; + const LValue *ThisPtr = nullptr; + if (This) { +#ifndef NDEBUG + auto *MD = dyn_cast(Callee); + assert(MD && "Don't provide `this` for non-methods."); + assert(!MD->isStatic() && "Don't provide `this` for static methods."); +#endif + if (EvaluateObjectArgument(Info, This, ThisVal)) + ThisPtr = &ThisVal; + if (Info.EvalStatus.HasSideEffects) + return false; + } + ArgVector ArgValues(Args.size()); for (ArrayRef::iterator I = Args.begin(), E = Args.end(); I != E; ++I) { @@ -10373,7 +10441,7 @@ bool Expr::EvaluateWithSubstitution(APVa } // Build fake call to Callee. - CallStackFrame Frame(Info, Callee->getLocation(), Callee, /*This*/nullptr, + CallStackFrame Frame(Info, Callee->getLocation(), Callee, ThisPtr, ArgValues.data()); return Evaluate(Value, Info, this) && !Info.EvalStatus.HasSideEffects; } Modified: vendor/clang/dist/lib/AST/MicrosoftMangle.cpp ============================================================================== --- vendor/clang/dist/lib/AST/MicrosoftMangle.cpp Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/lib/AST/MicrosoftMangle.cpp Mon Jan 9 21:23:21 2017 (r311820) @@ -109,13 +109,13 @@ static const DeclContext *getEffectivePa static const FunctionDecl *getStructor(const NamedDecl *ND) { if (const auto *FTD = dyn_cast(ND)) - return FTD->getTemplatedDecl(); + return FTD->getTemplatedDecl()->getCanonicalDecl(); const auto *FD = cast(ND); if (const auto *FTD = FD->getPrimaryTemplate()) - return FTD->getTemplatedDecl(); + return FTD->getTemplatedDecl()->getCanonicalDecl(); - return FD; + return FD->getCanonicalDecl(); } /// MicrosoftMangleContextImpl - Overrides the default MangleContext for the @@ -312,6 +312,10 @@ public: void mangleNestedName(const NamedDecl *ND); private: + bool isStructorDecl(const NamedDecl *ND) const { + return ND == Structor || getStructor(ND) == Structor; + } + void mangleUnqualifiedName(const NamedDecl *ND) { mangleUnqualifiedName(ND, ND->getDeclName()); } @@ -898,7 +902,7 @@ void MicrosoftCXXNameMangler::mangleUnqu llvm_unreachable("Can't mangle Objective-C selector names here!"); case DeclarationName::CXXConstructorName: - if (Structor == getStructor(ND)) { + if (isStructorDecl(ND)) { if (StructorType == Ctor_CopyingClosure) { Out << "?_O"; return; @@ -912,7 +916,7 @@ void MicrosoftCXXNameMangler::mangleUnqu return; case DeclarationName::CXXDestructorName: - if (ND == Structor) + if (isStructorDecl(ND)) // If the named decl is the C++ destructor we're mangling, // use the type we were given. mangleCXXDtorType(static_cast(StructorType)); @@ -1862,7 +1866,7 @@ void MicrosoftCXXNameMangler::mangleFunc IsStructor = true; IsCtorClosure = (StructorType == Ctor_CopyingClosure || StructorType == Ctor_DefaultClosure) && - getStructor(MD) == Structor; + isStructorDecl(MD); if (IsCtorClosure) CC = getASTContext().getDefaultCallingConvention( /*IsVariadic=*/false, /*IsCXXMethod=*/true); @@ -1883,7 +1887,7 @@ void MicrosoftCXXNameMangler::mangleFunc // ::= // ::= @ # structors (they have no declared return type) if (IsStructor) { - if (isa(D) && D == Structor && + if (isa(D) && isStructorDecl(D) && StructorType == Dtor_Deleting) { // The scalar deleting destructor takes an extra int argument. // However, the FunctionType generated has 0 arguments. Modified: vendor/clang/dist/lib/CodeGen/BackendUtil.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/BackendUtil.cpp Mon Jan 9 21:23:15 2017 (r311819) +++ vendor/clang/dist/lib/CodeGen/BackendUtil.cpp Mon Jan 9 21:23:21 2017 (r311820) @@ -312,7 +312,8 @@ void EmitAssemblyHelper::CreatePasses(le // At O0 and O1 we only run the always inliner which is more efficient. At // higher optimization levels we run the normal inliner. if (CodeGenOpts.OptimizationLevel <= 1) { - bool InsertLifetimeIntrinsics = CodeGenOpts.OptimizationLevel != 0; + bool InsertLifetimeIntrinsics = (CodeGenOpts.OptimizationLevel != 0 && + !CodeGenOpts.DisableLifetimeMarkers); PMBuilder.Inliner = createAlwaysInlinerLegacyPass(InsertLifetimeIntrinsics); } else { PMBuilder.Inliner = createFunctionInliningPass( @@ -519,11 +520,22 @@ void EmitAssemblyHelper::CreateTargetMac .Case("dynamic-no-pic", llvm::Reloc::DynamicNoPIC); assert(RM.hasValue() && "invalid PIC model!"); - CodeGenOpt::Level OptLevel = CodeGenOpt::Default; + CodeGenOpt::Level OptLevel; switch (CodeGenOpts.OptimizationLevel) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:12 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFDFBCA8073; Mon, 9 Jan 2017 21:23:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68D52116E; Mon, 9 Jan 2017 21:23:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNBv2095492; Mon, 9 Jan 2017 21:23:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNAnB095478; Mon, 9 Jan 2017 21:23:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNAnB095478@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311818 - in vendor/llvm/dist: cmake cmake/modules include/llvm/Analysis include/llvm/CodeGen include/llvm/DebugInfo/MSF include/llvm/ExecutionEngine/Orc include/llvm/IR include/llvm/Su... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:12 -0000 Author: dim Date: Mon Jan 9 21:23:09 2017 New Revision: 311818 URL: https://svnweb.freebsd.org/changeset/base/311818 Log: Vendor import of llvm trunk r291476: https://llvm.org/svn/llvm-project/llvm/trunk@291476 Added: vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp (contents, props changed) vendor/llvm/dist/test/Analysis/ScalarEvolution/invalidation.ll vendor/llvm/dist/test/CodeGen/AMDGPU/r600-legalize-umax-bug.ll vendor/llvm/dist/test/CodeGen/AMDGPU/store-private.ll vendor/llvm/dist/test/CodeGen/AVR/intrinsics/ vendor/llvm/dist/test/CodeGen/AVR/intrinsics/read_register.ll vendor/llvm/dist/test/CodeGen/WebAssembly/function-bitcasts.ll vendor/llvm/dist/test/CodeGen/WebAssembly/unsupported-function-bitcasts.ll vendor/llvm/dist/test/CodeGen/X86/fmaddsub-combine.ll vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_local_branch.s (contents, props changed) vendor/llvm/dist/test/ThinLTO/X86/Inputs/funcimport-tbaa.ll vendor/llvm/dist/test/ThinLTO/X86/Inputs/local_name_conflict1.ll vendor/llvm/dist/test/ThinLTO/X86/Inputs/local_name_conflict2.ll vendor/llvm/dist/test/ThinLTO/X86/funcimport-tbaa.ll vendor/llvm/dist/test/ThinLTO/X86/local_name_conflict.ll vendor/llvm/dist/test/Transforms/InstSimplify/div.ll vendor/llvm/dist/test/Transforms/NewGVN/basic-cyclic-opt.ll vendor/llvm/dist/test/Transforms/NewGVN/cyclic-phi-handling.ll vendor/llvm/dist/test/Transforms/NewGVN/memory-handling.ll vendor/llvm/dist/test/Transforms/NewGVN/pr31501.ll vendor/llvm/dist/test/Transforms/NewGVN/pr31573.ll vendor/llvm/dist/test/tools/llvm-opt-report/Inputs/dm.c (contents, props changed) vendor/llvm/dist/test/tools/llvm-opt-report/Inputs/dm.yaml vendor/llvm/dist/test/tools/llvm-opt-report/func-dm.test Modified: vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/StreamArray.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RPCUtils.h vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RawByteChannel.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h vendor/llvm/dist/include/llvm/IR/PassManager.h vendor/llvm/dist/include/llvm/IR/User.h vendor/llvm/dist/include/llvm/Support/Path.h vendor/llvm/dist/include/llvm/Transforms/IPO.h vendor/llvm/dist/include/llvm/Transforms/IPO/PassManagerBuilder.h vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/Bitcode/Reader/MetadataLoader.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/ModuleSummaryIndexObjectFile.cpp vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/Path.cpp vendor/llvm/dist/lib/Support/TarWriter.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600ISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/R600Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.h vendor/llvm/dist/lib/Target/AVR/AVRISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AVR/AVRISelLowering.cpp vendor/llvm/dist/lib/Target/AVR/AVRISelLowering.h vendor/llvm/dist/lib/Target/BPF/BPFInstrInfo.cpp vendor/llvm/dist/lib/Target/BPF/Disassembler/BPFDisassembler.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp vendor/llvm/dist/lib/Target/TargetMachineC.cpp vendor/llvm/dist/lib/Target/WebAssembly/CMakeLists.txt vendor/llvm/dist/lib/Target/WebAssembly/WebAssembly.h vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyInstrInteger.td vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Transforms/IPO/LowerTypeTests.cpp vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopLoadElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Utils/FunctionImportUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/test/Analysis/CostModel/X86/shuffle-reverse.ll vendor/llvm/dist/test/Analysis/CostModel/X86/testshiftlshr.ll vendor/llvm/dist/test/Analysis/CostModel/X86/testshiftshl.ll vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-ashr-cost.ll vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-lshr-cost.ll vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-shl-cost.ll vendor/llvm/dist/test/Analysis/ValueTracking/assume.ll vendor/llvm/dist/test/Bindings/Go/lit.local.cfg vendor/llvm/dist/test/Bindings/OCaml/lit.local.cfg vendor/llvm/dist/test/CMakeLists.txt vendor/llvm/dist/test/CodeGen/AMDGPU/load-constant-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/load-global-i16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/min.ll vendor/llvm/dist/test/CodeGen/X86/avx2-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512-bugfix-23634.ll vendor/llvm/dist/test/CodeGen/X86/avx512-calling-conv.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cvt.ll vendor/llvm/dist/test/CodeGen/X86/avx512-ext.ll vendor/llvm/dist/test/CodeGen/X86/avx512-insert-extract.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mask-op.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mov.ll vendor/llvm/dist/test/CodeGen/X86/avx512-regcall-NoMask.ll vendor/llvm/dist/test/CodeGen/X86/avx512-vbroadcast.ll vendor/llvm/dist/test/CodeGen/X86/avx512-vec-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-mov.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-vec-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-mov.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-vec-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-mov.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-vec-cmp.ll vendor/llvm/dist/test/CodeGen/X86/cmov.ll vendor/llvm/dist/test/CodeGen/X86/fma-fneg-combine.ll vendor/llvm/dist/test/CodeGen/X86/sse-fsignum.ll vendor/llvm/dist/test/CodeGen/X86/vector-compare-results.ll vendor/llvm/dist/test/CodeGen/X86/vector-sext.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v64.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-masked.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-v1.ll vendor/llvm/dist/test/ExecutionEngine/Interpreter/lit.local.cfg vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_BE-relocations.s vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s vendor/llvm/dist/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll vendor/llvm/dist/test/JitListener/lit.local.cfg vendor/llvm/dist/test/Transforms/GVN/invariant.group.ll vendor/llvm/dist/test/Transforms/InstCombine/assume.ll vendor/llvm/dist/test/Transforms/InstCombine/assume2.ll vendor/llvm/dist/test/Transforms/InstCombine/fabs.ll vendor/llvm/dist/test/Transforms/InstCombine/fast-math.ll vendor/llvm/dist/test/Transforms/InstCombine/urem-simplify-bug.ll vendor/llvm/dist/test/Transforms/InstSimplify/rem.ll vendor/llvm/dist/test/Transforms/LICM/hoisting.ll vendor/llvm/dist/test/Transforms/LoopLoadElim/forward.ll vendor/llvm/dist/test/Transforms/LoopVectorize/iv_outside_user.ll vendor/llvm/dist/test/Transforms/NewGVN/invariant.group.ll vendor/llvm/dist/test/lit.cfg vendor/llvm/dist/test/lit.site.cfg.in vendor/llvm/dist/test/tools/llvm-config/system-libs.test vendor/llvm/dist/test/tools/llvm-config/system-libs.windows.test vendor/llvm/dist/tools/llvm-config/llvm-config.cpp vendor/llvm/dist/tools/llvm-objdump/MachODump.cpp vendor/llvm/dist/tools/llvm-opt-report/OptReport.cpp vendor/llvm/dist/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp vendor/llvm/dist/unittests/IR/UserTest.cpp vendor/llvm/dist/utils/unittest/CMakeLists.txt vendor/llvm/dist/utils/update_test_checks.py Modified: vendor/llvm/dist/cmake/config-ix.cmake ============================================================================== --- vendor/llvm/dist/cmake/config-ix.cmake Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/cmake/config-ix.cmake Mon Jan 9 21:23:09 2017 (r311818) @@ -316,9 +316,9 @@ else() endif() endif() -check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG) -check_cxx_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments" - SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) +check_cxx_compiler_flag("-Wvariadic-macros" SUPPORTS_VARIADIC_MACROS_FLAG) +check_cxx_compiler_flag("-Wgnu-zero-variadic-macro-arguments" + SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) set(USE_NO_MAYBE_UNINITIALIZED 0) set(USE_NO_UNINITIALIZED 0) @@ -462,13 +462,6 @@ if( MSVC ) if(LLVM_ENABLE_DIA_SDK AND NOT HAVE_DIA_SDK) message(FATAL_ERROR "DIA SDK not found. If you have both VS 2012 and 2013 installed, you may need to uninstall the former and re-install the latter afterwards.") endif() - - # Normalize to 0/1 for lit.site.cfg - if(LLVM_ENABLE_DIA_SDK) - set(LLVM_ENABLE_DIA_SDK 1) - else() - set(LLVM_ENABLE_DIA_SDK 0) - endif() else() set(LLVM_ENABLE_DIA_SDK 0) endif( MSVC ) Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/AddLLVM.cmake Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake Mon Jan 9 21:23:09 2017 (r311818) @@ -1011,11 +1011,11 @@ function(add_unittest test_suite test_na list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0) endif () - if (SUPPORTS_NO_VARIADIC_MACROS_FLAG) + if (SUPPORTS_VARIADIC_MACROS_FLAG) list(APPEND LLVM_COMPILE_FLAGS "-Wno-variadic-macros") endif () # Some parts of gtest rely on this GNU extension, don't warn on it. - if(SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) + if(SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG) list(APPEND LLVM_COMPILE_FLAGS "-Wno-gnu-zero-variadic-macro-arguments") endif() @@ -1067,6 +1067,19 @@ function(llvm_add_go_executable binary p endif() endfunction() +# This function canonicalize the CMake variables passed by names +# from CMake boolean to 0/1 suitable for passing into Python or C++, +# in place. +function(llvm_canonicalize_cmake_booleans) + foreach(var ${ARGN}) + if(${var}) + set(${var} 1 PARENT_SCOPE) + else() + set(${var} 0 PARENT_SCOPE) + endif() + endforeach() +endfunction(llvm_canonicalize_cmake_booleans) + # This function provides an automatic way to 'configure'-like generate a file # based on a set of common and custom variables, specifically targeting the # variables needed for the 'lit.site.cfg' files. This function bundles the Modified: vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h Mon Jan 9 21:23:09 2017 (r311818) @@ -1491,6 +1491,8 @@ public: void print(raw_ostream &OS) const; void verify() const; + bool invalidate(Function &F, const PreservedAnalyses &PA, + FunctionAnalysisManager::Invalidator &Inv); /// Collect parametric terms occurring in step expressions (first step of /// delinearization). Modified: vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/Analysis/TargetLibraryInfo.h Mon Jan 9 21:23:09 2017 (r311818) @@ -290,7 +290,7 @@ public: } /// Returns extension attribute kind to be used for i32 parameters - /// correpsonding to C-level int or unsigned int. May be zeroext, signext, + /// corresponding to C-level int or unsigned int. May be zeroext, signext, /// or none. Attribute::AttrKind getExtAttrForI32Param(bool Signed = true) const { if (Impl->ShouldExtI32Param) @@ -301,7 +301,7 @@ public: } /// Returns extension attribute kind to be used for i32 return values - /// correpsonding to C-level int or unsigned int. May be zeroext, signext, + /// corresponding to C-level int or unsigned int. May be zeroext, signext, /// or none. Attribute::AttrKind getExtAttrForI32Return(bool Signed = true) const { if (Impl->ShouldExtI32Return) Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h Mon Jan 9 21:23:09 2017 (r311818) @@ -308,6 +308,16 @@ public: // Iteration support for live in sets. These sets are kept in sorted // order by their register number. typedef LiveInVector::const_iterator livein_iterator; +#ifndef NDEBUG + /// Unlike livein_begin, this method does not check that the liveness + /// information is accurate. Still for debug purposes it may be useful + /// to have iterators that won't assert if the liveness information + /// is not current. + livein_iterator livein_begin_dbg() const { return LiveIns.begin(); } + iterator_range liveins_dbg() const { + return make_range(livein_begin_dbg(), livein_end()); + } +#endif livein_iterator livein_begin() const; livein_iterator livein_end() const { return LiveIns.end(); } bool livein_empty() const { return LiveIns.empty(); } Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Mon Jan 9 21:23:09 2017 (r311818) @@ -148,8 +148,7 @@ class MachineFrameInfo { /// grouping overaligned allocas into a "secondary stack frame" and /// then only use a single alloca to allocate this frame and only a /// single virtual register to access it. Currently, without such an - /// optimization, each such alloca gets it's own dynamic - /// realignment. + /// optimization, each such alloca gets its own dynamic realignment. bool StackRealignable; /// Whether the function has the \c alignstack attribute. Modified: vendor/llvm/dist/include/llvm/DebugInfo/MSF/StreamArray.h ============================================================================== --- vendor/llvm/dist/include/llvm/DebugInfo/MSF/StreamArray.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/DebugInfo/MSF/StreamArray.h Mon Jan 9 21:23:09 2017 (r311818) @@ -11,6 +11,7 @@ #define LLVM_DEBUGINFO_MSF_STREAMARRAY_H #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/iterator.h" #include "llvm/DebugInfo/MSF/StreamRef.h" #include "llvm/Support/Error.h" #include @@ -107,7 +108,10 @@ private: Extractor E; }; -template class VarStreamArrayIterator { +template +class VarStreamArrayIterator + : public iterator_facade_base, + std::forward_iterator_tag, ValueType> { typedef VarStreamArrayIterator IterType; typedef VarStreamArray ArrayType; @@ -144,41 +148,39 @@ public: return false; } - bool operator!=(const IterType &R) { return !(*this == R); } - const ValueType &operator*() const { assert(Array && !HasError); return ThisValue; } - IterType &operator++() { - // We are done with the current record, discard it so that we are - // positioned at the next record. - IterRef = IterRef.drop_front(ThisLen); - if (IterRef.getLength() == 0) { - // There is nothing after the current record, we must make this an end - // iterator. - moveToEnd(); - } else { - // There is some data after the current record. - auto EC = Extract(IterRef, ThisLen, ThisValue); - if (EC) { - consumeError(std::move(EC)); - markError(); - } else if (ThisLen == 0) { - // An empty record? Make this an end iterator. + IterType &operator+=(std::ptrdiff_t N) { + while (N > 0) { + // We are done with the current record, discard it so that we are + // positioned at the next record. + IterRef = IterRef.drop_front(ThisLen); + if (IterRef.getLength() == 0) { + // There is nothing after the current record, we must make this an end + // iterator. moveToEnd(); + return *this; + } else { + // There is some data after the current record. + auto EC = Extract(IterRef, ThisLen, ThisValue); + if (EC) { + consumeError(std::move(EC)); + markError(); + return *this; + } else if (ThisLen == 0) { + // An empty record? Make this an end iterator. + moveToEnd(); + return *this; + } } + --N; } return *this; } - IterType operator++(int) { - IterType Original = *this; - ++*this; - return Original; - } - private: void moveToEnd() { Array = nullptr; @@ -211,6 +213,16 @@ public: assert(Stream.getLength() % sizeof(T) == 0); } + bool operator==(const FixedStreamArray &Other) const { + return Stream == Other.Stream; + } + + bool operator!=(const FixedStreamArray &Other) const { + return !(*this == Other); + } + + FixedStreamArray &operator=(const FixedStreamArray &) = default; + const T &operator[](uint32_t Index) const { assert(Index < size()); uint32_t Off = Index * sizeof(T); @@ -226,6 +238,8 @@ public: uint32_t size() const { return Stream.getLength() / sizeof(T); } + bool empty() const { return size() == 0; } + FixedStreamArrayIterator begin() const { return FixedStreamArrayIterator(*this, 0); } @@ -240,36 +254,53 @@ private: ReadableStreamRef Stream; }; -template class FixedStreamArrayIterator { +template +class FixedStreamArrayIterator + : public iterator_facade_base, + std::random_access_iterator_tag, T> { + public: FixedStreamArrayIterator(const FixedStreamArray &Array, uint32_t Index) : Array(Array), Index(Index) {} - bool operator==(const FixedStreamArrayIterator &R) { - assert(&Array == &R.Array); - return Index == R.Index; + FixedStreamArrayIterator & + operator=(const FixedStreamArrayIterator &Other) { + Array = Other.Array; + Index = Other.Index; + return *this; } - bool operator!=(const FixedStreamArrayIterator &R) { - return !(*this == R); + const T &operator*() const { return Array[Index]; } + + bool operator==(const FixedStreamArrayIterator &R) const { + assert(Array == R.Array); + return (Index == R.Index) && (Array == R.Array); } - const T &operator*() const { return Array[Index]; } + FixedStreamArrayIterator &operator+=(std::ptrdiff_t N) { + Index += N; + return *this; + } - FixedStreamArrayIterator &operator++() { - assert(Index < Array.size()); - ++Index; + FixedStreamArrayIterator &operator-=(std::ptrdiff_t N) { + assert(Index >= N); + Index -= N; return *this; } - FixedStreamArrayIterator operator++(int) { - FixedStreamArrayIterator Original = *this; - ++*this; - return Original; + std::ptrdiff_t operator-(const FixedStreamArrayIterator &R) const { + assert(Array == R.Array); + assert(Index >= R.Index); + return Index - R.Index; + } + + bool operator<(const FixedStreamArrayIterator &RHS) const { + assert(Array == RHS.Array); + return Index < RHS.Index; } private: - const FixedStreamArray &Array; + FixedStreamArray Array; uint32_t Index; }; Modified: vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h ============================================================================== --- vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h Mon Jan 9 21:23:09 2017 (r311818) @@ -83,7 +83,7 @@ public: namespace remote { class OrcRemoteTargetRPCAPI - : public rpc::SingleThreadedRPC { + : public rpc::SingleThreadedRPCEndpoint { protected: class ResourceIdMgr { public: @@ -108,7 +108,7 @@ protected: public: // FIXME: Remove constructors once MSVC supports synthesizing move-ops. OrcRemoteTargetRPCAPI(rpc::RawByteChannel &C) - : rpc::SingleThreadedRPC(C, true) {} + : rpc::SingleThreadedRPCEndpoint(C, true) {} class CallIntVoid : public rpc::Function { Modified: vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RPCUtils.h ============================================================================== --- vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RPCUtils.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RPCUtils.h Mon Jan 9 21:23:09 2017 (r311818) @@ -702,7 +702,7 @@ public: /// sync. template -class RPCBase { +class RPCEndpointBase { protected: class OrcRPCInvalid : public Function { public: @@ -747,7 +747,7 @@ protected: public: /// Construct an RPC instance on a channel. - RPCBase(ChannelT &C, bool LazyAutoNegotiation) + RPCEndpointBase(ChannelT &C, bool LazyAutoNegotiation) : C(C), LazyAutoNegotiation(LazyAutoNegotiation) { // Hold ResponseId in a special variable, since we expect Response to be // called relatively frequently, and want to avoid the map lookup. @@ -788,15 +788,21 @@ public: return FnIdOrErr.takeError(); } - // Allocate a sequence number. - auto SeqNo = SequenceNumberMgr.getSequenceNumber(); - assert(!PendingResponses.count(SeqNo) && - "Sequence number already allocated"); + SequenceNumberT SeqNo; // initialized in locked scope below. + { + // Lock the pending responses map and sequence number manager. + std::lock_guard Lock(ResponsesMutex); + + // Allocate a sequence number. + SeqNo = SequenceNumberMgr.getSequenceNumber(); + assert(!PendingResponses.count(SeqNo) && + "Sequence number already allocated"); - // Install the user handler. - PendingResponses[SeqNo] = + // Install the user handler. + PendingResponses[SeqNo] = detail::createResponseHandler( std::move(Handler)); + } // Open the function call message. if (auto Err = C.startSendMessage(FnId, SeqNo)) { @@ -863,11 +869,33 @@ public: return detail::ReadArgs(Args...); } + /// Abandon all outstanding result handlers. + /// + /// This will call all currently registered result handlers to receive an + /// "abandoned" error as their argument. This is used internally by the RPC + /// in error situations, but can also be called directly by clients who are + /// disconnecting from the remote and don't or can't expect responses to their + /// outstanding calls. (Especially for outstanding blocking calls, calling + /// this function may be necessary to avoid dead threads). + void abandonPendingResponses() { + // Lock the pending responses map and sequence number manager. + std::lock_guard Lock(ResponsesMutex); + + for (auto &KV : PendingResponses) + KV.second->abandon(); + PendingResponses.clear(); + SequenceNumberMgr.reset(); + } + protected: // The LaunchPolicy type allows a launch policy to be specified when adding // a function handler. See addHandlerImpl. using LaunchPolicy = std::function)>; + FunctionIdT getInvalidFunctionId() const { + return FnIdAllocator.getInvalidId(); + } + /// Add the given handler to the handler map and make it available for /// autonegotiation and execution. template @@ -884,28 +912,32 @@ protected: wrapHandler(std::move(Handler), std::move(Launch)); } - // Abandon all outstanding results. - void abandonPendingResponses() { - for (auto &KV : PendingResponses) - KV.second->abandon(); - PendingResponses.clear(); - SequenceNumberMgr.reset(); - } - Error handleResponse(SequenceNumberT SeqNo) { - auto I = PendingResponses.find(SeqNo); - if (I == PendingResponses.end()) { - abandonPendingResponses(); - return orcError(OrcErrorCode::UnexpectedRPCResponse); + using Handler = typename decltype(PendingResponses)::mapped_type; + Handler PRHandler; + + { + // Lock the pending responses map and sequence number manager. + std::unique_lock Lock(ResponsesMutex); + auto I = PendingResponses.find(SeqNo); + + if (I != PendingResponses.end()) { + PRHandler = std::move(I->second); + PendingResponses.erase(I); + SequenceNumberMgr.releaseSequenceNumber(SeqNo); + } else { + // Unlock the pending results map to prevent recursive lock. + Lock.unlock(); + abandonPendingResponses(); + return orcError(OrcErrorCode::UnexpectedRPCResponse); + } } - auto PRHandler = std::move(I->second); - PendingResponses.erase(I); - SequenceNumberMgr.releaseSequenceNumber(SeqNo); + assert(PRHandler && + "If we didn't find a response handler we should have bailed out"); if (auto Err = PRHandler->handleResponse(C)) { abandonPendingResponses(); - SequenceNumberMgr.reset(); return Err; } @@ -915,7 +947,7 @@ protected: FunctionIdT handleNegotiate(const std::string &Name) { auto I = LocalFunctionIds.find(Name); if (I == LocalFunctionIds.end()) - return FnIdAllocator.getInvalidId(); + return getInvalidFunctionId(); return I->second; } @@ -938,7 +970,7 @@ protected: // If autonegotiation indicates that the remote end doesn't support this // function, return an unknown function error. - if (RemoteId == FnIdAllocator.getInvalidId()) + if (RemoteId == getInvalidFunctionId()) return orcError(OrcErrorCode::UnknownRPCFunction); // Autonegotiation succeeded and returned a valid id. Update the map and @@ -1012,6 +1044,7 @@ protected: std::map Handlers; + std::mutex ResponsesMutex; detail::SequenceNumberManager SequenceNumberMgr; std::map>> PendingResponses; @@ -1021,17 +1054,18 @@ protected: template -class MultiThreadedRPC - : public detail::RPCBase< - MultiThreadedRPC, ChannelT, - FunctionIdT, SequenceNumberT> { +class MultiThreadedRPCEndpoint + : public detail::RPCEndpointBase< + MultiThreadedRPCEndpoint, + ChannelT, FunctionIdT, SequenceNumberT> { private: using BaseClass = - detail::RPCBase, - ChannelT, FunctionIdT, SequenceNumberT>; + detail::RPCEndpointBase< + MultiThreadedRPCEndpoint, + ChannelT, FunctionIdT, SequenceNumberT>; public: - MultiThreadedRPC(ChannelT &C, bool LazyAutoNegotiation) + MultiThreadedRPCEndpoint(ChannelT &C, bool LazyAutoNegotiation) : BaseClass(C, LazyAutoNegotiation) {} /// The LaunchPolicy type allows a launch policy to be specified when adding @@ -1061,30 +1095,41 @@ public: std::move(Launch)); } + /// Add a class-method as a handler. + template + void addHandler(ClassT &Object, RetT (ClassT::*Method)(ArgTs...), + LaunchPolicy Launch = LaunchPolicy()) { + addHandler( + detail::MemberFnWrapper(Object, Method), + Launch); + } + /// Negotiate a function id for Func with the other end of the channel. - template Error negotiateFunction() { + template Error negotiateFunction(bool Retry = false) { using OrcRPCNegotiate = typename BaseClass::OrcRPCNegotiate; + // Check if we already have a function id... + auto I = this->RemoteFunctionIds.find(Func::getPrototype()); + if (I != this->RemoteFunctionIds.end()) { + // If it's valid there's nothing left to do. + if (I->second != this->getInvalidFunctionId()) + return Error::success(); + // If it's invalid and we can't re-attempt negotiation, throw an error. + if (!Retry) + return orcError(OrcErrorCode::UnknownRPCFunction); + } + + // We don't have a function id for Func yet, call the remote to try to + // negotiate one. if (auto RemoteIdOrErr = callB(Func::getPrototype())) { this->RemoteFunctionIds[Func::getPrototype()] = *RemoteIdOrErr; + if (*RemoteIdOrErr == this->getInvalidFunctionId()) + return orcError(OrcErrorCode::UnknownRPCFunction); return Error::success(); } else return RemoteIdOrErr.takeError(); } - /// Convenience method for negotiating multiple functions at once. - template Error negotiateFunctions() { - return negotiateFunction(); - } - - /// Convenience method for negotiating multiple functions at once. - template - Error negotiateFunctions() { - if (auto Err = negotiateFunction()) - return Err; - return negotiateFunctions(); - } - /// Return type for non-blocking call primitives. template using NonBlockingCallResult = typename detail::ResultTraits< @@ -1169,19 +1214,20 @@ public: template -class SingleThreadedRPC - : public detail::RPCBase< - SingleThreadedRPC, ChannelT, - FunctionIdT, SequenceNumberT> { +class SingleThreadedRPCEndpoint + : public detail::RPCEndpointBase< + SingleThreadedRPCEndpoint, + ChannelT, FunctionIdT, SequenceNumberT> { private: using BaseClass = - detail::RPCBase, - ChannelT, FunctionIdT, SequenceNumberT>; + detail::RPCEndpointBase< + SingleThreadedRPCEndpoint, + ChannelT, FunctionIdT, SequenceNumberT>; using LaunchPolicy = typename BaseClass::LaunchPolicy; public: - SingleThreadedRPC(ChannelT &C, bool LazyAutoNegotiation) + SingleThreadedRPCEndpoint(ChannelT &C, bool LazyAutoNegotiation) : BaseClass(C, LazyAutoNegotiation) {} template @@ -1197,29 +1243,31 @@ public: } /// Negotiate a function id for Func with the other end of the channel. - template Error negotiateFunction() { + template Error negotiateFunction(bool Retry = false) { using OrcRPCNegotiate = typename BaseClass::OrcRPCNegotiate; + // Check if we already have a function id... + auto I = this->RemoteFunctionIds.find(Func::getPrototype()); + if (I != this->RemoteFunctionIds.end()) { + // If it's valid there's nothing left to do. + if (I->second != this->getInvalidFunctionId()) + return Error::success(); + // If it's invalid and we can't re-attempt negotiation, throw an error. + if (!Retry) + return orcError(OrcErrorCode::UnknownRPCFunction); + } + + // We don't have a function id for Func yet, call the remote to try to + // negotiate one. if (auto RemoteIdOrErr = callB(Func::getPrototype())) { this->RemoteFunctionIds[Func::getPrototype()] = *RemoteIdOrErr; + if (*RemoteIdOrErr == this->getInvalidFunctionId()) + return orcError(OrcErrorCode::UnknownRPCFunction); return Error::success(); } else return RemoteIdOrErr.takeError(); } - /// Convenience method for negotiating multiple functions at once. - template Error negotiateFunctions() { - return negotiateFunction(); - } - - /// Convenience method for negotiating multiple functions at once. - template - Error negotiateFunctions() { - if (auto Err = negotiateFunction()) - return Err; - return negotiateFunctions(); - } - template typename detail::ResultTraits::ErrorReturnType @@ -1332,6 +1380,68 @@ private: uint32_t NumOutstandingCalls; }; +/// @brief Convenience class for grouping RPC Functions into APIs that can be +/// negotiated as a block. +/// +template +class APICalls { +public: + + /// @brief Test whether this API contains Function F. + template + class Contains { + public: + static const bool value = false; + }; + + /// @brief Negotiate all functions in this API. + template + static Error negotiate(RPCEndpoint &R) { + return Error::success(); + } +}; + +template +class APICalls { +public: + + template + class Contains { + public: + static const bool value = std::is_same::value | + APICalls::template Contains::value; + }; + + template + static Error negotiate(RPCEndpoint &R) { + if (auto Err = R.template negotiateFunction()) + return Err; + return APICalls::negotiate(R); + } + +}; + +template +class APICalls, Funcs...> { +public: + + template + class Contains { + public: + static const bool value = + APICalls::template Contains::value | + APICalls::template Contains::value; + }; + + template + static Error negotiate(RPCEndpoint &R) { + if (auto Err = APICalls::negotiate(R)) + return Err; + return APICalls::negotiate(R); + } + +}; + } // end namespace rpc } // end namespace orc } // end namespace llvm Modified: vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RawByteChannel.h ============================================================================== --- vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RawByteChannel.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/ExecutionEngine/Orc/RawByteChannel.h Mon Jan 9 21:23:09 2017 (r311818) @@ -48,9 +48,7 @@ public: template Error startSendMessage(const FunctionIdT &FnId, const SequenceIdT &SeqNo) { writeLock.lock(); - if (auto Err = serializeSeq(*this, FnId, SeqNo)) - return Err; - return Error::success(); + return serializeSeq(*this, FnId, SeqNo); } /// Notify the channel that we're ending a message send. Modified: vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h ============================================================================== --- vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h Mon Jan 9 21:23:09 2017 (r311818) @@ -28,14 +28,14 @@ template <> struct ScalarEnumerationTrai template <> struct MappingTraits { static void mapping(IO &io, TypeTestResolution &res) { - io.mapRequired("Kind", res.TheKind); - io.mapRequired("SizeBitWidth", res.SizeBitWidth); + io.mapOptional("Kind", res.TheKind); + io.mapOptional("SizeBitWidth", res.SizeBitWidth); } }; template <> struct MappingTraits { static void mapping(IO &io, TypeIdSummary& summary) { - io.mapRequired("TTRes", summary.TTRes); + io.mapOptional("TTRes", summary.TTRes); } }; @@ -53,7 +53,7 @@ namespace yaml { template <> struct MappingTraits { static void mapping(IO &io, FunctionSummaryYaml& summary) { - io.mapRequired("TypeTests", summary.TypeTests); + io.mapOptional("TypeTests", summary.TypeTests); } }; @@ -100,8 +100,8 @@ template <> struct CustomMappingTraits struct MappingTraits { static void mapping(IO &io, ModuleSummaryIndex& index) { - io.mapRequired("GlobalValueMap", index.GlobalValueMap); - io.mapRequired("TypeIdMap", index.TypeIdMap); + io.mapOptional("GlobalValueMap", index.GlobalValueMap); + io.mapOptional("TypeIdMap", index.TypeIdMap); } }; Modified: vendor/llvm/dist/include/llvm/IR/PassManager.h ============================================================================== --- vendor/llvm/dist/include/llvm/IR/PassManager.h Mon Jan 9 20:51:51 2017 (r311817) +++ vendor/llvm/dist/include/llvm/IR/PassManager.h Mon Jan 9 21:23:09 2017 (r311818) @@ -879,18 +879,22 @@ extern template class AnalysisManager FunctionAnalysisManager; -/// \brief A module analysis which acts as a proxy for a function analysis -/// manager. +/// \brief An analysis over an "outer" IR unit that provides access to an +/// analysis manager over an "inner" IR unit. The inner unit must be contained +/// in the outer unit. +/// +/// Fore example, InnerAnalysisManagerProxy is +/// an analysis over Modules (the "outer" unit) that provides access to a +/// Function analysis manager. The FunctionAnalysisManager is the "inner" +/// manager being proxied, and Functions are the "inner" unit. The inner/outer +/// relationship is valid because each Function is contained in one Module. +/// +/// If you're (transitively) within a pass manager for an IR unit U that +/// contains IR unit V, you should never use an analysis manager over V, except +/// via one of these proxies. /// -/// This primarily proxies invalidation information from the module analysis -/// manager and module pass manager to a function analysis manager. You should -/// never use a function analysis manager from within (transitively) a module -/// pass manager unless your parent module pass has received a proxy result -/// object for it. -/// -/// Note that the proxy's result is a move-only object and represents ownership -/// of the validity of the analyses in the \c FunctionAnalysisManager it -/// provides. +/// Note that the proxy's result is a move-only RAII object. The validity of +/// the analyses in the inner analysis manager is tied to its lifetime. template class InnerAnalysisManagerProxy : public AnalysisInfoMixin< @@ -926,23 +930,16 @@ public: /// \brief Accessor for the analysis manager. AnalysisManagerT &getManager() { return *InnerAM; } - /// \brief Handler for invalidation of the outer IR unit. + /// \brief Handler for invalidation of the outer IR unit, \c IRUnitT. /// - /// If this analysis itself is preserved, then we assume that the set of \c - /// IR units that the inner analysis manager controls hasn't changed and - /// thus we don't need to invalidate *all* cached data associated with any - /// \c IRUnitT* in the \c AnalysisManagerT. + /// If the proxy analysis itself is not preserved, we assume that the set of + /// inner IR objects contained in IRUnit may have changed. In this case, + /// we have to call \c clear() on the inner analysis manager, as it may now + /// have stale pointers to its inner IR objects. /// - /// Regardless of whether this analysis is marked as preserved, all of the - /// analyses in the \c AnalysisManagerT are potentially invalidated (for - /// the relevant inner set of their IR units) based on the set of preserved - /// analyses. - /// - /// Because this needs to understand the mapping from one IR unit to an - /// inner IR unit, this method isn't defined in the primary template. - /// Instead, each specialization of this template will need to provide an - /// explicit specialization of this method to handle that particular pair - /// of IR unit and inner AnalysisManagerT. + /// Regardless of whether the proxy analysis is marked as preserved, all of + /// the analyses in the inner analysis manager are potentially invalidated + /// based on the set of preserved analyses. bool invalidate( IRUnitT &IR, const PreservedAnalyses &PA, typename AnalysisManager::Invalidator &Inv); @@ -956,13 +953,9 @@ public: /// \brief Run the analysis pass and create our proxy result object. /// - /// This doesn't do any interesting work, it is primarily used to insert our - /// proxy result object into the module analysis cache so that we can proxy - /// invalidation to the function analysis manager. - /// - /// In debug builds, it will also assert that the analysis manager is empty - /// as no queries should arrive at the function analysis manager prior to - /// this analysis being requested. + /// This doesn't do any interesting work; it is primarily used to insert our + /// proxy result object into the outer analysis cache so that we can proxy + /// invalidation to the inner analysis manager. Result run(IRUnitT &IR, AnalysisManager &AM, ExtraArgTs...) { return Result(*InnerAM); @@ -996,22 +989,24 @@ bool FunctionAnalysisManagerModuleProxy: extern template class InnerAnalysisManagerProxy; -/// \brief A function analysis which acts as a proxy for a module analysis -/// manager. -/// -/// This primarily provides an accessor to a parent module analysis manager to -/// function passes. Only the const interface of the module analysis manager is -/// provided to indicate that once inside of a function analysis pass you -/// cannot request a module analysis to actually run. Instead, the user must -/// rely on the \c getCachedResult API. -/// -/// The invalidation provided by this proxy involves tracking when an -/// invalidation event in the outer analysis manager needs to trigger an -/// invalidation of a particular analysis on this IR unit. -/// -/// Because outer analyses aren't invalidated while these IR units are being -/// precessed, we have to register and handle these as deferred invalidation -/// events. +/// \brief An analysis over an "inner" IR unit that provides access to an +/// analysis manager over a "outer" IR unit. The inner unit must be contained +/// in the outer unit. +/// +/// For example OuterAnalysisManagerProxy is an +/// analysis over Functions (the "inner" unit) which provides access to a Module +/// analysis manager. The ModuleAnalysisManager is the "outer" manager being +/// proxied, and Modules are the "outer" IR unit. The inner/outer relationship +/// is valid because each Function is contained in one Module. +/// +/// This proxy only exposes the const interface of the outer analysis manager, +/// to indicate that you cannot cause an outer analysis to run from within an +/// inner pass. Instead, you must rely on the \c getCachedResult API. +/// +/// This proxy doesn't manage invalidation in any way -- that is handled by the +/// recursive return path of each layer of the pass manager. A consequence of +/// this is the outer analyses may be stale. We invalidate the outer analyses +/// only when we're done running passes over the inner IR units. template class OuterAnalysisManagerProxy : public AnalysisInfoMixin< @@ -1024,7 +1019,7 @@ public: const AnalysisManagerT &getManager() const { return *AM; } - /// \brief Handle invalidation by ignoring it, this pass is immutable. + /// \brief Handle invalidation by ignoring it; this pass is immutable. bool invalidate( IRUnitT &, const PreservedAnalyses &, typename AnalysisManager::Invalidator &) { @@ -1089,18 +1084,15 @@ AnalysisKey extern template class OuterAnalysisManagerProxy; -/// Provide the \c ModuleAnalysisManager to \c Fucntion proxy. +/// Provide the \c ModuleAnalysisManager to \c Function proxy. typedef OuterAnalysisManagerProxy ModuleAnalysisManagerFunctionProxy; /// \brief Trivial adaptor that maps from a module to its functions. /// /// Designed to allow composition of a FunctionPass(Manager) and -/// a ModulePassManager. Note that if this pass is constructed with a pointer -/// to a \c ModuleAnalysisManager it will run the -/// \c FunctionAnalysisManagerModuleProxy analysis prior to running the function -/// pass over the module to enable a \c FunctionAnalysisManager to be used -/// within this run safely. +/// a ModulePassManager, by running the FunctionPass(Manager) over every +/// function in the module. /// /// Function passes run within this adaptor can rely on having exclusive access /// to the function they are run over. They should not read or modify any other @@ -1115,6 +1107,10 @@ typedef OuterAnalysisManagerProxy class ModuleToFunctionPassAdaptor : public PassInfoMixin> { @@ -1124,7 +1120,6 @@ public: /// \brief Runs the function pass across every function in the module. PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM) { - // Setup the function analysis manager from its proxy. FunctionAnalysisManager &FAM = AM.getResult(M).getManager(); @@ -1145,10 +1140,11 @@ public: PA.intersect(std::move(PassPA)); } - // By definition we preserve the proxy. We also preserve all analyses on - // Function units. This precludes *any* invalidation of function analyses - // by the proxy, but that's OK because we've taken care to invalidate - // analyses in the function analysis manager incrementally above. + // The FunctionAnalysisManagerModuleProxy is preserved because (we assume) + // the function passes we ran didn't add or remove any functions. + // + // We also preserve all analyses on Functions, because we did all the + // invalidation we needed to do above. PA.preserveSet>(); PA.preserve(); return PA; @@ -1166,7 +1162,7 @@ createModuleToFunctionPassAdaptor(Functi return ModuleToFunctionPassAdaptor(std::move(Pass)); } -/// \brief A template utility pass to force an analysis result to be available. +/// \brief A utility pass template to force an analysis result to be available. /// /// If there are extra arguments at the pass's run level there may also be /// extra arguments to the analysis manager's \c getResult routine. We can't @@ -1196,17 +1192,14 @@ struct RequireAnalysisPass } }; -/// \brief A template utility pass to force an analysis result to be -/// invalidated. -/// -/// This is a no-op pass which simply forces a specific analysis result to be -/// invalidated when it is run. +/// \brief A no-op pass template which simply forces a specific analysis result +/// to be invalidated. template struct InvalidateAnalysisPass : PassInfoMixin> { /// \brief Run this pass over some unit of IR. /// - /// This pass can be run over any unit of IR and use any analysis manager + /// This pass can be run over any unit of IR and use any analysis manager, /// provided they satisfy the basic API requirements. When this pass is /// created, these methods can be instantiated to satisfy whatever the /// context requires. @@ -1218,10 +1211,10 @@ struct InvalidateAnalysisPass } }; -/// \brief A utility pass that does nothing but preserves no analyses. +/// \brief A utility pass that does nothing, but preserves no analyses. /// -/// As a consequence fo not preserving any analyses, this pass will force all -/// analysis passes to be re-run to produce fresh results if any are needed. +/// Because this preserves no analyses, any analysis passes queried after this +/// pass runs will recompute fresh results. struct InvalidateAllAnalysesPass : PassInfoMixin { /// \brief Run this pass over some unit of IR. template Modified: vendor/llvm/dist/include/llvm/IR/User.h ============================================================================== --- vendor/llvm/dist/include/llvm/IR/User.h Mon Jan 9 20:51:51 2017 (r311817) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:29 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D590BCA80C1; Mon, 9 Jan 2017 21:23:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A2D4129C; Mon, 9 Jan 2017 21:23:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNSZx095656; Mon, 9 Jan 2017 21:23:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNSXk095655; Mon, 9 Jan 2017 21:23:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNSXk095655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311821 - vendor/clang/clang-trunk-r291476 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:30 -0000 Author: dim Date: Mon Jan 9 21:23:28 2017 New Revision: 311821 URL: https://svnweb.freebsd.org/changeset/base/311821 Log: Tag clang trunk r291476. Added: vendor/clang/clang-trunk-r291476/ - copied from r311820, vendor/clang/dist/ From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:39 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B958CA813C; Mon, 9 Jan 2017 21:23:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4FF6138E; Mon, 9 Jan 2017 21:23:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNbdg095779; Mon, 9 Jan 2017 21:23:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNbjF095778; Mon, 9 Jan 2017 21:23:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNbjF095778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311823 - vendor/compiler-rt/compiler-rt-trunk-r291476 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:39 -0000 Author: dim Date: Mon Jan 9 21:23:37 2017 New Revision: 311823 URL: https://svnweb.freebsd.org/changeset/base/311823 Log: Tag compiler-rt trunk r291476. Added: vendor/compiler-rt/compiler-rt-trunk-r291476/ - copied from r311822, vendor/compiler-rt/dist/ From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:44 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0086ACA8176; Mon, 9 Jan 2017 21:23:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 969FB147A; Mon, 9 Jan 2017 21:23:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNgRQ095841; Mon, 9 Jan 2017 21:23:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNfEs095826; Mon, 9 Jan 2017 21:23:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNfEs095826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311824 - in vendor/libc++/dist: . docs docs/DesignDocs include include/experimental include/support/win32 lib src src/experimental src/include test test/libcxx/iterators test/libcxx/te... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:44 -0000 Author: dim Date: Mon Jan 9 21:23:41 2017 New Revision: 311824 URL: https://svnweb.freebsd.org/changeset/base/311824 Log: Vendor import of libc++ trunk r291476: https://llvm.org/svn/llvm-project/libcxx/trunk@291476 Added: vendor/libc++/dist/docs/DesignDocs/ThreadingSupportAPI.rst vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream/istream.cons/copy.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/strings/string.view/string_view.literals/ vendor/libc++/dist/test/std/strings/string.view/string_view.literals/literal.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/strings/string.view/string_view.literals/literal1.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/strings/string.view/string_view.literals/literal1.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/strings/string.view/string_view.literals/literal2.fail.cpp (contents, props changed) vendor/libc++/dist/test/std/strings/string.view/string_view.literals/literal2.pass.cpp (contents, props changed) vendor/libc++/dist/test/std/strings/string.view/string_view.literals/literal3.pass.cpp (contents, props changed) Deleted: vendor/libc++/dist/include/__undef___deallocate Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/CREDITS.TXT vendor/libc++/dist/docs/DesignDocs/VisibilityMacros.rst vendor/libc++/dist/docs/index.rst vendor/libc++/dist/include/__bit_reference vendor/libc++/dist/include/__config vendor/libc++/dist/include/__config_site.in vendor/libc++/dist/include/__debug vendor/libc++/dist/include/__functional_base vendor/libc++/dist/include/__hash_table vendor/libc++/dist/include/__sso_allocator vendor/libc++/dist/include/__threading_support vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/atomic vendor/libc++/dist/include/experimental/algorithm vendor/libc++/dist/include/experimental/dynarray vendor/libc++/dist/include/experimental/iterator vendor/libc++/dist/include/istream vendor/libc++/dist/include/memory vendor/libc++/dist/include/module.modulemap vendor/libc++/dist/include/new vendor/libc++/dist/include/ostream vendor/libc++/dist/include/regex vendor/libc++/dist/include/string_view vendor/libc++/dist/include/support/win32/support.h vendor/libc++/dist/include/thread vendor/libc++/dist/include/type_traits vendor/libc++/dist/include/valarray vendor/libc++/dist/lib/CMakeLists.txt vendor/libc++/dist/src/chrono.cpp vendor/libc++/dist/src/exception.cpp vendor/libc++/dist/src/experimental/memory_resource.cpp vendor/libc++/dist/src/include/config_elast.h vendor/libc++/dist/src/iostream.cpp vendor/libc++/dist/src/locale.cpp vendor/libc++/dist/src/thread.cpp vendor/libc++/dist/test/CMakeLists.txt vendor/libc++/dist/test/libcxx/iterators/trivial_iterators.pass.cpp vendor/libc++/dist/test/libcxx/test/config.py vendor/libc++/dist/test/libcxx/test/executor.py vendor/libc++/dist/test/libcxx/test/format.py vendor/libc++/dist/test/lit.site.cfg.in vendor/libc++/dist/test/std/containers/sequences/array/iterators.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream/istream.cons/move.pass.cpp vendor/libc++/dist/test/std/iterators/iterator.range/begin-end.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp vendor/libc++/dist/test/support/disable_missing_braces_warning.h vendor/libc++/dist/test/support/external_threads.cpp vendor/libc++/dist/test/support/nasty_macros.hpp vendor/libc++/dist/test/support/test_iterators.h vendor/libc++/dist/www/cxx1z_status.html Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/CMakeLists.txt Mon Jan 9 21:23:41 2017 (r311824) @@ -116,7 +116,12 @@ if (LIBCXX_CXX_ABI STREQUAL "default") set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") set(LIBCXX_CXX_ABI_INTREE 1) else() - set(LIBCXX_CXX_ABI_LIBNAME "default") + if (WIN32 AND NOT MINGW) + # FIXME: Figure out how to configure the ABI library on Windows. + set(LIBCXX_CXX_ABI_LIBNAME "none") + else() + set(LIBCXX_CXX_ABI_LIBNAME "default") + endif() endif() else() set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}") @@ -169,6 +174,9 @@ option(LIBCXX_HAS_PTHREAD_API "Ignore au option(LIBCXX_HAS_EXTERNAL_THREAD_API "Build libc++ with an externalized threading API. This option may only be set to ON when LIBCXX_ENABLE_THREADS=ON." OFF) +option(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY + "Build libc++ with an externalized threading library. + This option may only be set to ON when LIBCXX_ENABLE_THREADS=ON" OFF) # Misc options ---------------------------------------------------------------- # FIXME: Turn -pedantic back ON. It is currently off because it warns @@ -230,12 +238,24 @@ if(NOT LIBCXX_ENABLE_THREADS) message(FATAL_ERROR "LIBCXX_HAS_EXTERNAL_THREAD_API can only be set to ON" " when LIBCXX_ENABLE_THREADS is also set to ON.") endif() + if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) + message(FATAL_ERROR "LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY can only be set " + "to ON when LIBCXX_ENABLE_THREADS is also set to ON.") + endif() + endif() -if(LIBCXX_HAS_PTHREAD_API AND LIBCXX_HAS_EXTERNAL_THREAD_API) - message(FATAL_ERROR "The options LIBCXX_HAS_EXTERNAL_THREAD_API" - "and LIBCXX_HAS_PTHREAD_API cannot be both" - "set to ON at the same time.") +if (LIBCXX_HAS_EXTERNAL_THREAD_API) + if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) + message(FATAL_ERROR "The options LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY and " + "LIBCXX_HAS_EXTERNAL_THREAD_API cannot both be ON at " + "the same time") + endif() + if (LIBCXX_HAS_PTHREAD_API) + message(FATAL_ERROR "The options LIBCXX_HAS_EXTERNAL_THREAD_API" + "and LIBCXX_HAS_PTHREAD_API cannot be both" + "set to ON at the same time.") + endif() endif() # Ensure LLVM_USE_SANITIZER is not specified when LIBCXX_GENERATE_COVERAGE @@ -441,7 +461,7 @@ if (NOT LIBCXX_ENABLE_RTTI) endif() # Threading flags ============================================================= -if (LIBCXX_HAS_EXTERNAL_THREAD_API AND LIBCXX_ENABLE_SHARED) +if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXX_ENABLE_SHARED) # Need to allow unresolved symbols if this is to work with shared library builds if (APPLE) add_link_flags("-undefined dynamic_lookup") @@ -520,6 +540,7 @@ config_define_if_not(LIBCXX_ENABLE_THREA config_define_if(LIBCXX_HAS_PTHREAD_API _LIBCPP_HAS_THREAD_API_PTHREAD) config_define_if(LIBCXX_HAS_EXTERNAL_THREAD_API _LIBCPP_HAS_THREAD_API_EXTERNAL) +config_define_if(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC) # By default libc++ on Windows expects to use a shared library, which requires Modified: vendor/libc++/dist/CREDITS.TXT ============================================================================== --- vendor/libc++/dist/CREDITS.TXT Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/CREDITS.TXT Mon Jan 9 21:23:41 2017 (r311824) @@ -80,6 +80,10 @@ N: Andrew Morrow E: andrew.c.morrow@gmail.com D: Minor patches and Linux fixes. +N: Michael Park +E: mpark@apache.org +D: Implementation of . + N: Arvid Picciani E: aep at exys dot org D: Minor patches and musl port. Added: vendor/libc++/dist/docs/DesignDocs/ThreadingSupportAPI.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/docs/DesignDocs/ThreadingSupportAPI.rst Mon Jan 9 21:23:41 2017 (r311824) @@ -0,0 +1,70 @@ +===================== +Threading Support API +===================== + +.. contents:: + :local: + +Overview +======== + +Libc++ supports using multiple different threading models and configurations +to implement the threading parts of libc++, including ```` and ````. +These different models provide entirely different interfaces from each +other. To address this libc++ wraps the underlying threading API in a new and +consistent API, which it uses internally to implement threading primitives. + +The ``<__threading_support>`` header is where libc++ defines its internal +threading interface. It contains forward declarations of the internal threading +interface as well as definitions for the interface. + +External Threading API and the ``<__external_threading>`` header +================================================================ + +In order to support vendors with custom threading API's libc++ allows the +entire internal threading interface to be provided by an external, +vendor provided, header. + +When ``_LIBCPP_HAS_THREAD_API_EXTERNAL`` is defined the ``<__threading_support>`` +header simply forwards to the ``<__external_threading>`` header (which must exist). +It is expected that the ``<__external_threading>`` header provide the exact +interface normally provided by ``<__threading_support>``. + +External Threading Library +========================== + +Normally ``<__threading_support>`` provides inline definitions to each internal +threading API function it declares. However libc++ also supports using an +external library to provide the definitions. + +When ``_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL`` libc++ does not provide inline +definitions for the internal API, instead assuming the definitions will be +provided by an external library. + +Threading Configuration Macros +============================== + +**_LIBCPP_HAS_NO_THREADS** + This macro is defined when libc++ is built without threading support. It + should not be manually defined by the user. + +**_LIBCPP_HAS_THREAD_API_EXTERNAL** + This macro is defined when libc++ should use the ``<__external_threading>`` + header to provide the internal threading API. This macro overrides + ``_LIBCPP_HAS_THREAD_API_PTHREAD``. + +**_LIBCPP_HAS_THREAD_API_PTHREAD** + This macro is defined when libc++ should use POSIX threads to implement the + internal threading API. + +**_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL** + This macro is defined when libc++ expects the definitions of the internal + threading API to be provided by an external library. When defined + ``<__threading_support>`` will only provide the forward declarations and + typedefs for the internal threading API. + +**_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL** + This macro is used to build an external threading library using the + ``<__threading_support>``. Specifically it exposes the threading API + definitions in ``<__threading_support>`` as non-inline definitions meant to + be compiled into a library. Modified: vendor/libc++/dist/docs/DesignDocs/VisibilityMacros.rst ============================================================================== --- vendor/libc++/dist/docs/DesignDocs/VisibilityMacros.rst Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/docs/DesignDocs/VisibilityMacros.rst Mon Jan 9 21:23:41 2017 (r311824) @@ -49,7 +49,7 @@ Visibility Macros attribute. With GCC the `visibility(...)` attribute is used and member functions are affected. -**_LIBCPP_TEMPLATE_ONLY** +**_LIBCPP_TEMPLATE_VIS** The same as `_LIBCPP_TYPE_VIS` except that it may be applied to class templates. Modified: vendor/libc++/dist/docs/index.rst ============================================================================== --- vendor/libc++/dist/docs/index.rst Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/docs/index.rst Mon Jan 9 21:23:41 2017 (r311824) @@ -131,7 +131,7 @@ Design Documents DesignDocs/CapturingConfigInfo DesignDocs/ABIVersioning DesignDocs/VisibilityMacros - + DesignDocs/ThreadingSupportAPI * ` design `_ * ` design `_ Modified: vendor/libc++/dist/include/__bit_reference ============================================================================== --- vendor/libc++/dist/include/__bit_reference Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/__bit_reference Mon Jan 9 21:23:41 2017 (r311824) @@ -40,11 +40,8 @@ class __bit_reference __storage_pointer __seg_; __storage_type __mask_; -#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; -#else - friend class _Cp::__self; -#endif + friend class __bit_const_reference<_Cp>; friend class __bit_iterator<_Cp, false>; public: @@ -130,11 +127,7 @@ class __bit_const_reference __storage_pointer __seg_; __storage_type __mask_; -#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; -#else - friend class _Cp::__self; -#endif friend class __bit_iterator<_Cp, true>; public: _LIBCPP_INLINE_VISIBILITY @@ -1221,11 +1214,8 @@ private: __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT : __seg_(__s), __ctz_(__ctz) {} -#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) friend typename _Cp::__self; -#else - friend class _Cp::__self; -#endif + friend class __bit_reference<_Cp>; friend class __bit_const_reference<_Cp>; friend class __bit_iterator<_Cp, true>; Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/__config Mon Jan 9 21:23:41 2017 (r311824) @@ -101,6 +101,25 @@ #define __is_identifier(__x) 1 #endif +#if defined(__clang__) +#define _LIBCPP_COMPILER_CLANG +#elif defined(__GNUC__) +#define _LIBCPP_COMPILER_GCC +#elif defined(_MSC_VER) +#define _LIBCPP_COMPILER_MSVC +#elif defined(__IBMCPP__) +#define _LIBCPP_COMPILER_IBM +#endif + +// FIXME: ABI detection should be done via compiler builtin macros. This +// is just a placeholder until Clang implements such macros. For now assume +// that Windows compilers pretending to be MSVC++ target the microsoft ABI. +#if defined(_WIN32) && defined(_MSC_VER) +# define _LIBCPP_ABI_MICROSOFT +#else +# define _LIBCPP_ABI_ITANIUM +#endif + // Need to detect which libc we're using if we're on Linux. #if defined(__linux__) #include @@ -164,16 +183,7 @@ # define _LIBCPP_LITTLE_ENDIAN 1 # define _LIBCPP_BIG_ENDIAN 0 # define _LIBCPP_SHORT_WCHAR 1 -// Compiler intrinsics (MSVC) -# if defined(_MSC_VER) && _MSC_VER >= 1400 -# define _LIBCPP_HAS_IS_BASE_OF -# endif -# if defined(_MSC_VER) && !defined(__clang__) -# define _LIBCPP_MSVC // Using Microsoft Visual C++ compiler -# define _LIBCPP_TOSTRING2(x) #x -# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x) -# define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x)) -# endif + // If mingw not explicitly detected, assume using MS C runtime only. # ifndef __MINGW32__ # define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library @@ -230,7 +240,7 @@ #define _LIBCPP_NO_CFI #endif -#if defined(__clang__) +#if defined(_LIBCPP_COMPILER_CLANG) // _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT left here for backward compatibility. @@ -275,10 +285,6 @@ typedef __char32_t char32_t; # define _LIBCPP_NORETURN __attribute__ ((noreturn)) #endif -#if !(__has_feature(cxx_deleted_functions)) -#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS -#endif // !(__has_feature(cxx_deleted_functions)) - #if !(__has_feature(cxx_lambdas)) #define _LIBCPP_HAS_NO_LAMBDAS #endif @@ -390,7 +396,7 @@ namespace std { #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow"))) #endif -#elif defined(__GNUC__) +#elif defined(_LIBCPP_COMPILER_GCC) #define _ALIGNAS(x) __attribute__((__aligned__(x))) #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) @@ -431,7 +437,6 @@ namespace std { #ifndef __GXX_EXPERIMENTAL_CXX0X__ #define _LIBCPP_HAS_NO_DECLTYPE -#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_NULLPTR #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS @@ -448,7 +453,6 @@ namespace std { #if _GNUC_VER < 404 #define _LIBCPP_HAS_NO_DECLTYPE -#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS @@ -475,15 +479,23 @@ using namespace _LIBCPP_NAMESPACE __attr #define _LIBCPP_HAS_NO_ASAN #endif -#elif defined(_LIBCPP_MSVC) +#elif defined(_LIBCPP_COMPILER_MSVC) + +#define _LIBCPP_TOSTRING2(x) #x +#define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x) +#define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x)) +#if _MSC_VER < 1900 +#error "MSVC versions prior to Visual Studio 2015 are not supported" +#endif + +#define _LIBCPP_HAS_IS_BASE_OF #define _LIBCPP_HAS_NO_CONSTEXPR #define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES #if _MSC_VER <= 1800 #define _LIBCPP_HAS_NO_UNICODE_CHARS #endif -#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_NOEXCEPT #define __alignof__ __alignof #define _LIBCPP_NORETURN __declspec(noreturn) @@ -500,7 +512,7 @@ namespace std { #define _LIBCPP_HAS_NO_ASAN -#elif defined(__IBMCPP__) +#elif defined(_LIBCPP_COMPILER_IBM) #define _ALIGNAS(x) __attribute__((__aligned__(x))) #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) @@ -530,7 +542,7 @@ namespace std { #define _LIBCPP_HAS_NO_ASAN -#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__ +#endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] #if defined(__ELF__) #define _LIBCPP_OBJECT_FORMAT_ELF 1 @@ -566,7 +578,7 @@ namespace std { #define _LIBCPP_FUNC_VIS_ONLY #define _LIBCPP_ENUM_VIS -#if defined(_LIBCPP_MSVC) +#if defined(_LIBCPP_COMPILER_MSVC) # define _LIBCPP_INLINE_VISIBILITY __forceinline # define _LIBCPP_ALWAYS_INLINE __forceinline # define _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY __forceinline @@ -739,7 +751,7 @@ template struct __static_asse #define _LIBCPP_DEFAULT = default; #endif -#ifdef _LIBCPP_HAS_NO_DELETED_FUNCTIONS +#ifdef _LIBCPP_CXX03_LANG #define _LIBCPP_EQUAL_DELETE #else #define _LIBCPP_EQUAL_DELETE = delete @@ -892,8 +904,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit // Thread API #if !defined(_LIBCPP_HAS_NO_THREADS) && \ - !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \ - !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) + !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) # if defined(__FreeBSD__) || \ defined(__Fuchsia__) || \ defined(__NetBSD__) || \ @@ -901,7 +912,9 @@ _LIBCPP_FUNC_VIS extern "C" void __sanit defined(__APPLE__) || \ defined(__CloudABI__) || \ defined(__sun__) -# define _LIBCPP_HAS_THREAD_API_PTHREAD +# define _LIBCPP_HAS_THREAD_API_PTHREAD +# elif defined(_LIBCPP_WIN32API) +# define _LIBCPP_HAS_THREAD_API_WIN32 # else # error "No thread API" # endif // _LIBCPP_HAS_THREAD_API Modified: vendor/libc++/dist/include/__config_site.in ============================================================================== --- vendor/libc++/dist/include/__config_site.in Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/__config_site.in Mon Jan 9 21:23:41 2017 (r311824) @@ -21,6 +21,7 @@ #cmakedefine _LIBCPP_HAS_MUSL_LIBC #cmakedefine _LIBCPP_HAS_THREAD_API_PTHREAD #cmakedefine _LIBCPP_HAS_THREAD_API_EXTERNAL +#cmakedefine _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL #cmakedefine _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS #endif // _LIBCPP_CONFIG_SITE Modified: vendor/libc++/dist/include/__debug ============================================================================== --- vendor/libc++/dist/include/__debug Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/__debug Mon Jan 9 21:23:41 2017 (r311824) @@ -122,7 +122,7 @@ struct _LIBCPP_TYPE_VIS __i_node __i_node* __next_; __c_node* __c_; -#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS +#ifndef _LIBCPP_CXX03_LANG __i_node(const __i_node&) = delete; __i_node& operator=(const __i_node&) = delete; #else @@ -145,7 +145,7 @@ struct _LIBCPP_TYPE_VIS __c_node __i_node** end_; __i_node** cap_; -#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS +#ifndef _LIBCPP_CXX03_LANG __c_node(const __c_node&) = delete; __c_node& operator=(const __c_node&) = delete; #else @@ -232,7 +232,7 @@ class _LIBCPP_TYPE_VIS __libcpp_db __libcpp_db(); public: -#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS +#ifndef _LIBCPP_CXX03_LANG __libcpp_db(const __libcpp_db&) = delete; __libcpp_db& operator=(const __libcpp_db&) = delete; #else Modified: vendor/libc++/dist/include/__functional_base ============================================================================== --- vendor/libc++/dist/include/__functional_base Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/__functional_base Mon Jan 9 21:23:41 2017 (r311824) @@ -552,23 +552,10 @@ cref(reference_wrapper<_Tp> __t) _NOEXCE return cref(__t.get()); } -#ifndef _LIBCPP_HAS_NO_VARIADICS -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES -#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS - +#ifndef _LIBCPP_CXX03_LANG template void ref(const _Tp&&) = delete; template void cref(const _Tp&&) = delete; - -#else // _LIBCPP_HAS_NO_DELETED_FUNCTIONS - -template void ref(const _Tp&&);// = delete; -template void cref(const _Tp&&);// = delete; - -#endif // _LIBCPP_HAS_NO_DELETED_FUNCTIONS - -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES - -#endif // _LIBCPP_HAS_NO_VARIADICS +#endif #if _LIBCPP_STD_VER > 11 template Modified: vendor/libc++/dist/include/__hash_table ============================================================================== --- vendor/libc++/dist/include/__hash_table Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/__hash_table Mon Jan 9 21:23:41 2017 (r311824) @@ -20,7 +20,6 @@ #include #include <__undef_min_max> -#include <__undef___deallocate> #include <__debug> @@ -1321,7 +1320,7 @@ private: void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {} #endif // _LIBCPP_CXX03_LANG - void __deallocate(__next_pointer __np) _NOEXCEPT; + void __deallocate_node(__next_pointer __np) _NOEXCEPT; __next_pointer __detach() _NOEXCEPT; template friend class _LIBCPP_TEMPLATE_VIS unordered_map; @@ -1454,7 +1453,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> "Predicate must be copy-constructible."); static_assert((is_copy_constructible::value), "Hasher must be copy-constructible."); - __deallocate(__p1_.first().__next_); + __deallocate_node(__p1_.first().__next_); #if _LIBCPP_DEBUG_LEVEL >= 2 __get_db()->__erase_c(this); #endif @@ -1492,7 +1491,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> template void -__hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate(__next_pointer __np) +__hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate_node(__next_pointer __np) _NOEXCEPT { __node_allocator& __na = __node_alloc(); @@ -1599,11 +1598,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> } catch (...) { - __deallocate(__cache); + __deallocate_node(__cache); throw; } #endif // _LIBCPP_NO_EXCEPTIONS - __deallocate(__cache); + __deallocate_node(__cache); } const_iterator __i = __u.begin(); while (__u.size() != 0) @@ -1661,11 +1660,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> } catch (...) { - __deallocate(__cache); + __deallocate_node(__cache); throw; } #endif // _LIBCPP_NO_EXCEPTIONS - __deallocate(__cache); + __deallocate_node(__cache); } for (; __first != __last; ++__first) __insert_unique(*__first); @@ -1701,11 +1700,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> } catch (...) { - __deallocate(__cache); + __deallocate_node(__cache); throw; } #endif // _LIBCPP_NO_EXCEPTIONS - __deallocate(__cache); + __deallocate_node(__cache); } for (; __first != __last; ++__first) __insert_multi(_NodeTypes::__get_value(*__first)); @@ -1765,7 +1764,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { if (size() > 0) { - __deallocate(__p1_.first().__next_); + __deallocate_node(__p1_.first().__next_); __p1_.first().__next_ = nullptr; size_type __bc = bucket_count(); for (size_type __i = 0; __i < __bc; ++__i) Modified: vendor/libc++/dist/include/__sso_allocator ============================================================================== --- vendor/libc++/dist/include/__sso_allocator Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/__sso_allocator Mon Jan 9 21:23:41 2017 (r311824) @@ -15,8 +15,6 @@ #include #include -#include <__undef___deallocate> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif @@ -64,7 +62,7 @@ public: if (__p == (pointer)&buf_) __allocated_ = false; else - _VSTD::__deallocate(__p); + _VSTD::__libcpp_deallocate(__p); } _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);} Modified: vendor/libc++/dist/include/__threading_support ============================================================================== --- vendor/libc++/dist/include/__threading_support Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/__threading_support Mon Jan 9 21:23:41 2017 (r311824) @@ -17,39 +17,24 @@ #pragma GCC system_header #endif -#ifndef _LIBCPP_HAS_NO_THREADS - -#ifndef __libcpp_has_include - #ifndef __has_include - #define __libcpp_has_include(x) 0 - #else - #define __libcpp_has_include(x) __has_include(x) - #endif -#endif - -#if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) && \ - !__libcpp_has_include(<__external_threading>) -// If the <__external_threading> header is absent, build libc++ against a -// pthread-oriented thread api but leave out its implementation. This setup -// allows building+testing of an externally-threaded library variant (on any -// platform that supports pthreads). Here, an 'externally-threaded' library -// variant is one where the implementation of the libc++ thread api is provided -// as a separate library. -#define _LIBCPP_HAS_THREAD_API_EXTERNAL_PTHREAD -#endif +#if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) +# include <__external_threading> +#elif !defined(_LIBCPP_HAS_NO_THREADS) -#if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) && \ - __libcpp_has_include(<__external_threading>) -#include <__external_threading> -#else +#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) +# include +# include +#elif defined(_LIBCPP_HAS_THREAD_API_WIN32) +#include +#include +#include +#include -#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \ - defined(_LIBCPP_HAS_THREAD_API_EXTERNAL_PTHREAD) -#include -#include +#include #endif -#if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) +#if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \ + defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL) #define _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_FUNC_VIS #else #define _LIBCPP_THREAD_ABI_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY @@ -57,8 +42,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \ - defined(_LIBCPP_HAS_THREAD_API_EXTERNAL_PTHREAD) +#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) // Mutex typedef pthread_mutex_t __libcpp_mutex_t; #define _LIBCPP_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER @@ -81,6 +65,33 @@ typedef pthread_t __libcpp_thread_t; // Thrad Local Storage typedef pthread_key_t __libcpp_tls_key; + +#define _LIBCPP_TLS_DESTRUCTOR_CC +#else +// Mutex +typedef SRWLOCK __libcpp_mutex_t; +#define _LIBCPP_MUTEX_INITIALIZER SRWLOCK_INIT + +typedef CRITICAL_SECTION __libcpp_recursive_mutex_t; + +// Condition Variable +typedef CONDITION_VARIABLE __libcpp_condvar_t; +#define _LIBCPP_CONDVAR_INITIALIZER CONDITION_VARIABLE_INIT + +// Execute Once +typedef INIT_ONCE __libcpp_exec_once_flag; +#define _LIBCPP_EXEC_ONCE_INITIALIZER INIT_ONCE_STATIC_INIT + +// Thread ID +typedef DWORD __libcpp_thread_id; + +// Thread +typedef HANDLE __libcpp_thread_t; + +// Thread Local Storage +typedef DWORD __libcpp_tls_key; + +#define _LIBCPP_TLS_DESTRUCTOR_CC WINAPI #endif // Mutex @@ -167,7 +178,8 @@ void __libcpp_thread_yield(); // Thread local storage _LIBCPP_THREAD_ABI_VISIBILITY -int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *)); +int __libcpp_tls_create(__libcpp_tls_key* __key, + void(_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void*)); _LIBCPP_THREAD_ABI_VISIBILITY void *__libcpp_tls_get(__libcpp_tls_key __key); @@ -175,8 +187,10 @@ void *__libcpp_tls_get(__libcpp_tls_key _LIBCPP_THREAD_ABI_VISIBILITY int __libcpp_tls_set(__libcpp_tls_key __key, void *__p); -#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \ - defined(_LIBCPP_BUILDING_THREAD_API_EXTERNAL_PTHREAD) +#if !defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \ + defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL) + +#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m) { @@ -342,12 +356,230 @@ int __libcpp_tls_set(__libcpp_tls_key __ return pthread_setspecific(__key, __p); } +#elif defined(_LIBCPP_HAS_THREAD_API_WIN32) + +// Mutex +int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m) +{ + InitializeCriticalSection(__m); + return 0; +} + +int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m) +{ + EnterCriticalSection(__m); + return 0; +} + +int __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m) +{ + TryEnterCriticalSection(__m); + return 0; +} + +int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m) +{ + LeaveCriticalSection(__m); + return 0; +} + +int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m) +{ + static_cast(__m); + return 0; +} + +int __libcpp_mutex_lock(__libcpp_mutex_t *__m) +{ + AcquireSRWLockExclusive(__m); + return 0; +} + +int __libcpp_mutex_trylock(__libcpp_mutex_t *__m) +{ + TryAcquireSRWLockExclusive(__m); + return 0; +} + +int __libcpp_mutex_unlock(__libcpp_mutex_t *__m) +{ + ReleaseSRWLockExclusive(__m); + return 0; +} + +int __libcpp_mutex_destroy(__libcpp_mutex_t *__m) +{ + static_cast(__m); + return 0; +} + +// Condition Variable +int __libcpp_condvar_signal(__libcpp_condvar_t *__cv) +{ + WakeConditionVariable(__cv); + return 0; +} + +int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv) +{ + WakeAllConditionVariable(__cv); + return 0; +} + +int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m) +{ + SleepConditionVariableSRW(__cv, __m, INFINITE, 0); + return 0; +} + +int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m, + timespec *__ts) +{ + using namespace _VSTD::chrono; + + auto duration = seconds(__ts->tv_sec) + nanoseconds(__ts->tv_nsec); + auto abstime = + system_clock::time_point(duration_cast(duration)); + auto timeout_ms = duration_cast(abstime - system_clock::now()); + + if (!SleepConditionVariableSRW(__cv, __m, + timeout_ms.count() > 0 ? timeout_ms.count() + : 0, + 0)) + return GetLastError(); + return 0; +} + +int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv) +{ + static_cast(__cv); + return 0; +} + +// Execute Once +static inline _LIBCPP_ALWAYS_INLINE BOOL CALLBACK +__libcpp_init_once_execute_once_thunk(PINIT_ONCE __init_once, PVOID __parameter, + PVOID *__context) +{ + static_cast(__init_once); + static_cast(__context); + + void (*init_routine)(void) = reinterpret_cast(__parameter); + init_routine(); + return TRUE; +} + +int __libcpp_execute_once(__libcpp_exec_once_flag *__flag, + void (*__init_routine)(void)) +{ + if (!InitOnceExecuteOnce(__flag, __libcpp_init_once_execute_once_thunk, + reinterpret_cast(__init_routine), NULL)) + return GetLastError(); + return 0; +} + +// Thread ID +bool __libcpp_thread_id_equal(__libcpp_thread_id __lhs, + __libcpp_thread_id __rhs) +{ + return __lhs == __rhs; +} + +bool __libcpp_thread_id_less(__libcpp_thread_id __lhs, __libcpp_thread_id __rhs) +{ + return __lhs < __rhs; +} + +// Thread +struct __libcpp_beginthreadex_thunk_data +{ + void *(*__func)(void *); + void *__arg; +}; + +static inline _LIBCPP_ALWAYS_INLINE unsigned int WINAPI +__libcpp_beginthreadex_thunk(void *__data) +{ + __libcpp_beginthreadex_thunk_data data = + *reinterpret_cast<__libcpp_beginthreadex_thunk_data *>(__data); + delete reinterpret_cast<__libcpp_beginthreadex_thunk_data *>(__data); + return reinterpret_cast(data.__func(data.__arg)); +} + +int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *), + void *__arg) +{ + auto *data = new __libcpp_beginthreadex_thunk_data; + data->__func = __func; + data->__arg = __arg; + + *__t = reinterpret_cast(_beginthreadex(NULL, 0, + __libcpp_beginthreadex_thunk, + data, 0, NULL)); + if (*__t) + return 0; + return GetLastError(); +} + +__libcpp_thread_id __libcpp_thread_get_current_id() +{ + return GetCurrentThreadId(); +} + +__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t) +{ + return GetThreadId(*__t); +} + +int __libcpp_thread_join(__libcpp_thread_t *__t) +{ + if (WaitForSingleObjectEx(*__t, INFINITE, FALSE) == WAIT_FAILED) + return GetLastError(); + if (!CloseHandle(*__t)) + return GetLastError(); + return 0; +} + +int __libcpp_thread_detach(__libcpp_thread_t *__t) +{ + if (!CloseHandle(*__t)) + return GetLastError(); + return 0; +} + +void __libcpp_thread_yield() +{ + SwitchToThread(); +} + +// Thread Local Storage +int __libcpp_tls_create(__libcpp_tls_key* __key, + void(_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void*)) +{ + *__key = FlsAlloc(__at_exit); + if (*__key == FLS_OUT_OF_INDEXES) + return GetLastError(); + return 0; +} + +void *__libcpp_tls_get(__libcpp_tls_key __key) +{ + return FlsGetValue(__key); +} + +int __libcpp_tls_set(__libcpp_tls_key __key, void *__p) +{ + if (!FlsSetValue(__key, __p)) + return GetLastError(); + return 0; +} + #endif // _LIBCPP_HAS_THREAD_API_PTHREAD -_LIBCPP_END_NAMESPACE_STD +#endif // !_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL -#endif // !_LIBCPP_HAS_THREAD_API_EXTERNAL || !__libcpp_has_include(<__external_threading>) +_LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_HAS_NO_THREADS +#endif // !_LIBCPP_HAS_NO_THREADS #endif // _LIBCPP_THREADING_SUPPORT Modified: vendor/libc++/dist/include/algorithm ============================================================================== --- vendor/libc++/dist/include/algorithm Mon Jan 9 21:23:37 2017 (r311823) +++ vendor/libc++/dist/include/algorithm Mon Jan 9 21:23:41 2017 (r311824) @@ -3100,28 +3100,28 @@ template _LIBCPP_INLINE_VISIBILITY _SampleIterator __sample(_PopulationIterator __first, - _PopulationIterator __last, _SampleIterator __out, + _PopulationIterator __last, _SampleIterator __output, _Distance __n, _UniformRandomNumberGenerator & __g, input_iterator_tag) { _Distance __k = 0; for (; __first != __last && __k < __n; ++__first, (void)++__k) - __out[__k] = *__first; + __output[__k] = *__first; _Distance __sz = __k; for (; __first != __last; ++__first, (void)++__k) { _Distance __r = _VSTD::uniform_int_distribution<_Distance>(0, __k)(__g); if (__r < __sz) - __out[__r] = *__first; + __output[__r] = *__first; } - return __out + _VSTD::min(__n, __k); + return __output + _VSTD::min(__n, __k); } template _LIBCPP_INLINE_VISIBILITY _SampleIterator __sample(_PopulationIterator __first, - _PopulationIterator __last, _SampleIterator __out, + _PopulationIterator __last, _SampleIterator __output, _Distance __n, _UniformRandomNumberGenerator& __g, forward_iterator_tag) { @@ -3130,18 +3130,18 @@ _SampleIterator __sample(_PopulationIter _Distance __r = _VSTD::uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g); if (__r < __n) { - *__out++ = *__first; + *__output++ = *__first; --__n; } } - return __out; + return __output; } template _LIBCPP_INLINE_VISIBILITY _SampleIterator __sample(_PopulationIterator __first, - _PopulationIterator __last, _SampleIterator __out, + _PopulationIterator __last, _SampleIterator __output, _Distance __n, _UniformRandomNumberGenerator& __g) { typedef typename iterator_traits<_PopulationIterator>::iterator_category _PopCategory; @@ -3153,7 +3153,7 @@ _SampleIterator __sample(_PopulationIter typedef typename common_type<_Distance, _Difference>::type _CommonType; _LIBCPP_ASSERT(__n >= 0, "N must be a positive number."); return _VSTD::__sample( - __first, __last, __out, _CommonType(__n), + __first, __last, __output, _CommonType(__n), __g, _PopCategory()); } @@ -3162,9 +3162,9 @@ template inline _LIBCPP_INLINE_VISIBILITY _SampleIterator sample(_PopulationIterator __first, - _PopulationIterator __last, _SampleIterator __out, + _PopulationIterator __last, _SampleIterator __output, _Distance __n, _UniformRandomNumberGenerator&& __g) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:35 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CF39CA8104; Mon, 9 Jan 2017 21:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB34B1320; Mon, 9 Jan 2017 21:23:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNYkj095731; Mon, 9 Jan 2017 21:23:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNVw8095704; Mon, 9 Jan 2017 21:23:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNVw8095704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311822 - in vendor/compiler-rt/dist: cmake/Modules lib/asan lib/asan/scripts lib/asan/tests lib/builtins/arm lib/lsan lib/sanitizer_common lib/sanitizer_common/tests lib/stats lib/tsan... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:35 -0000 Author: dim Date: Mon Jan 9 21:23:31 2017 New Revision: 311822 URL: https://svnweb.freebsd.org/changeset/base/311822 Log: Vendor import of compiler-rt trunk r291476: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291476 Added: vendor/compiler-rt/dist/lib/asan/weak_symbols.txt (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/weak_symbols.txt (contents, props changed) vendor/compiler-rt/dist/lib/ubsan/weak_symbols.txt (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/haswell-symbolication.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/uuid.cc (contents, props changed) Modified: vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake vendor/compiler-rt/dist/lib/asan/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/dist/lib/asan/asan_rtl.cc vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/builtins/arm/aeabi_fcmp.S vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc vendor/compiler-rt/dist/lib/lsan/lsan_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_internal.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_stacktrace_printer_test.cc vendor/compiler-rt/dist/lib/stats/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/rtl/tsan.syms.extra vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.cc vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/ubsan_diag.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc vendor/compiler-rt/dist/test/lit.common.cfg vendor/compiler-rt/dist/test/tsan/simple_stack2.cc Modified: vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake Mon Jan 9 21:23:31 2017 (r311822) @@ -46,6 +46,17 @@ macro(add_sanitizer_rt_symbols name) endforeach() endmacro() +# This function is only used on Darwin, where undefined symbols must be specified +# in the linker invocation. +function(add_weak_symbols libname linkflags) + file(STRINGS "${COMPILER_RT_SOURCE_DIR}/lib/${libname}/weak_symbols.txt" WEAK_SYMBOLS) + set(local_linkflags ${${linkflags}}) + foreach(SYMBOL ${WEAK_SYMBOLS}) + set(local_linkflags ${local_linkflags} -Wl,-U,${SYMBOL}) + endforeach() + set(${linkflags} ${local_linkflags} PARENT_SCOPE) +endfunction() + macro(add_sanitizer_rt_version_list name) set(vers ${CMAKE_CURRENT_BINARY_DIR}/${name}.vers) cmake_parse_arguments(ARG "" "" "LIBS;EXTRA" ${ARGN}) Modified: vendor/compiler-rt/dist/lib/asan/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/asan/CMakeLists.txt Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/asan/CMakeLists.txt Mon Jan 9 21:23:31 2017 (r311822) @@ -106,6 +106,10 @@ endif() add_compiler_rt_component(asan) if(APPLE) + add_weak_symbols("asan" WEAK_SYMBOL_LINKFLAGS) + add_weak_symbols("ubsan" WEAK_SYMBOL_LINKFLAGS) + add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINKFLAGS) + add_compiler_rt_runtime(clang_rt.asan SHARED OS ${SANITIZER_COMMON_SUPPORTED_OS} @@ -117,6 +121,7 @@ if(APPLE) RTLSanCommon RTUbsan CFLAGS ${ASAN_DYNAMIC_CFLAGS} + LINKFLAGS ${WEAK_SYMBOL_LINKFLAGS} DEFS ${ASAN_DYNAMIC_DEFINITIONS} PARENT_TARGET asan) else() Modified: vendor/compiler-rt/dist/lib/asan/asan_report.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_report.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/asan/asan_report.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -179,6 +179,8 @@ class ScopedInErrorReport { if (common_flags()->print_cmdline) PrintCmdline(); + if (common_flags()->print_module_map == 2) PrintModuleMap(); + // Copy the message buffer so that we could start logging without holding a // lock that gets aquired during printing. InternalScopedBuffer buffer_copy(kErrorMessageBufferSize); Modified: vendor/compiler-rt/dist/lib/asan/asan_rtl.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_rtl.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/asan/asan_rtl.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -46,6 +46,7 @@ static void AsanDie() { // Don't die twice - run a busy loop. while (1) { } } + if (common_flags()->print_module_map >= 1) PrintModuleMap(); if (flags()->sleep_before_dying) { Report("Sleeping for %d second(s)\n", flags()->sleep_before_dying); SleepForSeconds(flags()->sleep_before_dying); Modified: vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py ============================================================================== --- vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py Mon Jan 9 21:23:31 2017 (r311822) @@ -24,6 +24,7 @@ binary_name_filter = None fix_filename_patterns = None logfile = sys.stdin allow_system_symbolizer = True +force_system_symbolizer = False # FIXME: merge the code that calls fix_filename(). def fix_filename(file_name): @@ -37,6 +38,10 @@ def fix_filename(file_name): def sysroot_path_filter(binary_name): return sysroot_path + binary_name +def is_valid_arch(s): + return s in ["i386", "x86_64", "x86_64h", "arm", "armv6", "armv7", "armv7s", + "armv7k", "arm64", "powerpc64", "powerpc64le", "s390x", "s390"] + def guess_arch(addr): # Guess which arch we're running. 10 = len('0x') + 8 hex digits. if len(addr) > 10: @@ -206,10 +211,10 @@ class UnbufferedLineConverter(object): class DarwinSymbolizer(Symbolizer): - def __init__(self, addr, binary): + def __init__(self, addr, binary, arch): super(DarwinSymbolizer, self).__init__() self.binary = binary - self.arch = guess_arch(addr) + self.arch = arch self.open_atos() def open_atos(self): @@ -268,9 +273,9 @@ def BreakpadSymbolizerFactory(binary): return None -def SystemSymbolizerFactory(system, addr, binary): +def SystemSymbolizerFactory(system, addr, binary, arch): if system == 'Darwin': - return DarwinSymbolizer(addr, binary) + return DarwinSymbolizer(addr, binary, arch) elif system == 'Linux' or system == 'FreeBSD': return Addr2LineSymbolizer(binary) @@ -369,7 +374,7 @@ class SymbolizationLoop(object): self.frame_no = 0 self.process_line = self.process_line_posix - def symbolize_address(self, addr, binary, offset): + def symbolize_address(self, addr, binary, offset, arch): # On non-Darwin (i.e. on platforms without .dSYM debug info) always use # a single symbolizer binary. # On Darwin, if the dsym hint producer is present: @@ -381,31 +386,35 @@ class SymbolizationLoop(object): # if so, reuse |last_llvm_symbolizer| which has the full set of hints; # 3. otherwise create a new symbolizer and pass all currently known # .dSYM hints to it. - if not binary in self.llvm_symbolizers: - use_new_symbolizer = True - if self.system == 'Darwin' and self.dsym_hint_producer: - dsym_hints_for_binary = set(self.dsym_hint_producer(binary)) - use_new_symbolizer = bool(dsym_hints_for_binary - self.dsym_hints) - self.dsym_hints |= dsym_hints_for_binary - if self.last_llvm_symbolizer and not use_new_symbolizer: + result = None + if not force_system_symbolizer: + if not binary in self.llvm_symbolizers: + use_new_symbolizer = True + if self.system == 'Darwin' and self.dsym_hint_producer: + dsym_hints_for_binary = set(self.dsym_hint_producer(binary)) + use_new_symbolizer = bool(dsym_hints_for_binary - self.dsym_hints) + self.dsym_hints |= dsym_hints_for_binary + if self.last_llvm_symbolizer and not use_new_symbolizer: + self.llvm_symbolizers[binary] = self.last_llvm_symbolizer + else: + self.last_llvm_symbolizer = LLVMSymbolizerFactory( + self.system, arch, self.dsym_hints) self.llvm_symbolizers[binary] = self.last_llvm_symbolizer - else: - self.last_llvm_symbolizer = LLVMSymbolizerFactory( - self.system, guess_arch(addr), self.dsym_hints) - self.llvm_symbolizers[binary] = self.last_llvm_symbolizer - # Use the chain of symbolizers: - # Breakpad symbolizer -> LLVM symbolizer -> addr2line/atos - # (fall back to next symbolizer if the previous one fails). - if not binary in symbolizers: - symbolizers[binary] = ChainSymbolizer( - [BreakpadSymbolizerFactory(binary), self.llvm_symbolizers[binary]]) - result = symbolizers[binary].symbolize(addr, binary, offset) + # Use the chain of symbolizers: + # Breakpad symbolizer -> LLVM symbolizer -> addr2line/atos + # (fall back to next symbolizer if the previous one fails). + if not binary in symbolizers: + symbolizers[binary] = ChainSymbolizer( + [BreakpadSymbolizerFactory(binary), self.llvm_symbolizers[binary]]) + result = symbolizers[binary].symbolize(addr, binary, offset) + else: + symbolizers[binary] = ChainSymbolizer([]) if result is None: if not allow_system_symbolizer: raise Exception('Failed to launch or use llvm-symbolizer.') # Initialize system symbolizer only if other symbolizers failed. symbolizers[binary].append_symbolizer( - SystemSymbolizerFactory(self.system, addr, binary)) + SystemSymbolizerFactory(self.system, addr, binary, arch)) result = symbolizers[binary].symbolize(addr, binary, offset) # The system symbolizer must produce some result. assert result @@ -441,16 +450,26 @@ class SymbolizationLoop(object): if DEBUG: print line _, frameno_str, addr, binary, offset = match.groups() + arch = "" + # Arch can be embedded in the filename, e.g.: "libabc.dylib:x86_64h" + colon_pos = binary.rfind(":") + if colon_pos != -1: + maybe_arch = binary[colon_pos+1:] + if is_valid_arch(maybe_arch): + arch = maybe_arch + binary = binary[0:colon_pos] + if arch == "": + arch = guess_arch(addr) if frameno_str == '0': # Assume that frame #0 is the first frame of new stack trace. self.frame_no = 0 original_binary = binary if self.binary_name_filter: binary = self.binary_name_filter(binary) - symbolized_line = self.symbolize_address(addr, binary, offset) + symbolized_line = self.symbolize_address(addr, binary, offset, arch) if not symbolized_line: if original_binary != binary: - symbolized_line = self.symbolize_address(addr, binary, offset) + symbolized_line = self.symbolize_address(addr, binary, offset, arch) return self.get_symbolized_lines(symbolized_line) @@ -472,6 +491,8 @@ if __name__ == '__main__': parser.add_argument('-l','--logfile', default=sys.stdin, type=argparse.FileType('r'), help='set log file name to parse, default is stdin') + parser.add_argument('--force-system-symbolizer', action='store_true', + help='don\'t use llvm-symbolizer') args = parser.parse_args() if args.path_to_cut: fix_filename_patterns = args.path_to_cut @@ -486,5 +507,9 @@ if __name__ == '__main__': logfile = args.logfile else: logfile = sys.stdin + if args.force_system_symbolizer: + force_system_symbolizer = True + if force_system_symbolizer: + assert(allow_system_symbolizer) loop = SymbolizationLoop(binary_name_filter) loop.process_logfile() Modified: vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt Mon Jan 9 21:23:31 2017 (r311822) @@ -59,6 +59,11 @@ list(APPEND ASAN_UNITTEST_COMMON_CFLAGS if(APPLE) list(APPEND ASAN_UNITTEST_COMMON_CFLAGS ${DARWIN_osx_CFLAGS}) list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS ${DARWIN_osx_LINKFLAGS}) + + add_weak_symbols("asan" WEAK_SYMBOL_LINKFLAGS) + add_weak_symbols("ubsan" WEAK_SYMBOL_LINKFLAGS) + add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINKFLAGS) + list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS ${WEAK_SYMBOL_LINKFLAGS}) endif() if(MSVC) Added: vendor/compiler-rt/dist/lib/asan/weak_symbols.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/asan/weak_symbols.txt Mon Jan 9 21:23:31 2017 (r311822) @@ -0,0 +1,3 @@ +___asan_default_options +___asan_default_suppressions +___asan_on_error Modified: vendor/compiler-rt/dist/lib/builtins/arm/aeabi_fcmp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/aeabi_fcmp.S Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/builtins/arm/aeabi_fcmp.S Mon Jan 9 21:23:31 2017 (r311822) @@ -26,10 +26,10 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmp bl SYMBOL_NAME(__ ## cond ## sf2) SEPARATOR \ cmp r0, #0 SEPARATOR \ b ## cond 1f SEPARATOR \ - mov r0, #0 SEPARATOR \ + movs r0, #0 SEPARATOR \ pop { r4, pc } SEPARATOR \ 1: SEPARATOR \ - mov r0, #1 SEPARATOR \ + movs r0, #1 SEPARATOR \ pop { r4, pc } SEPARATOR \ END_COMPILERRT_FUNCTION(__aeabi_fcmp ## cond) Modified: vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S Mon Jan 9 21:23:31 2017 (r311822) @@ -47,27 +47,50 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2) // Make copies of a and b with the sign bit shifted off the top. These will // be used to detect zeros and NaNs. +#if __ARM_ARCH_ISA_THUMB == 1 + push {r6, lr} + lsls r2, r0, #1 + lsls r3, r1, #1 +#else mov r2, r0, lsl #1 mov r3, r1, lsl #1 +#endif // We do the comparison in three stages (ignoring NaN values for the time // being). First, we orr the absolute values of a and b; this sets the Z // flag if both a and b are zero (of either sign). The shift of r3 doesn't // effect this at all, but it *does* make sure that the C flag is clear for // the subsequent operations. +#if __ARM_ARCH_ISA_THUMB == 1 + lsrs r6, r3, #1 + orrs r6, r2, r6 +#else orrs r12, r2, r3, lsr #1 - +#endif // Next, we check if a and b have the same or different signs. If they have // opposite signs, this eor will set the N flag. +#if __ARM_ARCH_ISA_THUMB == 1 + beq 1f + movs r6, r0 + eors r6, r1 +1: +#else it ne eorsne r12, r0, r1 +#endif // If a and b are equal (either both zeros or bit identical; again, we're // ignoring NaNs for now), this subtract will zero out r0. If they have the // same sign, the flags are updated as they would be for a comparison of the // absolute values of a and b. +#if __ARM_ARCH_ISA_THUMB == 1 + bmi 1f + subs r0, r2, r3 +1: +#else it pl subspl r0, r2, r3 +#endif // If a is smaller in magnitude than b and both have the same sign, place // the negation of the sign of b in r0. Thus, if both are negative and @@ -79,30 +102,69 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2) // still clear from the shift argument in orrs; if a is positive and b // negative, this places 0 in r0; if a is negative and b positive, -1 is // placed in r0. +#if __ARM_ARCH_ISA_THUMB == 1 + bhs 1f + // Here if a and b have the same sign and absA < absB, the result is thus + // b < 0 ? 1 : -1. Same if a and b have the opposite sign (ignoring Nan). + movs r0, #1 + lsrs r1, #31 + bne LOCAL_LABEL(CHECK_NAN) + negs r0, r0 + b LOCAL_LABEL(CHECK_NAN) +1: +#else it lo mvnlo r0, r1, asr #31 +#endif // If a is greater in magnitude than b and both have the same sign, place // the sign of b in r0. Thus, if both are negative and a < b, -1 is placed // in r0, which is the desired result. Conversely, if both are positive // and a > b, zero is placed in r0. +#if __ARM_ARCH_ISA_THUMB == 1 + bls 1f + // Here both have the same sign and absA > absB. + movs r0, #1 + lsrs r1, #31 + beq LOCAL_LABEL(CHECK_NAN) + negs r0, r0 +1: +#else it hi movhi r0, r1, asr #31 +#endif // If you've been keeping track, at this point r0 contains -1 if a < b and // 0 if a >= b. All that remains to be done is to set it to 1 if a > b. // If a == b, then the Z flag is set, so we can get the correct final value // into r0 by simply or'ing with 1 if Z is clear. + // For Thumb-1, r0 contains -1 if a < b, 0 if a > b and 0 if a == b. +#if __ARM_ARCH_ISA_THUMB != 1 it ne orrne r0, r0, #1 +#endif // Finally, we need to deal with NaNs. If either argument is NaN, replace // the value in r0 with 1. +#if __ARM_ARCH_ISA_THUMB == 1 +LOCAL_LABEL(CHECK_NAN): + movs r6, #0xff + lsls r6, #24 + cmp r2, r6 + bhi 1f + cmp r3, r6 +1: + bls 2f + movs r0, #1 +2: + pop {r6, pc} +#else cmp r2, #0xff000000 ite ls cmpls r3, #0xff000000 movhi r0, #1 JMP(lr) +#endif END_COMPILERRT_FUNCTION(__eqsf2) DEFINE_COMPILERRT_FUNCTION_ALIAS(__lesf2, __eqsf2) DEFINE_COMPILERRT_FUNCTION_ALIAS(__ltsf2, __eqsf2) @@ -111,11 +173,48 @@ DEFINE_COMPILERRT_FUNCTION_ALIAS(__nesf2 .p2align 2 DEFINE_COMPILERRT_FUNCTION(__gtsf2) // Identical to the preceding except in that we return -1 for NaN values. - // Given that the two paths share so much code, one might be tempted to + // Given that the two paths share so much code, one might be tempted to // unify them; however, the extra code needed to do so makes the code size // to performance tradeoff very hard to justify for such small functions. - mov r2, r0, lsl #1 - mov r3, r1, lsl #1 +#if __ARM_ARCH_ISA_THUMB == 1 + push {r6, lr} + lsls r2, r0, #1 + lsls r3, r1, #1 + lsrs r6, r3, #1 + orrs r6, r2, r6 + beq 1f + movs r6, r0 + eors r6, r1 +1: + bmi 2f + subs r0, r2, r3 +2: + bhs 3f + movs r0, #1 + lsrs r1, #31 + bne LOCAL_LABEL(CHECK_NAN_2) + negs r0, r0 + b LOCAL_LABEL(CHECK_NAN_2) +3: + bls 4f + movs r0, #1 + lsrs r1, #31 + beq LOCAL_LABEL(CHECK_NAN_2) + negs r0, r0 +4: +LOCAL_LABEL(CHECK_NAN_2): + movs r6, #0xff + lsls r6, #24 + cmp r2, r6 + bhi 5f + cmp r3, r6 +5: + bls 6f + movs r0, #1 + negs r0, r0 +6: + pop {r6, pc} +#else orrs r12, r2, r3, lsr #1 it ne eorsne r12, r0, r1 @@ -132,19 +231,32 @@ DEFINE_COMPILERRT_FUNCTION(__gtsf2) cmpls r3, #0xff000000 movhi r0, #-1 JMP(lr) +#endif END_COMPILERRT_FUNCTION(__gtsf2) DEFINE_COMPILERRT_FUNCTION_ALIAS(__gesf2, __gtsf2) .p2align 2 DEFINE_COMPILERRT_FUNCTION(__unordsf2) // Return 1 for NaN values, 0 otherwise. - mov r2, r0, lsl #1 - mov r3, r1, lsl #1 - mov r0, #0 + lsls r2, r0, #1 + lsls r3, r1, #1 + movs r0, #0 +#if __ARM_ARCH_ISA_THUMB == 1 + movs r1, #0xff + lsls r1, #24 + cmp r2, r1 + bhi 1f + cmp r3, r1 +1: + bls 2f + movs r0, #1 +2: +#else cmp r2, #0xff000000 ite ls cmpls r3, #0xff000000 movhi r0, #1 +#endif JMP(lr) END_COMPILERRT_FUNCTION(__unordsf2) Modified: vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt Mon Jan 9 21:23:31 2017 (r311822) @@ -23,9 +23,8 @@ add_compiler_rt_object_libraries(RTLSanC CFLAGS ${LSAN_CFLAGS}) if(COMPILER_RT_HAS_LSAN) + add_compiler_rt_component(lsan) foreach(arch ${LSAN_SUPPORTED_ARCH}) - add_compiler_rt_component(lsan) - add_compiler_rt_runtime(clang_rt.lsan STATIC ARCHS ${arch} Modified: vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/lsan/lsan_allocator.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -258,4 +258,17 @@ SANITIZER_INTERFACE_ATTRIBUTE uptr __sanitizer_get_allocated_size(const void *p) { return GetMallocUsableSize(p); } + +#if !SANITIZER_SUPPORTS_WEAK_HOOKS +// Provide default (no-op) implementation of malloc hooks. +SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE +void __sanitizer_malloc_hook(void *ptr, uptr size) { + (void)ptr; + (void)size; +} +SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE +void __sanitizer_free_hook(void *ptr) { + (void)ptr; +} +#endif } // extern "C" Modified: vendor/compiler-rt/dist/lib/lsan/lsan_common.cc ============================================================================== --- vendor/compiler-rt/dist/lib/lsan/lsan_common.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/lsan/lsan_common.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -758,5 +758,10 @@ SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_ int __lsan_is_turned_off() { return 0; } + +SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE +const char *__lsan_default_suppressions() { + return ""; +} #endif } // extern "C" Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -270,6 +270,8 @@ void LoadedModule::set(const char *modul void LoadedModule::clear() { InternalFree(full_name_); + base_address_ = 0; + max_executable_address_ = 0; full_name_ = nullptr; arch_ = kModuleArchUnknown; internal_memset(uuid_, 0, kModuleUUIDSize); @@ -285,6 +287,8 @@ void LoadedModule::addAddressRange(uptr void *mem = InternalAlloc(sizeof(AddressRange)); AddressRange *r = new(mem) AddressRange(beg, end, executable); ranges_.push_back(r); + if (executable && end > max_executable_address_) + max_executable_address_ = end; } bool LoadedModule::containsAddress(uptr address) const { Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h Mon Jan 9 21:23:31 2017 (r311822) @@ -283,6 +283,7 @@ void UpdateProcessName(); void CacheBinaryName(); void DisableCoreDumperIfNecessary(); void DumpProcessMap(); +void PrintModuleMap(); bool FileExists(const char *filename); const char *GetEnv(const char *name); bool SetEnv(const char *name, const char *value); @@ -665,6 +666,32 @@ enum ModuleArch { kModuleArchARM64 }; +// When adding a new architecture, don't forget to also update +// script/asan_symbolize.py and sanitizer_symbolizer_libcdep.cc. +inline const char *ModuleArchToString(ModuleArch arch) { + switch (arch) { + case kModuleArchUnknown: + return ""; + case kModuleArchI386: + return "i386"; + case kModuleArchX86_64: + return "x86_64"; + case kModuleArchX86_64H: + return "x86_64h"; + case kModuleArchARMV6: + return "armv6"; + case kModuleArchARMV7: + return "armv7"; + case kModuleArchARMV7S: + return "armv7s"; + case kModuleArchARMV7K: + return "armv7k"; + case kModuleArchARM64: + return "arm64"; + } + CHECK(0 && "Invalid module arch"); +} + const uptr kModuleUUIDSize = 16; // Represents a binary loaded into virtual memory (e.g. this can be an @@ -674,6 +701,7 @@ class LoadedModule { LoadedModule() : full_name_(nullptr), base_address_(0), + max_executable_address_(0), arch_(kModuleArchUnknown), instrumented_(false) { internal_memset(uuid_, 0, kModuleUUIDSize); @@ -688,6 +716,7 @@ class LoadedModule { const char *full_name() const { return full_name_; } uptr base_address() const { return base_address_; } + uptr max_executable_address() const { return max_executable_address_; } ModuleArch arch() const { return arch_; } const u8 *uuid() const { return uuid_; } bool instrumented() const { return instrumented_; } @@ -707,6 +736,7 @@ class LoadedModule { private: char *full_name_; // Owned. uptr base_address_; + uptr max_executable_address_; ModuleArch arch_; u8 uuid_[kModuleUUIDSize]; bool instrumented_; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc Mon Jan 9 21:23:31 2017 (r311822) @@ -74,6 +74,9 @@ COMMON_FLAG(bool, allocator_may_return_n COMMON_FLAG(bool, print_summary, true, "If false, disable printing error summaries in addition to error " "reports.") +COMMON_FLAG(int, print_module_map, 0, + "OS X only. 0 = don't print, 1 = print only once before process " + "exits, 2 = print after each report.") COMMON_FLAG(bool, check_printf, true, "Check printf arguments.") COMMON_FLAG(bool, handle_segv, true, "If set, registers the tool's custom SIGSEGV/SIGBUS handler.") Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h Mon Jan 9 21:23:31 2017 (r311822) @@ -32,7 +32,7 @@ # define SANITIZER_WEAK_ATTRIBUTE __attribute__((weak)) #endif -#if (SANITIZER_LINUX || SANITIZER_WINDOWS) && !SANITIZER_GO +#if (SANITIZER_LINUX || SANITIZER_MAC || SANITIZER_WINDOWS) && !SANITIZER_GO # define SANITIZER_SUPPORTS_WEAK_HOOKS 1 #else # define SANITIZER_SUPPORTS_WEAK_HOOKS 0 Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -1393,6 +1393,8 @@ void MaybeReexec() { // No need to re-exec on Linux. } +void PrintModuleMap() { } + uptr FindAvailableMemoryRange(uptr size, uptr alignment, uptr left_padding) { UNREACHABLE("FindAvailableMemoryRange is not available"); return 0; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -26,10 +26,7 @@ #include "sanitizer_procmaps.h" #include "sanitizer_stacktrace.h" -#if SANITIZER_ANDROID || SANITIZER_FREEBSD #include // for dlsym() -#endif - #include #include #include Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -854,6 +854,36 @@ void SignalContext::DumpAllRegisters(voi # undef DUMPREG } +static inline bool CompareBaseAddress(const LoadedModule &a, + const LoadedModule &b) { + return a.base_address() < b.base_address(); +} + +void FormatUUID(char *out, uptr size, const u8 *uuid) { + internal_snprintf(out, size, + "<%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-" + "%02X%02X%02X%02X%02X%02X>", + uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5], + uuid[6], uuid[7], uuid[8], uuid[9], uuid[10], uuid[11], + uuid[12], uuid[13], uuid[14], uuid[15]); +} + +void PrintModuleMap() { + Printf("Process module map:\n"); + MemoryMappingLayout memory_mapping(false); + InternalMmapVector modules(/*initial_capacity*/ 128); + memory_mapping.DumpListOfModules(&modules); + InternalSort(&modules, modules.size(), CompareBaseAddress); + for (uptr i = 0; i < modules.size(); ++i) { + char uuid_str[128]; + FormatUUID(uuid_str, sizeof(uuid_str), modules[i].uuid()); + Printf("0x%zx-0x%zx %s (%s) %s\n", modules[i].base_address(), + modules[i].max_executable_address(), modules[i].full_name(), + ModuleArchToString(modules[i].arch()), uuid_str); + } + Printf("End of module map.\n"); +} + } // namespace __sanitizer #endif // SANITIZER_MAC Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -43,7 +43,7 @@ static int AppendChar(char **buff, const // on the value of |pad_with_zero|. static int AppendNumber(char **buff, const char *buff_end, u64 absolute_value, u8 base, u8 minimal_num_length, bool pad_with_zero, - bool negative) { + bool negative, bool uppercase) { uptr const kMaxLen = 30; RAW_CHECK(base == 10 || base == 16); RAW_CHECK(base == 10 || !negative); @@ -76,23 +76,25 @@ static int AppendNumber(char **buff, con if (negative && !pad_with_zero) result += AppendChar(buff, buff_end, '-'); for (; pos >= 0; pos--) { char digit = static_cast(num_buffer[pos]); - result += AppendChar(buff, buff_end, (digit < 10) ? '0' + digit - : 'a' + digit - 10); + digit = (digit < 10) ? '0' + digit : (uppercase ? 'A' : 'a') + digit - 10; + result += AppendChar(buff, buff_end, digit); } return result; } static int AppendUnsigned(char **buff, const char *buff_end, u64 num, u8 base, - u8 minimal_num_length, bool pad_with_zero) { + u8 minimal_num_length, bool pad_with_zero, + bool uppercase) { return AppendNumber(buff, buff_end, num, base, minimal_num_length, - pad_with_zero, false /* negative */); + pad_with_zero, false /* negative */, uppercase); } static int AppendSignedDecimal(char **buff, const char *buff_end, s64 num, u8 minimal_num_length, bool pad_with_zero) { bool negative = (num < 0); return AppendNumber(buff, buff_end, (u64)(negative ? -num : num), 10, - minimal_num_length, pad_with_zero, negative); + minimal_num_length, pad_with_zero, negative, + false /* uppercase */); } static int AppendString(char **buff, const char *buff_end, int precision, @@ -112,14 +114,16 @@ static int AppendPointer(char **buff, co int result = 0; result += AppendString(buff, buff_end, -1, "0x"); result += AppendUnsigned(buff, buff_end, ptr_value, 16, - SANITIZER_POINTER_FORMAT_LENGTH, true); + SANITIZER_POINTER_FORMAT_LENGTH, + true /* pad_with_zero */, false /* uppercase */); return result; } int VSNPrintf(char *buff, int buff_length, const char *format, va_list args) { static const char *kPrintfFormatsHelp = - "Supported Printf formats: %([0-9]*)?(z|ll)?{d,u,x}; %p; %(\\.\\*)?s; %c\n"; + "Supported Printf formats: %([0-9]*)?(z|ll)?{d,u,x,X}; %p; %(\\.\\*)?s; " + "%c\n"; RAW_CHECK(format); RAW_CHECK(buff_length > 0); const char *buff_end = &buff[buff_length - 1]; @@ -164,12 +168,14 @@ int VSNPrintf(char *buff, int buff_lengt break; } case 'u': - case 'x': { + case 'x': + case 'X': { uval = have_ll ? va_arg(args, u64) : have_z ? va_arg(args, uptr) : va_arg(args, unsigned); - result += AppendUnsigned(&buff, buff_end, uval, - (*cur == 'u') ? 10 : 16, width, pad_with_zero); + bool uppercase = (*cur == 'X'); + result += AppendUnsigned(&buff, buff_end, uval, (*cur == 'u') ? 10 : 16, + width, pad_with_zero, uppercase); break; } case 'p': { Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -93,7 +93,7 @@ void RenderFrame(InternalScopedString *b vs_style, strip_path_prefix); } else if (info.module) { RenderModuleLocation(buffer, info.module, info.module_offset, - strip_path_prefix); + info.module_arch, strip_path_prefix); } else { buffer->append("()"); } @@ -103,8 +103,9 @@ void RenderFrame(InternalScopedString *b if (info.address & kExternalPCBit) {} // There PCs are not meaningful. else if (info.module) - buffer->append("(%s+%p)", StripModuleName(info.module), - (void *)info.module_offset); + // Always strip the module name for %M. + RenderModuleLocation(buffer, StripModuleName(info.module), + info.module_offset, info.module_arch, ""); else buffer->append("(%p)", (void *)info.address); break; @@ -165,9 +166,13 @@ void RenderSourceLocation(InternalScoped } void RenderModuleLocation(InternalScopedString *buffer, const char *module, - uptr offset, const char *strip_path_prefix) { - buffer->append("(%s+0x%zx)", StripPathPrefix(module, strip_path_prefix), - offset); + uptr offset, ModuleArch arch, + const char *strip_path_prefix) { + buffer->append("(%s", StripPathPrefix(module, strip_path_prefix)); + if (arch != kModuleArchUnknown) { + buffer->append(":%s", ModuleArchToString(arch)); + } + buffer->append("+0x%zx)", offset); } } // namespace __sanitizer Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.h Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.h Mon Jan 9 21:23:31 2017 (r311822) @@ -57,7 +57,8 @@ void RenderSourceLocation(InternalScoped const char *strip_path_prefix); void RenderModuleLocation(InternalScopedString *buffer, const char *module, - uptr offset, const char *strip_path_prefix); + uptr offset, ModuleArch arch, + const char *strip_path_prefix); // Same as RenderFrame, but for data section (global variables). // Accepts %s, %l from above. Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -33,9 +33,11 @@ void AddressInfo::Clear() { function_offset = kUnknown; } -void AddressInfo::FillModuleInfo(const char *mod_name, uptr mod_offset) { +void AddressInfo::FillModuleInfo(const char *mod_name, uptr mod_offset, + ModuleArch mod_arch) { module = internal_strdup(mod_name); module_offset = mod_offset; + module_arch = mod_arch; } SymbolizedStack::SymbolizedStack() : next(nullptr), info() {} Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.h Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.h Mon Jan 9 21:23:31 2017 (r311822) @@ -31,6 +31,7 @@ struct AddressInfo { char *module; uptr module_offset; + ModuleArch module_arch; static const uptr kUnknown = ~(uptr)0; char *function; @@ -43,7 +44,7 @@ struct AddressInfo { AddressInfo(); // Deletes all strings and resets all fields. void Clear(); - void FillModuleInfo(const char *mod_name, uptr mod_offset); + void FillModuleInfo(const char *mod_name, uptr mod_offset, ModuleArch arch); }; // Linked list of symbolized frames (each frame is described by AddressInfo). @@ -65,6 +66,8 @@ struct DataInfo { // (de)allocated using sanitizer internal allocator. char *module; uptr module_offset; + ModuleArch module_arch; + char *file; uptr line; char *name; @@ -143,7 +146,8 @@ class Symbolizer final { static Symbolizer *PlatformInit(); bool FindModuleNameAndOffsetForAddress(uptr address, const char **module_name, - uptr *module_offset); + uptr *module_offset, + ModuleArch *module_arch); ListOfModules modules_; // If stale, need to reload the modules before looking up addresses. bool modules_fresh_; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_internal.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_internal.h Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_internal.h Mon Jan 9 21:23:31 2017 (r311822) @@ -124,8 +124,8 @@ class LLVMSymbolizer : public Symbolizer bool SymbolizeData(uptr addr, DataInfo *info) override; private: - const char *SendCommand(bool is_data, const char *module_name, - uptr module_offset); + const char *FormatAndSendCommand(bool is_data, const char *module_name, + uptr module_offset, ModuleArch arch); LLVMSymbolizerProcess *symbolizer_process_; static const uptr kBufferSize = 16 * 1024; Modified: vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc Mon Jan 9 21:23:28 2017 (r311821) +++ vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc Mon Jan 9 21:23:31 2017 (r311822) @@ -64,11 +64,13 @@ SymbolizedStack *Symbolizer::SymbolizePC BlockingMutexLock l(&mu_); const char *module_name; uptr module_offset; + ModuleArch arch; SymbolizedStack *res = SymbolizedStack::New(addr); - if (!FindModuleNameAndOffsetForAddress(addr, &module_name, &module_offset)) + if (!FindModuleNameAndOffsetForAddress(addr, &module_name, &module_offset, + &arch)) return res; // Always fill data about module name and offset. - res->info.FillModuleInfo(module_name, module_offset); + res->info.FillModuleInfo(module_name, module_offset, arch); for (auto &tool : tools_) { SymbolizerScope sym_scope(this); if (tool.SymbolizePC(addr, res)) { @@ -82,11 +84,14 @@ bool Symbolizer::SymbolizeData(uptr addr BlockingMutexLock l(&mu_); const char *module_name; uptr module_offset; - if (!FindModuleNameAndOffsetForAddress(addr, &module_name, &module_offset)) + ModuleArch arch; + if (!FindModuleNameAndOffsetForAddress(addr, &module_name, &module_offset, + &arch)) return false; info->Clear(); info->module = internal_strdup(module_name); info->module_offset = module_offset; + info->module_arch = arch; for (auto &tool : tools_) { SymbolizerScope sym_scope(this); if (tool.SymbolizeData(addr, info)) { @@ -100,8 +105,9 @@ bool Symbolizer::GetModuleNameAndOffsetF uptr *module_address) { BlockingMutexLock l(&mu_); const char *internal_module_name = nullptr; + ModuleArch arch; if (!FindModuleNameAndOffsetForAddress(pc, &internal_module_name, - module_address)) + module_address, &arch)) return false; if (module_name) @@ -134,12 +140,14 @@ void Symbolizer::PrepareForSandboxing() bool Symbolizer::FindModuleNameAndOffsetForAddress(uptr address, const char **module_name, - uptr *module_offset) { + uptr *module_offset, + ModuleArch *module_arch) { const LoadedModule *module = FindModuleForAddress(address); if (module == nullptr) return false; *module_name = module->full_name(); *module_offset = address - module->base_address(); + *module_arch = module->arch(); return true; } @@ -197,6 +205,8 @@ class LLVMSymbolizerProcess : public Sym buffer[length - 2] == '\n'; } + // When adding a new architecture, don't forget to also update + // script/asan_symbolize.py and sanitizer_common.h. void GetArgV(const char *path_to_binary, const char *(&argv)[kArgVMax]) const override { #if defined(__x86_64h__) @@ -284,7 +294,8 @@ void ParseSymbolizePCOutput(const char * top_frame = false; } else { cur = SymbolizedStack::New(res->info.address); - cur->info.FillModuleInfo(res->info.module, res->info.module_offset); + cur->info.FillModuleInfo(res->info.module, res->info.module_offset, + res->info.module_arch); last->next = cur; last = cur; } @@ -317,8 +328,10 @@ void ParseSymbolizeDataOutput(const char } bool LLVMSymbolizer::SymbolizePC(uptr addr, SymbolizedStack *stack) { - if (const char *buf = SendCommand(/*is_data*/ false, stack->info.module, - stack->info.module_offset)) { + AddressInfo *info = &stack->info; + const char *buf = FormatAndSendCommand( + /*is_data*/ false, info->module, info->module_offset, info->module_arch); + if (buf) { ParseSymbolizePCOutput(buf, stack); return true; } @@ -326,8 +339,9 @@ bool LLVMSymbolizer::SymbolizePC(uptr ad } bool LLVMSymbolizer::SymbolizeData(uptr addr, DataInfo *info) { - if (const char *buf = - SendCommand(/*is_data*/ true, info->module, info->module_offset)) { + const char *buf = FormatAndSendCommand( + /*is_data*/ true, info->module, info->module_offset, info->module_arch); + if (buf) { ParseSymbolizeDataOutput(buf, info); info->start += (addr - info->module_offset); // Add the base address. return true; @@ -335,11 +349,19 @@ bool LLVMSymbolizer::SymbolizeData(uptr return false; } -const char *LLVMSymbolizer::SendCommand(bool is_data, const char *module_name, - uptr module_offset) { +const char *LLVMSymbolizer::FormatAndSendCommand(bool is_data, + const char *module_name, + uptr module_offset, + ModuleArch arch) { CHECK(module_name); - internal_snprintf(buffer_, kBufferSize, "%s\"%s\" 0x%zx\n", *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:47 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9CFFCA819C; Mon, 9 Jan 2017 21:23:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F07D1520; Mon, 9 Jan 2017 21:23:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNk55095889; Mon, 9 Jan 2017 21:23:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNkSv095888; Mon, 9 Jan 2017 21:23:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNkSv095888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311825 - vendor/libc++/libc++-trunk-r291476 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:47 -0000 Author: dim Date: Mon Jan 9 21:23:46 2017 New Revision: 311825 URL: https://svnweb.freebsd.org/changeset/base/311825 Log: Tag libc++ trunk r291476. Added: vendor/libc++/libc++-trunk-r291476/ - copied from r311824, vendor/libc++/dist/ From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:59 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65DC3CA8250; Mon, 9 Jan 2017 21:23:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C8E816A8; Mon, 9 Jan 2017 21:23:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNwMH096059; Mon, 9 Jan 2017 21:23:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNvnT096053; Mon, 9 Jan 2017 21:23:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNvnT096053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311828 - in vendor/lldb/dist: packages/Python/lldbsuite/test/python_api/value/empty_class scripts source/Plugins/SymbolFile/DWARF source/Symbol X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:59 -0000 Author: dim Date: Mon Jan 9 21:23:57 2017 New Revision: 311828 URL: https://svnweb.freebsd.org/changeset/base/311828 Log: Vendor import of lldb trunk r291476: https://llvm.org/svn/llvm-project/lldb/trunk@291476 Added: vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/ vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py (contents, props changed) vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/main.cpp (contents, props changed) Modified: vendor/lldb/dist/scripts/CMakeLists.txt vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp vendor/lldb/dist/source/Symbol/ClangASTContext.cpp Added: vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile Mon Jan 9 21:23:57 2017 (r311828) @@ -0,0 +1,5 @@ +LEVEL = ../../../make + +CXX_SOURCES := main.cpp + +include $(LEVEL)/Makefile.rules Added: vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py Mon Jan 9 21:23:57 2017 (r311828) @@ -0,0 +1,60 @@ +from __future__ import print_function + +import os +import time +import re +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +class ValueAPIEmptyClassTestCase(TestBase): + + mydir = TestBase.compute_mydir(__file__) + + @add_test_categories(['pyapi']) + def test(self): + self.build() + exe = os.path.join(os.getcwd(), 'a.out') + line = line_number('main.cpp', '// Break at this line') + + # Create a target by the debugger. + target = self.dbg.CreateTarget(exe) + self.assertTrue(target, VALID_TARGET) + + # Create the breakpoint inside function 'main'. + breakpoint = target.BreakpointCreateByLocation('main.cpp', line) + self.assertTrue(breakpoint, VALID_BREAKPOINT) + + # Now launch the process, and do not stop at entry point. + process = target.LaunchSimple( + None, None, self.get_process_working_directory()) + self.assertTrue(process, PROCESS_IS_VALID) + + # Get Frame #0. + self.assertTrue(process.GetState() == lldb.eStateStopped) + thread = lldbutil.get_stopped_thread( + process, lldb.eStopReasonBreakpoint) + self.assertTrue( + thread.IsValid(), + "There should be a thread stopped due to breakpoint condition") + frame0 = thread.GetFrameAtIndex(0) + + # Verify that we can access to a frame variable with an empty class type + e = frame0.FindVariable('e') + self.assertTrue(e.IsValid(), VALID_VARIABLE) + self.DebugSBValue(e) + self.assertEqual(e.GetNumChildren(), 0) + + # Verify that we can acces to a frame variable what is a pointer to an + # empty class + ep = frame0.FindVariable('ep') + self.assertTrue(ep.IsValid(), VALID_VARIABLE) + self.DebugSBValue(ep) + + # Verify that we can dereference a pointer to an empty class + epd = ep.Dereference() + self.assertTrue(epd.IsValid(), VALID_VARIABLE) + self.DebugSBValue(epd) + self.assertEqual(epd.GetNumChildren(), 0) + Added: vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/main.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/python_api/value/empty_class/main.cpp Mon Jan 9 21:23:57 2017 (r311828) @@ -0,0 +1,16 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +class Empty {}; + +int main (int argc, char const *argv[]) { + Empty e; + Empty* ep = new Empty; + return 0; // Break at this line +} Modified: vendor/lldb/dist/scripts/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/scripts/CMakeLists.txt Mon Jan 9 21:23:54 2017 (r311827) +++ vendor/lldb/dist/scripts/CMakeLists.txt Mon Jan 9 21:23:57 2017 (r311828) @@ -11,8 +11,13 @@ set(SWIG_HEADERS include(FindPythonInterp) -set(SWIG_PYTHON_DIR - ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) +if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + set(SWIG_PYTHON_DIR + ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) +else() + set(SWIG_PYTHON_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/site-packages) +endif() + set(SWIG_INSTALL_DIR lib${LLVM_LIBDIR_SUFFIX}) # Generating the LLDB framework correctly is a bit complicated because the @@ -48,10 +53,8 @@ set_source_files_properties(${CMAKE_CURR add_custom_target(swig_wrapper ALL DEPENDS ${LLDB_WRAP_PYTHON}) -# Install the LLDB python module on all operating systems (except Windows) -if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") - install(DIRECTORY ${SWIG_PYTHON_DIR} DESTINATION ${SWIG_INSTALL_DIR}) -endif() +# Install the LLDB python module +install(DIRECTORY ${SWIG_PYTHON_DIR} DESTINATION ${SWIG_INSTALL_DIR}) # build Python modules add_subdirectory(Python/modules) Modified: vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Mon Jan 9 21:23:54 2017 (r311827) +++ vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Mon Jan 9 21:23:57 2017 (r311828) @@ -2647,7 +2647,7 @@ bool DWARFASTParserClang::ParseChildMemb // Get the parent byte size so we can verify any members will fit const uint64_t parent_byte_size = - parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX) * 8; + parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX); const uint64_t parent_bit_size = parent_byte_size == UINT64_MAX ? UINT64_MAX : parent_byte_size * 8; Modified: vendor/lldb/dist/source/Symbol/ClangASTContext.cpp ============================================================================== --- vendor/lldb/dist/source/Symbol/ClangASTContext.cpp Mon Jan 9 21:23:54 2017 (r311827) +++ vendor/lldb/dist/source/Symbol/ClangASTContext.cpp Mon Jan 9 21:23:57 2017 (r311828) @@ -6752,43 +6752,42 @@ CompilerType ClangASTContext::GetChildCo } break; - case clang::Type::Pointer: - if (idx_is_valid) { - CompilerType pointee_clang_type(GetPointeeType(type)); + case clang::Type::Pointer: { + CompilerType pointee_clang_type(GetPointeeType(type)); - // Don't dereference "void *" pointers - if (pointee_clang_type.IsVoidType()) - return CompilerType(); + // Don't dereference "void *" pointers + if (pointee_clang_type.IsVoidType()) + return CompilerType(); - if (transparent_pointers && pointee_clang_type.IsAggregateType()) { - child_is_deref_of_parent = false; - bool tmp_child_is_deref_of_parent = false; - return pointee_clang_type.GetChildCompilerTypeAtIndex( - exe_ctx, idx, transparent_pointers, omit_empty_base_classes, - ignore_array_bounds, child_name, child_byte_size, child_byte_offset, - child_bitfield_bit_size, child_bitfield_bit_offset, - child_is_base_class, tmp_child_is_deref_of_parent, valobj, - language_flags); - } else { - child_is_deref_of_parent = true; + if (transparent_pointers && pointee_clang_type.IsAggregateType()) { + child_is_deref_of_parent = false; + bool tmp_child_is_deref_of_parent = false; + return pointee_clang_type.GetChildCompilerTypeAtIndex( + exe_ctx, idx, transparent_pointers, omit_empty_base_classes, + ignore_array_bounds, child_name, child_byte_size, child_byte_offset, + child_bitfield_bit_size, child_bitfield_bit_offset, + child_is_base_class, tmp_child_is_deref_of_parent, valobj, + language_flags); + } else { + child_is_deref_of_parent = true; - const char *parent_name = - valobj ? valobj->GetName().GetCString() : NULL; - if (parent_name) { - child_name.assign(1, '*'); - child_name += parent_name; - } + const char *parent_name = + valobj ? valobj->GetName().GetCString() : NULL; + if (parent_name) { + child_name.assign(1, '*'); + child_name += parent_name; + } - // We have a pointer to an simple type - if (idx == 0) { - child_byte_size = pointee_clang_type.GetByteSize( - exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); - child_byte_offset = 0; - return pointee_clang_type; - } + // We have a pointer to an simple type + if (idx == 0) { + child_byte_size = pointee_clang_type.GetByteSize( + exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL); + child_byte_offset = 0; + return pointee_clang_type; } } break; + } case clang::Type::LValueReference: case clang::Type::RValueReference: From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:52 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D5D1CA81E2; Mon, 9 Jan 2017 21:23:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1041115CC; Mon, 9 Jan 2017 21:23:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNpJG095958; Mon, 9 Jan 2017 21:23:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNnPh095936; Mon, 9 Jan 2017 21:23:49 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNnPh095936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311826 - in vendor/lld/dist: ELF cmake/modules include/lld/Core lib/Config lib/Core lib/Driver lib/ReaderWriter lib/ReaderWriter/MachO lib/ReaderWriter/YAML test/COFF test/ELF test/ELF... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:52 -0000 Author: dim Date: Mon Jan 9 21:23:48 2017 New Revision: 311826 URL: https://svnweb.freebsd.org/changeset/base/311826 Log: Vendor import of lld trunk r291476: https://llvm.org/svn/llvm-project/lld/trunk@291476 Added: vendor/lld/dist/test/ELF/comdat-linkonce.s (contents, props changed) vendor/lld/dist/test/ELF/undefined-versioned-symbol.s (contents, props changed) Modified: vendor/lld/dist/ELF/Driver.cpp vendor/lld/dist/ELF/Driver.h vendor/lld/dist/ELF/InputFiles.cpp vendor/lld/dist/ELF/InputFiles.h vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/Symbols.cpp vendor/lld/dist/cmake/modules/AddLLD.cmake vendor/lld/dist/include/lld/Core/Reproduce.h vendor/lld/dist/lib/Config/CMakeLists.txt vendor/lld/dist/lib/Core/CMakeLists.txt vendor/lld/dist/lib/Core/Reproduce.cpp vendor/lld/dist/lib/Driver/CMakeLists.txt vendor/lld/dist/lib/ReaderWriter/CMakeLists.txt vendor/lld/dist/lib/ReaderWriter/MachO/CMakeLists.txt vendor/lld/dist/lib/ReaderWriter/YAML/CMakeLists.txt vendor/lld/dist/test/COFF/linkrepro.test vendor/lld/dist/test/ELF/linkerscript/symbol-assignexpr.s vendor/lld/dist/test/ELF/mips-gp-ext.s vendor/lld/dist/test/ELF/reproduce-linkerscript.s vendor/lld/dist/tools/lld/CMakeLists.txt Modified: vendor/lld/dist/ELF/Driver.cpp ============================================================================== --- vendor/lld/dist/ELF/Driver.cpp Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/ELF/Driver.cpp Mon Jan 9 21:23:48 2017 (r311826) @@ -26,6 +26,7 @@ #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Path.h" +#include "llvm/Support/TarWriter.h" #include "llvm/Support/TargetSelect.h" #include "llvm/Support/raw_ostream.h" #include @@ -51,6 +52,7 @@ bool elf::link(ArrayRef Ar ErrorCount = 0; ErrorOS = &Error; Argv0 = Args[0]; + Tar = nullptr; Config = make(); Driver = make(); @@ -170,25 +172,6 @@ void LinkerDriver::addFile(StringRef Pat } } -Optional LinkerDriver::readFile(StringRef Path) { - if (Config->Verbose) - outs() << Path << "\n"; - - auto MBOrErr = MemoryBuffer::getFile(Path); - if (auto EC = MBOrErr.getError()) { - error(EC, "cannot open " + Path); - return None; - } - std::unique_ptr &MB = *MBOrErr; - MemoryBufferRef MBRef = MB->getMemBufferRef(); - make>(std::move(MB)); // take MB ownership - - if (Tar) - Tar->append(relativeToRoot(Path), MBRef.getBuffer()); - - return MBRef; -} - // Add a given library by searching it from input search paths. void LinkerDriver::addLibrary(StringRef Name) { if (Optional Path = searchLibrary(Name)) @@ -313,9 +296,10 @@ void LinkerDriver::main(ArrayRef> ErrOrWriter = TarWriter::create(Path, path::stem(Path)); if (ErrOrWriter) { - Tar = std::move(*ErrOrWriter); + Tar = ErrOrWriter->get(); Tar->append("response.txt", createResponseFile(Args)); Tar->append("version.txt", getLLDVersion() + "\n"); + make>(std::move(*ErrOrWriter)); } else { error(Twine("--reproduce: failed to open ") + Path + ": " + toString(ErrOrWriter.takeError())); Modified: vendor/lld/dist/ELF/Driver.h ============================================================================== --- vendor/lld/dist/ELF/Driver.h Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/ELF/Driver.h Mon Jan 9 21:23:48 2017 (r311826) @@ -17,7 +17,6 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/Option/ArgList.h" -#include "llvm/Support/TarWriter.h" #include "llvm/Support/raw_ostream.h" namespace lld { @@ -30,11 +29,9 @@ public: void main(ArrayRef Args, bool CanExitEarly); void addFile(StringRef Path); void addLibrary(StringRef Name); - std::unique_ptr Tar; // for reproduce private: std::vector getArchiveMembers(MemoryBufferRef MB); - llvm::Optional readFile(StringRef Path); void readConfigs(llvm::opt::InputArgList &Args); void createFiles(llvm::opt::InputArgList &Args); void inferMachineType(); Modified: vendor/lld/dist/ELF/InputFiles.cpp ============================================================================== --- vendor/lld/dist/ELF/InputFiles.cpp Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/ELF/InputFiles.cpp Mon Jan 9 21:23:48 2017 (r311826) @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// #include "InputFiles.h" -#include "Driver.h" #include "Error.h" #include "InputSection.h" #include "LinkerScript.h" @@ -26,6 +25,7 @@ #include "llvm/MC/StringTableBuilder.h" #include "llvm/Object/ELFObjectFile.h" #include "llvm/Support/Path.h" +#include "llvm/Support/TarWriter.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -36,6 +36,8 @@ using namespace llvm::sys::fs; using namespace lld; using namespace lld::elf; +TarWriter *elf::Tar; + namespace { // In ELF object file all section addresses are zero. If we have multiple // .text sections (when using -ffunction-section or comdat group) then @@ -53,6 +55,24 @@ public: }; } +Optional elf::readFile(StringRef Path) { + if (Config->Verbose) + outs() << Path << "\n"; + + auto MBOrErr = MemoryBuffer::getFile(Path); + if (auto EC = MBOrErr.getError()) { + error(EC, "cannot open " + Path); + return None; + } + std::unique_ptr &MB = *MBOrErr; + MemoryBufferRef MBRef = MB->getMemBufferRef(); + make>(std::move(MB)); // take MB ownership + + if (Tar) + Tar->append(relativeToRoot(Path), MBRef.getBuffer()); + return MBRef; +} + template void elf::ObjectFile::initializeDwarfLine() { std::unique_ptr Obj = check(object::ObjectFile::createObjectFile(this->MB), @@ -398,6 +418,14 @@ elf::ObjectFile::createInputSectio if (Config->Strip != StripPolicy::None && Name.startswith(".debug")) return &InputSection::Discarded; + // The linkonce feature is a sort of proto-comdat. Some glibc i386 object + // files contain definitions of symbol "__x86.get_pc_thunk.bx" in linkonce + // sections. Drop those sections to avoid duplicate symbol errors. + // FIXME: This is glibc PR20543, we should remove this hack once that has been + // fixed for a while. + if (Name.startswith(".gnu.linkonce.")) + return &InputSection::Discarded; + // The linker merges EH (exception handling) frames and creates a // .eh_frame_hdr section for runtime. So we handle them with a special // class. For relocatable outputs, they are just passed through. @@ -524,9 +552,8 @@ ArchiveFile::getMember(const Archive::Sy "could not get the buffer for the member defining symbol " + Sym->getName()); - if (C.getParent()->isThin() && Driver->Tar) - Driver->Tar->append(relativeToRoot(check(C.getFullName())), - Ret.getBuffer()); + if (C.getParent()->isThin() && Tar) + Tar->append(relativeToRoot(check(C.getFullName())), Ret.getBuffer()); if (C.getParent()->isThin()) return {Ret, 0}; return {Ret, C.getChildOffset()}; @@ -651,6 +678,8 @@ template void SharedFilevs_index; ++Versym; } + bool Hidden = VersymIndex & VERSYM_HIDDEN; + VersymIndex = VersymIndex & ~VERSYM_HIDDEN; StringRef Name = check(Sym.getName(this->StringTable)); if (Sym.isUndefined()) { @@ -658,15 +687,23 @@ template void SharedFile::X->addShared(this, Name, Sym, V); + + if (!Hidden) + elf::Symtab::X->addShared(this, Name, Sym, V); + + // Also add the symbol with the versioned name to handle undefined symbols + // with explicit versions. + if (V) { + StringRef VerName = this->StringTable.data() + V->getAux()->vda_name; + Name = Saver.save(Twine(Name) + "@" + VerName); + elf::Symtab::X->addShared(this, Name, Sym, V); + } } } Modified: vendor/lld/dist/ELF/InputFiles.h ============================================================================== --- vendor/lld/dist/ELF/InputFiles.h Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/ELF/InputFiles.h Mon Jan 9 21:23:48 2017 (r311826) @@ -29,6 +29,7 @@ namespace llvm { class DWARFDebugLine; +class TarWriter; namespace lto { class InputFile; } @@ -49,6 +50,13 @@ using llvm::object::Archive; class Lazy; class SymbolBody; +// If -reproduce option is given, all input files are written +// to this tar archive. +extern llvm::TarWriter *Tar; + +// Opens a given file. +llvm::Optional readFile(StringRef Path); + // The root class of input files. class InputFile { public: Modified: vendor/lld/dist/ELF/LinkerScript.cpp ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.cpp Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/ELF/LinkerScript.cpp Mon Jan 9 21:23:48 2017 (r311826) @@ -56,29 +56,30 @@ using namespace lld::elf; LinkerScriptBase *elf::ScriptBase; ScriptConfiguration *elf::ScriptConfig; -template static void addRegular(SymbolAssignment *Cmd) { +template static SymbolBody *addRegular(SymbolAssignment *Cmd) { uint8_t Visibility = Cmd->Hidden ? STV_HIDDEN : STV_DEFAULT; - Symbol *Sym = Symtab::X->addRegular(Cmd->Name, Visibility, STT_NOTYPE, - 0, 0, STB_GLOBAL, nullptr, nullptr); - Cmd->Sym = Sym->body(); - - // If we have no SECTIONS then we don't have '.' and don't call - // assignAddresses(). We calculate symbol value immediately in this case. - if (!ScriptConfig->HasSections) - cast>(Cmd->Sym)->Value = Cmd->Expression(0); + Symbol *Sym = Symtab::X->addUndefined( + Cmd->Name, /*IsLocal=*/false, STB_GLOBAL, Visibility, + /*Type*/ 0, + /*CanOmitFromDynSym*/ false, /*File*/ nullptr); + + replaceBody>(Sym, Cmd->Name, /*IsLocal=*/false, + Visibility, STT_NOTYPE, 0, 0, nullptr, + nullptr); + return Sym->body(); } -template static void addSynthetic(SymbolAssignment *Cmd) { - // If we have SECTIONS block then output sections haven't been created yet. +template static SymbolBody *addSynthetic(SymbolAssignment *Cmd) { + uint8_t Visibility = Cmd->Hidden ? STV_HIDDEN : STV_DEFAULT; const OutputSectionBase *Sec = ScriptConfig->HasSections ? nullptr : Cmd->Expression.Section(); - Symbol *Sym = Symtab::X->addSynthetic( - Cmd->Name, Sec, 0, Cmd->Hidden ? STV_HIDDEN : STV_DEFAULT); - Cmd->Sym = Sym->body(); - - // If we already know section then we can calculate symbol value immediately. - if (Sec) - cast(Cmd->Sym)->Value = Cmd->Expression(0) - Sec->Addr; + Symbol *Sym = Symtab::X->addUndefined( + Cmd->Name, /*IsLocal=*/false, STB_GLOBAL, Visibility, + /*Type*/ 0, + /*CanOmitFromDynSym*/ false, /*File*/ nullptr); + + replaceBody(Sym, Cmd->Name, 0, Sec); + return Sym->body(); } static bool isUnderSysroot(StringRef Path) { @@ -90,21 +91,39 @@ static bool isUnderSysroot(StringRef Pat return false; } -template static void addSymbol(SymbolAssignment *Cmd) { - if (Cmd->Expression.IsAbsolute()) - addRegular(Cmd); - else - addSynthetic(Cmd); +template static void assignSymbol(SymbolAssignment *Cmd) { + // If there are sections, then let the value be assigned later in + // `assignAddresses`. + if (ScriptConfig->HasSections) + return; + + uint64_t Value = Cmd->Expression(0); + if (Cmd->Expression.IsAbsolute()) { + cast>(Cmd->Sym)->Value = Value; + } else { + const OutputSectionBase *Sec = Cmd->Expression.Section(); + if (Sec) + cast(Cmd->Sym)->Value = Value - Sec->Addr; + } } -// If a symbol was in PROVIDE(), we need to define it only when -// it is an undefined symbol. -template static bool shouldDefine(SymbolAssignment *Cmd) { + +template static void addSymbol(SymbolAssignment *Cmd) { if (Cmd->Name == ".") - return false; - if (!Cmd->Provide) - return true; + return; + + // If a symbol was in PROVIDE(), we need to define it only when + // it is a referenced undefined symbol. SymbolBody *B = Symtab::X->find(Cmd->Name); - return B && B->isUndefined(); + if (Cmd->Provide && (!B || B->isDefined())) + return; + + // Otherwise, create a new symbol if one does not exist or an + // undefined one does exist. + if (Cmd->Expression.IsAbsolute()) + Cmd->Sym = addRegular(Cmd); + else + Cmd->Sym = addSynthetic(Cmd); + assignSymbol(Cmd); } bool SymbolAssignment::classof(const BaseCommand *C) { @@ -283,8 +302,7 @@ void LinkerScript::processCommands // Handle symbol assignments outside of any output section. if (auto *Cmd = dyn_cast(Base1.get())) { - if (shouldDefine(Cmd)) - addSymbol(Cmd); + addSymbol(Cmd); continue; } @@ -326,8 +344,7 @@ void LinkerScript::processCommands // ".foo : { ...; bar = .; }". Handle them. for (const std::unique_ptr &Base : Cmd->Commands) if (auto *OutCmd = dyn_cast(Base.get())) - if (shouldDefine(OutCmd)) - addSymbol(OutCmd); + addSymbol(OutCmd); // Handle subalign (e.g. ".foo : SUBALIGN(32) { ... }"). If subalign // is given, input sections are aligned to that value, whether the @@ -1143,20 +1160,21 @@ void ScriptParser::readGroup() { void ScriptParser::readInclude() { StringRef Tok = unquote(next()); + // https://sourceware.org/binutils/docs/ld/File-Commands.html: // The file will be searched for in the current directory, and in any // directory specified with the -L option. - auto MBOrErr = MemoryBuffer::getFile(Tok); - if (!MBOrErr) - if (Optional Path = findFromSearchPaths(Tok)) - MBOrErr = MemoryBuffer::getFile(*Path); - if (!MBOrErr) { - setError("cannot open " + Tok); + if (sys::fs::exists(Tok)) { + if (Optional MB = readFile(Tok)) + tokenize(*MB); + return; + } + if (Optional Path = findFromSearchPaths(Tok)) { + if (Optional MB = readFile(*Path)) + tokenize(*MB); return; } - MemoryBufferRef MBRef = (*MBOrErr)->getMemBufferRef(); - make>(std::move(*MBOrErr)); // take MB ownership - tokenize(MBRef); + setError("cannot open " + Tok); } void ScriptParser::readOutput() { Modified: vendor/lld/dist/ELF/Symbols.cpp ============================================================================== --- vendor/lld/dist/ELF/Symbols.cpp Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/ELF/Symbols.cpp Mon Jan 9 21:23:48 2017 (r311826) @@ -202,6 +202,10 @@ void SymbolBody::parseSymbolVersion() { // Truncate the symbol name so that it doesn't include the version string. Name = {S.data(), Pos}; + // If this is an undefined or shared symbol it is not a definition. + if (isUndefined() || isShared()) + return; + // '@@' in a symbol name means the default version. // It is usually the most recent one. bool IsDefault = (Verstr[0] == '@'); Modified: vendor/lld/dist/cmake/modules/AddLLD.cmake ============================================================================== --- vendor/lld/dist/cmake/modules/AddLLD.cmake Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/cmake/modules/AddLLD.cmake Mon Jan 9 21:23:48 2017 (r311826) @@ -1,5 +1,5 @@ macro(add_lld_library name) - add_llvm_library(${name} ${ARGN}) + llvm_add_library(${name} ${ARGN}) set_target_properties(${name} PROPERTIES FOLDER "lld libraries") endmacro(add_lld_library) Modified: vendor/lld/dist/include/lld/Core/Reproduce.h ============================================================================== --- vendor/lld/dist/include/lld/Core/Reproduce.h Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/include/lld/Core/Reproduce.h Mon Jan 9 21:23:48 2017 (r311826) @@ -34,9 +34,6 @@ std::string rewritePath(StringRef S); // Returns the string form of the given argument. std::string toString(llvm::opt::Arg *Arg); - -// Replaces backslashes with slashes if Windows. -std::string convertToUnixPathSeparator(StringRef S); } #endif Modified: vendor/lld/dist/lib/Config/CMakeLists.txt ============================================================================== --- vendor/lld/dist/lib/Config/CMakeLists.txt Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/lib/Config/CMakeLists.txt Mon Jan 9 21:23:48 2017 (r311826) @@ -4,6 +4,6 @@ add_lld_library(lldConfig ADDITIONAL_HEADER_DIRS ${LLD_INCLUDE_DIR}/lld/Config - LINK_LIBS - LLVMSupport + LINK_COMPONENTS + Support ) Modified: vendor/lld/dist/lib/Core/CMakeLists.txt ============================================================================== --- vendor/lld/dist/lib/Core/CMakeLists.txt Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/lib/Core/CMakeLists.txt Mon Jan 9 21:23:48 2017 (r311826) @@ -12,6 +12,6 @@ add_lld_library(lldCore ADDITIONAL_HEADER_DIRS ${LLD_INCLUDE_DIR}/lld/Core - LINK_LIBS - LLVMSupport + LINK_COMPONENTS + Support ) Modified: vendor/lld/dist/lib/Core/Reproduce.cpp ============================================================================== --- vendor/lld/dist/lib/Core/Reproduce.cpp Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/lib/Core/Reproduce.cpp Mon Jan 9 21:23:48 2017 (r311826) @@ -39,7 +39,7 @@ std::string lld::relativeToRoot(StringRe Res = Root.substr(2); path::append(Res, path::relative_path(Abs)); - return convertToUnixPathSeparator(Res); + return path::convert_to_slash(Res); } // Quote a given string if it contains a space character. @@ -64,13 +64,3 @@ std::string lld::toString(opt::Arg *Arg) return K + V; return K + " " + V; } - -std::string lld::convertToUnixPathSeparator(StringRef S) { -#ifdef LLVM_ON_WIN32 - std::string Ret = S.str(); - std::replace(Ret.begin(), Ret.end(), '\\', '/'); - return Ret; -#else - return S; -#endif -} Modified: vendor/lld/dist/lib/Driver/CMakeLists.txt ============================================================================== --- vendor/lld/dist/lib/Driver/CMakeLists.txt Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/lib/Driver/CMakeLists.txt Mon Jan 9 21:23:48 2017 (r311826) @@ -8,15 +8,17 @@ add_lld_library(lldDriver ADDITIONAL_HEADER_DIRS ${LLD_INCLUDE_DIR}/lld/Driver + LINK_COMPONENTS + Object + Option + Support + LINK_LIBS lldConfig lldMachO lldCore lldReaderWriter lldYAML - LLVMObject - LLVMOption - LLVMSupport ) add_dependencies(lldDriver DriverOptionsTableGen) Modified: vendor/lld/dist/lib/ReaderWriter/CMakeLists.txt ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/CMakeLists.txt Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/lib/ReaderWriter/CMakeLists.txt Mon Jan 9 21:23:48 2017 (r311826) @@ -11,9 +11,11 @@ add_lld_library(lldReaderWriter ADDITIONAL_HEADER_DIRS ${LLD_INCLUDE_DIR}/lld/ReaderWriter + LINK_COMPONENTS + Object + Support + LINK_LIBS lldCore lldYAML - LLVMObject - LLVMSupport ) Modified: vendor/lld/dist/lib/ReaderWriter/MachO/CMakeLists.txt ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/MachO/CMakeLists.txt Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/lib/ReaderWriter/MachO/CMakeLists.txt Mon Jan 9 21:23:48 2017 (r311826) @@ -18,13 +18,16 @@ add_lld_library(lldMachO StubsPass.cpp TLVPass.cpp WriterMachO.cpp + + LINK_COMPONENTS + DebugInfoDWARF + Object + Support + Demangle + LINK_LIBS lldCore lldYAML - LLVMDebugInfoDWARF - LLVMObject - LLVMSupport - LLVMDemangle ${PTHREAD_LIB} ) Modified: vendor/lld/dist/lib/ReaderWriter/YAML/CMakeLists.txt ============================================================================== --- vendor/lld/dist/lib/ReaderWriter/YAML/CMakeLists.txt Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/lib/ReaderWriter/YAML/CMakeLists.txt Mon Jan 9 21:23:48 2017 (r311826) @@ -1,6 +1,9 @@ add_lld_library(lldYAML ReaderWriterYAML.cpp + + LINK_COMPONENTS + Support + LINK_LIBS lldCore - LLVMSupport ) Modified: vendor/lld/dist/test/COFF/linkrepro.test ============================================================================== --- vendor/lld/dist/test/COFF/linkrepro.test Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/test/COFF/linkrepro.test Mon Jan 9 21:23:48 2017 (r311826) @@ -1,3 +1,5 @@ +# REQUIRES: x86, shell + # RUN: rm -rf %t.dir # RUN: mkdir -p %t.dir/build1 %t.dir/build2 %t.dir/build3 # RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj Added: vendor/lld/dist/test/ELF/comdat-linkonce.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/ELF/comdat-linkonce.s Mon Jan 9 21:23:48 2017 (r311826) @@ -0,0 +1,9 @@ +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/comdat.s -o %t2.o +// RUN: ld.lld -shared %t.o %t2.o -o %t +// RUN: ld.lld -shared %t2.o %t.o -o %t + +.section .gnu.linkonce.t.zed +.globl abc +abc: +nop Modified: vendor/lld/dist/test/ELF/linkerscript/symbol-assignexpr.s ============================================================================== --- vendor/lld/dist/test/ELF/linkerscript/symbol-assignexpr.s Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/test/ELF/linkerscript/symbol-assignexpr.s Mon Jan 9 21:23:48 2017 (r311826) @@ -13,14 +13,20 @@ # RUN: symbol9 = - 4; \ # RUN: symbol10 = 0xfedcba9876543210; \ # RUN: symbol11 = ((0x28000 + 0x1fff) & ~(0x1000 + -1)); \ +# RUN: symbol12 = 0x1234; \ +# RUN: symbol12 += 1; \ +# RUN: bar = 0x5678; \ +# RUN: baz = 0x9abc; \ # RUN: }" > %t.script # RUN: ld.lld -o %t1 --script %t.script %t # RUN: llvm-objdump -t %t1 | FileCheck %s # CHECK: SYMBOL TABLE: # CHECK-NEXT: 0000000000000000 *UND* 00000000 -# CHECK-NEXT: .text 00000000 _start -# CHECK-NEXT: .text 00000000 foo +# CHECK-NEXT: 0000000000000000 .text 00000000 _start +# CHECK-NEXT: 0000000000005678 *ABS* 00000000 bar +# CHECK-NEXT: 0000000000009abc *ABS* 00000000 baz +# CHECK-NEXT: 0000000000000001 .text 00000000 foo # CHECK-NEXT: 0000000000001000 *ABS* 00000000 symbol # CHECK-NEXT: 0000000000002234 *ABS* 00000000 symbol2 # CHECK-NEXT: 0000000000002234 *ABS* 00000000 symbol3 @@ -32,6 +38,7 @@ # CHECK-NEXT: fffffffffffffffc *ABS* 00000000 symbol9 # CHECK-NEXT: fedcba9876543210 *ABS* 00000000 symbol10 # CHECK-NEXT: 0000000000029000 *ABS* 00000000 symbol11 +# CHECK-NEXT: 0000000000001235 *ABS* 00000000 symbol12 # RUN: echo "SECTIONS { \ # RUN: symbol2 = symbol; \ @@ -46,3 +53,9 @@ _start: .global foo foo: + nop + +.global bar +bar = 0x1234 + +.comm baz,8,8 Modified: vendor/lld/dist/test/ELF/mips-gp-ext.s ============================================================================== --- vendor/lld/dist/test/ELF/mips-gp-ext.s Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/test/ELF/mips-gp-ext.s Mon Jan 9 21:23:48 2017 (r311826) @@ -1,8 +1,10 @@ # Check that the linker use a value of _gp symbol defined # in a linker script to calculate GOT relocations. -# FIXME: This test is xfailed because it depends on D27276 patch -# that enables absolute symbols redefinition by a linker's script. +# FIXME: This test is xfailed because there is currently a bug +# that causes symbols defined by linker scripts to be put in the +# wrong sections. In particular, `_gp = . + 0x100` ends up in +# `.text` when it should be in `*ABS*`. # XFAIL: * # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o Modified: vendor/lld/dist/test/ELF/reproduce-linkerscript.s ============================================================================== --- vendor/lld/dist/test/ELF/reproduce-linkerscript.s Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/test/ELF/reproduce-linkerscript.s Mon Jan 9 21:23:48 2017 (r311826) @@ -4,10 +4,13 @@ # RUN: mkdir -p %t.dir/build # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.dir/build/foo.o # RUN: echo "INPUT(\"%t.dir/build/foo.o\")" > %t.dir/build/foo.script +# RUN: echo "INCLUDE \"%t.dir/build/bar.script\"" >> %t.dir/build/foo.script +# RUN: echo "/* empty */" > %t.dir/build/bar.script # RUN: cd %t.dir # RUN: ld.lld build/foo.script -o bar --reproduce repro.tar # RUN: tar xf repro.tar # RUN: diff build/foo.script repro/%:t.dir/build/foo.script +# RUN: diff build/bar.script repro/%:t.dir/build/bar.script # RUN: diff build/foo.o repro/%:t.dir/build/foo.o .globl _start Added: vendor/lld/dist/test/ELF/undefined-versioned-symbol.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/ELF/undefined-versioned-symbol.s Mon Jan 9 21:23:48 2017 (r311826) @@ -0,0 +1,74 @@ +// REQUIRES: x86 +// RUN: echo ".data; \ +// RUN: .quad \"basename\"; \ +// RUN: .quad \"basename@FBSD_1.0\"; \ +// RUN: .quad \"basename@FBSD_1.1\" " > %t.s +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t.s -o %t.o +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t2.o +// RUN: echo "FBSD_1.0 { local: *; }; FBSD_1.1 { };" > %t2.ver +// RUN: ld.lld --shared --version-script %t2.ver %t2.o -o %t2.so +// RUN: echo "LIBPKG_1.3 { };" > %t.ver +// RUN: ld.lld --shared %t.o --version-script %t.ver %t2.so -o %t.so +// RUN: llvm-readobj --dyn-symbols -r --expand-relocs %t.so | FileCheck %s + +// Test that each relocation points to the correct version. + +// CHECK: Section ({{.*}}) .rela.dyn { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x2000 +// CHECK-NEXT: Type: R_X86_64_64 (1) +// CHECK-NEXT: Symbol: basename (1) +// CHECK-NEXT: Addend: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x2008 +// CHECK-NEXT: Type: R_X86_64_64 (1) +// CHECK-NEXT: Symbol: basename (2) +// CHECK-NEXT: Addend: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x2010 +// CHECK-NEXT: Type: R_X86_64_64 (1) +// CHECK-NEXT: Symbol: basename (3) +// CHECK-NEXT: Addend: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: } + + +// CHECK: DynamicSymbols [ +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: +// CHECK-NEXT: Value: +// CHECK-NEXT: Size: +// CHECK-NEXT: Binding: +// CHECK-NEXT: Type: +// CHECK-NEXT: Other: +// CHECK-NEXT: Section: +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: basename@FBSD_1.1 +// CHECK-NEXT: Value: +// CHECK-NEXT: Size: +// CHECK-NEXT: Binding: +// CHECK-NEXT: Type: +// CHECK-NEXT: Other: +// CHECK-NEXT: Section: +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: basename@FBSD_1.0 +// CHECK-NEXT: Value: +// CHECK-NEXT: Size: +// CHECK-NEXT: Binding: +// CHECK-NEXT: Type: +// CHECK-NEXT: Other: +// CHECK-NEXT: Section: +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: basename@FBSD_1.1 + + +.global "basename@FBSD_1.0" +"basename@FBSD_1.0": + +.global "basename@@FBSD_1.1" +"basename@@FBSD_1.1": Modified: vendor/lld/dist/tools/lld/CMakeLists.txt ============================================================================== --- vendor/lld/dist/tools/lld/CMakeLists.txt Mon Jan 9 21:23:46 2017 (r311825) +++ vendor/lld/dist/tools/lld/CMakeLists.txt Mon Jan 9 21:23:48 2017 (r311826) @@ -1,3 +1,7 @@ +set(LLVM_LINK_COMPONENTS + Support + ) + add_lld_tool(lld lld.cpp ) @@ -6,7 +10,6 @@ target_link_libraries(lld lldDriver lldCOFF lldELF - LLVMSupport ) install(TARGETS lld From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:23:56 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39370CA8225; Mon, 9 Jan 2017 21:23:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E48A81653; Mon, 9 Jan 2017 21:23:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LNtBu096007; Mon, 9 Jan 2017 21:23:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LNt8g096006; Mon, 9 Jan 2017 21:23:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092123.v09LNt8g096006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311827 - vendor/lld/lld-trunk-r291476 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:23:56 -0000 Author: dim Date: Mon Jan 9 21:23:54 2017 New Revision: 311827 URL: https://svnweb.freebsd.org/changeset/base/311827 Log: Tag lld trunk r291476. Added: vendor/lld/lld-trunk-r291476/ - copied from r311826, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Mon Jan 9 21:24:03 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 686C3CA829F; Mon, 9 Jan 2017 21:24:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BCB3173A; Mon, 9 Jan 2017 21:24:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v09LO2YJ096111; Mon, 9 Jan 2017 21:24:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v09LO2eF096110; Mon, 9 Jan 2017 21:24:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701092124.v09LO2eF096110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Jan 2017 21:24:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311829 - vendor/lldb/lldb-trunk-r291476 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 21:24:03 -0000 Author: dim Date: Mon Jan 9 21:24:02 2017 New Revision: 311829 URL: https://svnweb.freebsd.org/changeset/base/311829 Log: Tag lldb trunk r291476. Added: vendor/lldb/lldb-trunk-r291476/ - copied from r311828, vendor/lldb/dist/ From owner-svn-src-vendor@freebsd.org Tue Jan 10 10:02:45 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E0C3CA8A6B; Tue, 10 Jan 2017 10:02:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AC34137D; Tue, 10 Jan 2017 10:02:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AA2iMP007801; Tue, 10 Jan 2017 10:02:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AA2iML007800; Tue, 10 Jan 2017 10:02:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701101002.v0AA2iML007800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Jan 2017 10:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311867 - vendor/NetBSD/tests/dist/lib/libc/gen X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:02:45 -0000 Author: ngie Date: Tue Jan 10 10:02:44 2017 New Revision: 311867 URL: https://svnweb.freebsd.org/changeset/base/311867 Log: t_raise: import a minor grammar error fix to diff reduce with NetBSD Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_raise.c Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_raise.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_raise.c Tue Jan 10 08:25:03 2017 (r311866) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_raise.c Tue Jan 10 10:02:44 2017 (r311867) @@ -1,4 +1,4 @@ -/* $NetBSD: t_raise.c,v 1.5 2011/05/10 12:43:42 jruoho Exp $ */ +/* $NetBSD: t_raise.c,v 1.6 2016/11/03 22:08:31 kamil Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_raise.c,v 1.5 2011/05/10 12:43:42 jruoho Exp $"); +__RCSID("$NetBSD: t_raise.c,v 1.6 2016/11/03 22:08:31 kamil Exp $"); #include @@ -176,7 +176,7 @@ ATF_TC_BODY(raise_stress, tc) (void)raise(SIGUSR1); if (count != maxiter) - atf_tc_fail("not all signals were catched"); + atf_tc_fail("not all signals were caught"); } ATF_TP_ADD_TCS(tp) From owner-svn-src-vendor@freebsd.org Tue Jan 10 10:06:17 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 211EECA8CE3; Tue, 10 Jan 2017 10:06:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E45B317C7; Tue, 10 Jan 2017 10:06:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0AA6GK4007973; Tue, 10 Jan 2017 10:06:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0AA6GO8007972; Tue, 10 Jan 2017 10:06:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701101006.v0AA6GO8007972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Jan 2017 10:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311868 - vendor/NetBSD/tests/dist/lib/libc/ttyio X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:06:17 -0000 Author: ngie Date: Tue Jan 10 10:06:15 2017 New Revision: 311868 URL: https://svnweb.freebsd.org/changeset/base/311868 Log: Import lib/libc/ttyio/t_ttyio.c,1.3 Modified: vendor/NetBSD/tests/dist/lib/libc/ttyio/t_ttyio.c Modified: vendor/NetBSD/tests/dist/lib/libc/ttyio/t_ttyio.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/ttyio/t_ttyio.c Tue Jan 10 10:02:44 2017 (r311867) +++ vendor/NetBSD/tests/dist/lib/libc/ttyio/t_ttyio.c Tue Jan 10 10:06:15 2017 (r311868) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttyio.c,v 1.2 2011/04/19 20:07:53 martin Exp $ */ +/* $NetBSD: t_ttyio.c,v 1.3 2017/01/10 01:31:40 christos Exp $ */ /* * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_ttyio.c,v 1.2 2011/04/19 20:07:53 martin Exp $"); +__RCSID("$NetBSD: t_ttyio.c,v 1.3 2017/01/10 01:31:40 christos Exp $"); #include #include @@ -150,8 +150,9 @@ ATF_TC_BODY(ioctl, tc) /* wait for last child */ sa.sa_handler = SIG_DFL; REQUIRE_ERRNO(sigaction(SIGCHLD, &sa, NULL), -1); - (void) wait(NULL); + (void)wait(NULL); + (void)close(s); ATF_REQUIRE_EQ(rc, 0); } From owner-svn-src-vendor@freebsd.org Tue Jan 10 21:18:37 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A721BCAA514; Tue, 10 Jan 2017 21:18:37 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 579B6133B; Tue, 10 Jan 2017 21:18:37 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0ALIagr086603; Tue, 10 Jan 2017 21:18:36 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0ALIXiT086569; Tue, 10 Jan 2017 21:18:33 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201701102118.v0ALIXiT086569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Tue, 10 Jan 2017 21:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311899 - in vendor/libarchive/dist: . libarchive libarchive/test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 21:18:37 -0000 Author: mm Date: Tue Jan 10 21:18:32 2017 New Revision: 311899 URL: https://svnweb.freebsd.org/changeset/base/311899 Log: Update vendor/libarchive to git 22f2d190639e6bd496a3b82f70c01fba0d38b40a Vendor changes: #691: Support for SCHILY.xattr extended attributes #854: Spelling fixes Multiple fixes in ACL code: - prefer acl_set_fd_np() to acl_set_fd() - if acl_set_fd_np() fails, do no fallback to acl_set_file() - do not warn if trying to write ACLs to a filesystem without ACL support - fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs Added: vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.c (contents, props changed) vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.tar.uu Modified: vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/libarchive/archive_acl.c vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_disk_posix.c vendor/libarchive/dist/libarchive/archive_read_disk_windows.c vendor/libarchive/dist/libarchive/archive_read_support_filter_lz4.c vendor/libarchive/dist/libarchive/archive_read_support_filter_lzop.c vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_string.c vendor/libarchive/dist/libarchive/archive_string.h vendor/libarchive/dist/libarchive/archive_string_composition.h vendor/libarchive/dist/libarchive/archive_write.c vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c vendor/libarchive/dist/libarchive/archive_write_disk_acl.c vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/libarchive/test/test_archive_read_add_passphrase.c vendor/libarchive/dist/libarchive/test/test_compat_uudecode.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_afio.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_traditional_encryption_data.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_winzip_aes.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_winzip_aes_large.c vendor/libarchive/dist/libarchive/test/test_sparse_basic.c vendor/libarchive/dist/libarchive/xxhash.c Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/Makefile.am Tue Jan 10 21:18:32 2017 (r311899) @@ -497,6 +497,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_read_format_zip_winzip_aes_large.c \ libarchive/test/test_read_format_zip_zip64.c \ libarchive/test/test_read_large.c \ + libarchive/test/test_read_pax_schily_xattr.c \ libarchive/test/test_read_pax_truncated.c \ libarchive/test/test_read_position.c \ libarchive/test/test_read_set_format.c \ Modified: vendor/libarchive/dist/libarchive/archive_acl.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_acl.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_acl.c Tue Jan 10 21:18:32 2017 (r311899) @@ -786,7 +786,8 @@ append_entry_w(wchar_t **wp, const wchar } else if (tag == ARCHIVE_ENTRY_ACL_USER || tag == ARCHIVE_ENTRY_ACL_GROUP) { append_id_w(wp, id); - id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) + id = -1; } /* Solaris style has no second colon after other and mask */ if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0) @@ -1042,7 +1043,8 @@ append_entry(char **p, const char *prefi } else if (tag == ARCHIVE_ENTRY_ACL_USER || tag == ARCHIVE_ENTRY_ACL_GROUP) { append_id(p, id); - id = -1; + if ((type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) == 0) + id = -1; } /* Solaris style has no second colon after other and mask */ if (((flags & ARCHIVE_ENTRY_ACL_STYLE_SOLARIS) == 0) @@ -1328,6 +1330,7 @@ archive_acl_from_text_w(struct archive_a tag == ARCHIVE_ENTRY_ACL_GROUP) { n = 1; name = field[1]; + isint_w(name.start, name.end, &id); } else n = 0; @@ -1799,6 +1802,7 @@ archive_acl_from_text_l(struct archive_a tag == ARCHIVE_ENTRY_ACL_GROUP) { n = 1; name = field[1]; + isint(name.start, name.end, &id); } else n = 0; Modified: vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c Tue Jan 10 21:18:32 2017 (r311899) @@ -526,6 +526,11 @@ setup_acls(struct archive_read_disk *a, /* Only directories can have default ACLs. */ if (S_ISDIR(archive_entry_mode(entry))) { +#if HAVE_ACL_GET_FD_NP + if (*fd >= 0) + acl = acl_get_fd_np(*fd, ACL_TYPE_DEFAULT); + else +#endif acl = acl_get_file(accpath, ACL_TYPE_DEFAULT); if (acl != NULL) { r = translate_acl(a, entry, acl, @@ -581,7 +586,10 @@ static struct { {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} }; #endif static int Modified: vendor/libarchive/dist/libarchive/archive_read_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_posix.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_disk_posix.c Tue Jan 10 21:18:32 2017 (r311899) @@ -675,7 +675,7 @@ setup_suitable_read_buffer(struct archiv asize = cf->min_xfer_size; /* Increase a buffer size up to 64K bytes in - * a proper incremant size. */ + * a proper increment size. */ while (asize < 1024*64) asize += incr; /* Take a margin to adjust to the filesystem @@ -1656,7 +1656,7 @@ setup_current_filesystem(struct archive_ archive_set_error(&a->archive, errno, "statvfs failed"); return (ARCHIVE_FAILED); } else if (xr == 1) { - /* Usuall come here unless NetBSD supports _PC_REC_XFER_ALIGN + /* Usually come here unless NetBSD supports _PC_REC_XFER_ALIGN * for pathconf() function. */ t->current_filesystem->xfer_align = sfs.f_frsize; t->current_filesystem->max_xfer_size = -1; @@ -1944,7 +1944,7 @@ setup_current_filesystem(struct archive_ if (nm == -1) # endif /* _PC_NAME_MAX */ /* - * Some sysmtes (HP-UX or others?) incorrectly defined + * Some systems (HP-UX or others?) incorrectly defined * NAME_MAX macro to be a smaller value. */ # if defined(NAME_MAX) && NAME_MAX >= 255 Modified: vendor/libarchive/dist/libarchive/archive_read_disk_windows.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk_windows.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_disk_windows.c Tue Jan 10 21:18:32 2017 (r311899) @@ -1401,7 +1401,7 @@ close_and_restore_time(HANDLE h, struct if (h == INVALID_HANDLE_VALUE && AE_IFLNK == rt->filetype) return (0); - /* Close a file descritor. + /* Close a file descriptor. * It will not be used for SetFileTime() because it has been opened * by a read only mode. */ Modified: vendor/libarchive/dist/libarchive/archive_read_support_filter_lz4.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_filter_lz4.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_filter_lz4.c Tue Jan 10 21:18:32 2017 (r311899) @@ -180,7 +180,7 @@ lz4_reader_bid(struct archive_read_filte return (0); bits_checked += 8; BD = buffer[5]; - /* A block maximum size shuld be more than 3. */ + /* A block maximum size should be more than 3. */ if (((BD & 0x70) >> 4) < 4) return (0); /* Reserved bits must be "0". */ @@ -417,7 +417,7 @@ lz4_filter_read_descriptor(struct archiv /* Reserved bits must be zero. */ if (bd & 0x8f) goto malformed_error; - /* Get a maxinum block size. */ + /* Get a maximum block size. */ switch (read_buf[1] >> 4) { case 4: /* 64 KB */ state->flags.block_maximum_size = 64 * 1024; @@ -627,7 +627,7 @@ lz4_filter_read_default_stream(struct ar if (state->stage == SELECT_STREAM) { state->stage = READ_DEFAULT_STREAM; - /* First, read a desciprtor. */ + /* First, read a descriptor. */ if((ret = lz4_filter_read_descriptor(self)) != ARCHIVE_OK) return (ret); state->stage = READ_DEFAULT_BLOCK; Modified: vendor/libarchive/dist/libarchive/archive_read_support_filter_lzop.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_filter_lzop.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_filter_lzop.c Tue Jan 10 21:18:32 2017 (r311899) @@ -436,7 +436,7 @@ lzop_filter_read(struct archive_read_fil } /* - * Drive lzo uncompresison. + * Drive lzo uncompression. */ out_size = (lzo_uint)state->uncompressed_size; r = lzo1x_decompress_safe(b, (lzo_uint)state->compressed_size, Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c Tue Jan 10 21:18:32 2017 (r311899) @@ -552,7 +552,7 @@ skip_sfx(struct archive_read *a, ssize_t /* * If bytes_avail > SFX_MIN_ADDR we do not have to call * __archive_read_seek() at this time since we have - * alredy had enough data. + * already had enough data. */ if (bytes_avail > SFX_MIN_ADDR) __archive_read_consume(a, SFX_MIN_ADDR); @@ -760,7 +760,7 @@ archive_read_format_7zip_read_header(str symsize += size; } if (symsize == 0) { - /* If there is no synname, handle it as a regular + /* If there is no symname, handle it as a regular * file. */ zip_entry->mode &= ~AE_IFMT; zip_entry->mode |= AE_IFREG; @@ -3288,7 +3288,7 @@ read_stream(struct archive_read *a, cons return (r); /* - * Skip the bytes we alrady has skipped in skip_stream(). + * Skip the bytes we already has skipped in skip_stream(). */ while (skip_bytes) { ssize_t skipped; @@ -3506,7 +3506,7 @@ setup_decode_folder(struct archive_read return (ARCHIVE_FATAL); } - /* Allocate memory for the decorded data of a sub + /* Allocate memory for the decoded data of a sub * stream. */ b[i] = malloc((size_t)zip->folder_outbytes_remaining); if (b[i] == NULL) { @@ -3591,7 +3591,7 @@ skip_stream(struct archive_read *a, size if (zip->folder_index == 0) { /* * Optimization for a list mode. - * Avoid unncecessary decoding operations. + * Avoid unnecessary decoding operations. */ zip->si.ci.folders[zip->entry->folderIndex].skipped_bytes += skip_bytes; Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c Tue Jan 10 21:18:32 2017 (r311899) @@ -322,7 +322,7 @@ struct iso9660 { struct archive_string pathname; char seenRockridge; /* Set true if RR extensions are used. */ - char seenSUSP; /* Set true if SUSP is beging used. */ + char seenSUSP; /* Set true if SUSP is being used. */ char seenJoliet; unsigned char suspOffset; Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c Tue Jan 10 21:18:32 2017 (r311899) @@ -1711,7 +1711,7 @@ lha_crc16(uint16_t crc, const void *pp, */ for (;len >= 8; len -= 8) { /* This if statement expects compiler optimization will - * remove the stament which will not be executed. */ + * remove the statement which will not be executed. */ #undef bswap16 #if defined(_MSC_VER) && _MSC_VER >= 1400 /* Visual Studio */ # define bswap16(x) _byteswap_ushort(x) Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c Tue Jan 10 21:18:32 2017 (r311899) @@ -906,7 +906,7 @@ archive_read_format_rar_read_header(stru sizeof(rar->reserved2)); } - /* Main header is password encrytped, so we cannot read any + /* Main header is password encrypted, so we cannot read any file names or any other info about files from the header. */ if (rar->main_flags & MHD_PASSWORD) { Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c Tue Jan 10 21:18:32 2017 (r311899) @@ -204,13 +204,14 @@ static int archive_read_format_tar_read_ struct archive_entry *); static int checksum(struct archive_read *, const void *); static int pax_attribute(struct archive_read *, struct tar *, - struct archive_entry *, const char *key, const char *value); + struct archive_entry *, const char *key, const char *value, + size_t value_length); static int pax_attribute_acl(struct archive_read *, struct tar *, struct archive_entry *, const char *, int); static int pax_attribute_xattr(struct archive_entry *, const char *, const char *); static int pax_header(struct archive_read *, struct tar *, - struct archive_entry *, char *attr); + struct archive_entry *, struct archive_string *); static void pax_time(const char *, int64_t *sec, long *nanos); static ssize_t readline(struct archive_read *, struct tar *, const char **, ssize_t limit, size_t *); @@ -1483,7 +1484,7 @@ header_pax_extensions(struct archive_rea * and then skip any fields in the standard header that were * defined in the pax header. */ - err2 = pax_header(a, tar, entry, tar->pax_header.s); + err2 = pax_header(a, tar, entry, &tar->pax_header); err = err_combine(err, err2); tar->entry_padding = 0x1ff & (-tar->entry_bytes_remaining); return (err); @@ -1564,16 +1565,17 @@ header_ustar(struct archive_read *a, str */ static int pax_header(struct archive_read *a, struct tar *tar, - struct archive_entry *entry, char *attr) + struct archive_entry *entry, struct archive_string *in_as) { - size_t attr_length, l, line_length; + size_t attr_length, l, line_length, value_length; char *p; char *key, *value; struct archive_string *as; struct archive_string_conv *sconv; int err, err2; + char *attr = in_as->s; - attr_length = strlen(attr); + attr_length = in_as->length; tar->pax_hdrcharset_binary = 0; archive_string_empty(&(tar->entry_gname)); archive_string_empty(&(tar->entry_linkpath)); @@ -1638,11 +1640,13 @@ pax_header(struct archive_read *a, struc } *p = '\0'; - /* Identify null-terminated 'value' portion. */ value = p + 1; + /* Some values may be binary data */ + value_length = attr + line_length - 1 - value; + /* Identify this attribute and set it in the entry. */ - err2 = pax_attribute(a, tar, entry, key, value); + err2 = pax_attribute(a, tar, entry, key, value, value_length); if (err2 == ARCHIVE_FATAL) return (err2); err = err_combine(err, err2); @@ -1764,6 +1768,20 @@ pax_attribute_xattr(struct archive_entry } static int +pax_attribute_schily_xattr(struct archive_entry *entry, + const char *name, const char *value, size_t value_length) +{ + if (strlen(name) < 14 || (memcmp(name, "SCHILY.xattr.", 13)) != 0) + return 1; + + name += 13; + + archive_entry_xattr_add_entry(entry, name, value, value_length); + + return 0; +} + +static int pax_attribute_acl(struct archive_read *a, struct tar *tar, struct archive_entry *entry, const char *value, int type) { @@ -1824,7 +1842,7 @@ pax_attribute_acl(struct archive_read *a */ static int pax_attribute(struct archive_read *a, struct tar *tar, - struct archive_entry *entry, const char *key, const char *value) + struct archive_entry *entry, const char *key, const char *value, size_t value_length) { int64_t s; long n; @@ -1959,6 +1977,9 @@ pax_attribute(struct archive_read *a, st } else if (strcmp(key, "SCHILY.realsize") == 0) { tar->realsize = tar_atol10(value, strlen(value)); archive_entry_set_size(entry, tar->realsize); + } else if (strncmp(key, "SCHILY.xattr.", 13) == 0) { + pax_attribute_schily_xattr(entry, key, value, + value_length); } else if (strcmp(key, "SUN.holesdata") == 0) { /* A Solaris extension for sparse. */ r = solaris_sparse_parse(a, tar, entry, value); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c Tue Jan 10 21:18:32 2017 (r311899) @@ -88,7 +88,7 @@ typedef enum { WT_RVIS, /* conversion, unsupported */ WT_CONV, - /* continutation, unsupported at the moment */ + /* continuation, unsupported at the moment */ WT_CONT, /* invalid type */ LAST_WT @@ -562,7 +562,7 @@ xstrpisotime(const char *s, char **endpt goto out; } - /* massage TM to fulfill some of POSIX' contraints */ + /* massage TM to fulfill some of POSIX' constraints */ tm.tm_year -= 1900; tm.tm_mon--; Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Tue Jan 10 21:18:32 2017 (r311899) @@ -199,7 +199,7 @@ struct zip { struct trad_enc_ctx tctx; char tctx_valid; - /* WinZip AES decyption. */ + /* WinZip AES decryption. */ /* Contexts used for AES decryption. */ archive_crypto_ctx cctx; char cctx_valid; @@ -242,7 +242,7 @@ trad_enc_update_keys(struct trad_enc_ctx } static uint8_t -trad_enc_decypt_byte(struct trad_enc_ctx *ctx) +trad_enc_decrypt_byte(struct trad_enc_ctx *ctx) { unsigned temp = ctx->keys[2] | 2; return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff; @@ -257,7 +257,7 @@ trad_enc_decrypt_update(struct trad_enc_ max = (unsigned)((in_len < out_len)? in_len: out_len); for (i = 0; i < max; i++) { - uint8_t t = in[i] ^ trad_enc_decypt_byte(ctx); + uint8_t t = in[i] ^ trad_enc_decrypt_byte(ctx); out[i] = t; trad_enc_update_keys(ctx, t); } @@ -710,7 +710,7 @@ process_extra(struct archive_read *a, co break; } case 0x9901: - /* WinZIp AES extra data field. */ + /* WinZip AES extra data field. */ if (p[offset + 2] == 'A' && p[offset + 3] == 'E') { /* Vendor version. */ zip_entry->aes_extra.vendor = @@ -1518,7 +1518,7 @@ read_decryption_header(struct archive_re case 0x6720:/* Blowfish */ case 0x6721:/* Twofish */ case 0x6801:/* RC4 */ - /* Suuported encryption algorithm. */ + /* Supported encryption algorithm. */ break; default: archive_set_error(&a->archive, @@ -1627,7 +1627,7 @@ read_decryption_header(struct archive_re __archive_read_consume(a, 4); /*return (ARCHIVE_OK); - * This is not fully implemnted yet.*/ + * This is not fully implemented yet.*/ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Encrypted file is unsupported"); return (ARCHIVE_FAILED); @@ -1709,7 +1709,7 @@ init_traditional_PKWARE_decryption(struc } /* - * Initialize ctx for Traditional PKWARE Decyption. + * Initialize ctx for Traditional PKWARE Decryption. */ r = trad_enc_init(&zip->tctx, passphrase, strlen(passphrase), p, ENC_HEADER_SIZE, &crcchk); Modified: vendor/libarchive/dist/libarchive/archive_string.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_string.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_string.c Tue Jan 10 21:18:32 2017 (r311899) @@ -219,6 +219,12 @@ archive_wstring_append(struct archive_ws return (as); } +struct archive_string * +archive_array_append(struct archive_string *as, const char *p, size_t s) +{ + return archive_string_append(as, p, s); +} + void archive_string_concat(struct archive_string *dest, struct archive_string *src) { @@ -597,7 +603,7 @@ archive_wstring_append_from_mbs(struct a wcs = dest->s + dest->length; /* * We cannot use mbsrtowcs/mbstowcs here because those may convert - * extra MBS when strlen(p) > len and one wide character consis of + * extra MBS when strlen(p) > len and one wide character consists of * multi bytes. */ while (*mbs && mbs_length > 0) { @@ -1248,7 +1254,7 @@ create_sconv_object(const char *fc, cons sc->cd = iconv_open(tc, fc); if (sc->cd == (iconv_t)-1 && (sc->flag & SCONV_BEST_EFFORT)) { /* - * Unfortunaly, all of iconv implements do support + * Unfortunately, all of iconv implements do support * "CP932" character-set, so we should use "SJIS" * instead if iconv_open failed. */ @@ -1261,7 +1267,7 @@ create_sconv_object(const char *fc, cons /* * archive_mstring on Windows directly convert multi-bytes * into archive_wstring in order not to depend on locale - * so that you can do a I18N programing. This will be + * so that you can do a I18N programming. This will be * used only in archive_mstring_copy_mbs_len_l so far. */ if (flag & SCONV_FROM_CHARSET) { @@ -1726,7 +1732,7 @@ archive_string_conversion_from_charset(s * in tar or zip files. But mbstowcs/wcstombs(CRT) usually use CP_ACP * unless you use setlocale(LC_ALL, ".OCP")(specify CP_OEMCP). * So we should make a string conversion between CP_ACP and CP_OEMCP - * for compatibillty. + * for compatibility. */ #if defined(_WIN32) && !defined(__CYGWIN__) struct archive_string_conv * @@ -2220,7 +2226,7 @@ best_effort_strncat_in_locale(struct arc /* * If a character is ASCII, this just copies it. If not, this - * assigns '?' charater instead but in UTF-8 locale this assigns + * assigns '?' character instead but in UTF-8 locale this assigns * byte sequence 0xEF 0xBD 0xBD, which are code point U+FFFD, * a Replacement Character in Unicode. */ @@ -2554,7 +2560,7 @@ utf16_to_unicode(uint32_t *pwc, const ch /* * Surrogate pair values(0xd800 through 0xdfff) are only - * used by UTF-16, so, after above culculation, the code + * used by UTF-16, so, after above calculation, the code * must not be surrogate values, and Unicode has no codes * larger than 0x10ffff. Thus, those are not legal Unicode * values. @@ -2903,7 +2909,7 @@ get_nfc(uint32_t uc, uint32_t uc2) /* * Normalize UTF-8/UTF-16BE characters to Form C and copy the result. * - * TODO: Convert composition exclusions,which are never converted + * TODO: Convert composition exclusions, which are never converted * from NFC,NFD,NFKC and NFKD, to Form C. */ static int @@ -3437,7 +3443,7 @@ strncat_from_utf8_libarchive2(struct arc } /* - * As libarchie 2.x, translates the UTF-8 characters into + * As libarchive 2.x, translates the UTF-8 characters into * wide-characters in the assumption that WCS is Unicode. */ if (n < 0) { @@ -3947,7 +3953,7 @@ archive_mstring_get_mbs_l(struct archive #if defined(_WIN32) && !defined(__CYGWIN__) /* - * Internationalization programing on Windows must use Wide + * Internationalization programming on Windows must use Wide * characters because Windows platform cannot make locale UTF-8. */ if (sc != NULL && (aes->aes_set & AES_SET_WCS) != 0) { @@ -4079,7 +4085,7 @@ archive_mstring_copy_mbs_len_l(struct ar archive_string_empty(&(aes->aes_utf8)); #if defined(_WIN32) && !defined(__CYGWIN__) /* - * Internationalization programing on Windows must use Wide + * Internationalization programming on Windows must use Wide * characters because Windows platform cannot make locale UTF-8. */ if (sc == NULL) { Modified: vendor/libarchive/dist/libarchive/archive_string.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_string.h Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_string.h Tue Jan 10 21:18:32 2017 (r311899) @@ -81,6 +81,10 @@ archive_strappend_char(struct archive_st struct archive_wstring * archive_wstrappend_wchar(struct archive_wstring *, wchar_t); +/* Append a raw array to an archive_string, resizing as necessary */ +struct archive_string * +archive_array_append(struct archive_string *, const char *, size_t); + /* Convert a Unicode string to current locale and append the result. */ /* Returns -1 if conversion fails. */ int Modified: vendor/libarchive/dist/libarchive/archive_string_composition.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_string_composition.h Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_string_composition.h Tue Jan 10 21:18:32 2017 (r311899) @@ -1009,7 +1009,7 @@ static const char u_decomposable_blocks[ (((uc) > 0x1D244)?0:\ ccc_val[ccc_val_index[ccc_index[(uc)>>8]][((uc)>>4)&0x0F]][(uc)&0x0F]) -/* The table of the value of Canonical Cimbining Class */ +/* The table of the value of Canonical Combining Class */ static const unsigned char ccc_val[][16] = { /* idx=0: XXXX0 - XXXXF */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, Modified: vendor/libarchive/dist/libarchive/archive_write.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_write.c Tue Jan 10 21:18:32 2017 (r311899) @@ -231,7 +231,7 @@ __archive_write_filter(struct archive_wr if (length == 0) return(ARCHIVE_OK); if (f->write == NULL) - /* If unset, a fatal error has already ocuured, so this filter + /* If unset, a fatal error has already occurred, so this filter * didn't open. We cannot write anything. */ return(ARCHIVE_FATAL); r = (f->write)(f, buff, length); Modified: vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_write_add_filter_xz.c Tue Jan 10 21:18:32 2017 (r311899) @@ -233,7 +233,7 @@ archive_compressor_xz_init_stream(struct if (f->code == ARCHIVE_FILTER_XZ) { #ifdef HAVE_LZMA_STREAM_ENCODER_MT if (data->threads != 1) { - bzero(&mt_options, sizeof(mt_options)); + memset(&mt_options, 0, sizeof(mt_options)); mt_options.threads = data->threads; mt_options.timeout = 300; mt_options.filters = data->lzmafilters; Modified: vendor/libarchive/dist/libarchive/archive_write_disk_acl.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_acl.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_write_disk_acl.c Tue Jan 10 21:18:32 2017 (r311899) @@ -124,7 +124,10 @@ static struct { {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} }; #endif @@ -292,29 +295,41 @@ set_acl(struct archive *a, int fd, const } /* Try restoring the ACL through 'fd' if we can. */ -#if HAVE_ACL_SET_FD - if (fd >= 0 && acl_type == ACL_TYPE_ACCESS && acl_set_fd(fd, acl) == 0) - ret = ARCHIVE_OK; - else -#else +#if HAVE_ACL_SET_FD_NP || HAVE_ACL_SET_FD #if HAVE_ACL_SET_FD_NP - if (fd >= 0 && acl_set_fd_np(fd, acl, acl_type) == 0) - ret = ARCHIVE_OK; - else -#endif -#endif + if (fd >= 0) { + if (acl_set_fd_np(fd, acl, acl_type) == 0) +#else /* HAVE_ACL_SET_FD */ + if (fd >= 0 && acl_type == ACL_TYPE_ACCESS) { + if (acl_set_fd(fd, acl) == 0) +#endif + ret = ARCHIVE_OK; + else { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, + "Failed to set %s acl on fd", tname); + } + } + } else +#endif /* HAVE_ACL_SET_FD_NP || HAVE_ACL_SET_FD */ #if HAVE_ACL_SET_LINK_NP - if (acl_set_link_np(name, acl_type, acl) != 0) { - archive_set_error(a, errno, "Failed to set %s acl", tname); - ret = ARCHIVE_WARN; - } + if (acl_set_link_np(name, acl_type, acl) != 0) { #else /* TODO: Skip this if 'name' is a symlink. */ if (acl_set_file(name, acl_type, acl) != 0) { - archive_set_error(a, errno, "Failed to set %s acl", tname); - ret = ARCHIVE_WARN; - } #endif + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, "Failed to set %s acl", + tname); + ret = ARCHIVE_WARN; + } + } exit_free: acl_free(acl); return (ret); Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_7zip.c Tue Jan 10 21:18:32 2017 (r311899) @@ -1358,7 +1358,7 @@ make_header(struct archive_write *a, uin if (r < 0) return (r); - /* Write Nume size. */ + /* Write Name size. */ r = enc_uint64(a, zip->total_bytes_entry_name+1); if (r < 0) return (r); Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c Tue Jan 10 21:18:32 2017 (r311899) @@ -62,10 +62,17 @@ struct pax { struct sparse_block *sparse_tail; struct archive_string_conv *sconv_utf8; int opt_binary; + + unsigned flags; +#define WRITE_SCHILY_XATTR (1 << 0) +#define WRITE_LIBARCHIVE_XATTR (1 << 1) }; static void add_pax_attr(struct archive_string *, const char *key, const char *value); +static void add_pax_attr_binary(struct archive_string *, + const char *key, + const char *value, size_t value_len); static void add_pax_attr_int(struct archive_string *, const char *key, int64_t value); static void add_pax_attr_time(struct archive_string *, @@ -136,6 +143,8 @@ archive_write_set_format_pax(struct arch "Can't allocate pax data"); return (ARCHIVE_FATAL); } + pax->flags = WRITE_LIBARCHIVE_XATTR | WRITE_SCHILY_XATTR; + a->format_data = pax; a->format_name = "pax"; a->format_options = archive_write_pax_options; @@ -275,6 +284,17 @@ add_pax_attr_int(struct archive_string * static void add_pax_attr(struct archive_string *as, const char *key, const char *value) { + add_pax_attr_binary(as, key, value, strlen(value)); +} + +/* + * Add a key/value attribute to the pax header. This function handles + * binary values. + */ +static void +add_pax_attr_binary(struct archive_string *as, const char *key, + const char *value, size_t value_len) +{ int digits, i, len, next_ten; char tmp[1 + 3 * sizeof(int)]; /* < 3 base-10 digits per byte */ @@ -282,7 +302,7 @@ add_pax_attr(struct archive_string *as, * PAX attributes have the following layout: * <=> */ - len = 1 + (int)strlen(key) + 1 + (int)strlen(value) + 1; + len = 1 + (int)strlen(key) + 1 + (int)value_len + 1; /* * The field includes the length of the field, so @@ -313,21 +333,47 @@ add_pax_attr(struct archive_string *as, archive_strappend_char(as, ' '); archive_strcat(as, key); archive_strappend_char(as, '='); - archive_strcat(as, value); + archive_array_append(as, value, value_len); archive_strappend_char(as, '\n'); } +static void +archive_write_pax_header_xattr(struct pax *pax, const char *encoded_name, + const void *value, size_t value_len) +{ + struct archive_string s; + char *encoded_value; + + if (pax->flags & WRITE_LIBARCHIVE_XATTR) { + encoded_value = base64_encode((const char *)value, value_len); + + if (encoded_name != NULL && encoded_value != NULL) { + archive_string_init(&s); + archive_strcpy(&s, "LIBARCHIVE.xattr."); + archive_strcat(&s, encoded_name); + add_pax_attr(&(pax->pax_header), s.s, encoded_value); + archive_string_free(&s); + } + free(encoded_value); + } + if (pax->flags & WRITE_SCHILY_XATTR) { + archive_string_init(&s); + archive_strcpy(&s, "SCHILY.xattr."); + archive_strcat(&s, encoded_name); + add_pax_attr_binary(&(pax->pax_header), s.s, value, value_len); + archive_string_free(&s); + } +} + static int archive_write_pax_header_xattrs(struct archive_write *a, struct pax *pax, struct archive_entry *entry) { - struct archive_string s; int i = archive_entry_xattr_reset(entry); while (i--) { const char *name; const void *value; - char *encoded_value; char *url_encoded_name = NULL, *encoded_name = NULL; size_t size; int r; @@ -348,16 +394,9 @@ archive_write_pax_header_xattrs(struct a } } - encoded_value = base64_encode((const char *)value, size); + archive_write_pax_header_xattr(pax, encoded_name, + value, size); - if (encoded_name != NULL && encoded_value != NULL) { - archive_string_init(&s); - archive_strcpy(&s, "LIBARCHIVE.xattr."); - archive_strcat(&s, encoded_name); - add_pax_attr(&(pax->pax_header), s.s, encoded_value); - archive_string_free(&s); - } - free(encoded_value); } return (ARCHIVE_OK); } Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c Tue Jan 10 21:18:32 2017 (r311899) @@ -2913,7 +2913,7 @@ compression_init_encoder_xz(struct archi *strm = lzma_init_data; #ifdef HAVE_LZMA_STREAM_ENCODER_MT if (threads > 1) { - bzero(&mt_options, sizeof(mt_options)); + memset(&mt_options, 0, sizeof(mt_options)); mt_options.threads = threads; mt_options.timeout = 300; mt_options.filters = lzmafilters; Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c Tue Jan 10 21:18:32 2017 (r311899) @@ -878,7 +878,7 @@ archive_write_zip_header(struct archive_ || zip->entry_encryption == ENCRYPTION_WINZIP_AES256)) { memcpy(e, "\001\231\007\000\001\000AE", 8); - /* AES vendoer version AE-2 does not store a CRC. + /* AES vendor version AE-2 does not store a CRC. * WinZip 11 uses AE-1, which does store the CRC, * but it does not store the CRC when the file size * is less than 20 bytes. So we simulate what @@ -1013,7 +1013,7 @@ archive_write_zip_data(struct archive_wr if (zip->entry_flags & ZIP_ENTRY_FLAG_ENCRYPTED) { switch (zip->entry_encryption) { case ENCRYPTION_TRADITIONAL: - /* Initialize traditoinal PKWARE encryption context. */ + /* Initialize traditional PKWARE encryption context. */ if (!zip->tctx_valid) { ret = init_traditional_pkware_encryption(a); if (ret != ARCHIVE_OK) @@ -1499,7 +1499,7 @@ trad_enc_update_keys(struct trad_enc_ctx } static uint8_t -trad_enc_decypt_byte(struct trad_enc_ctx *ctx) +trad_enc_decrypt_byte(struct trad_enc_ctx *ctx) { unsigned temp = ctx->keys[2] | 2; return (uint8_t)((temp * (temp ^ 1)) >> 8) & 0xff; @@ -1515,7 +1515,7 @@ trad_enc_encrypt_update(struct trad_enc_ for (i = 0; i < max; i++) { uint8_t t = in[i]; - out[i] = t ^ trad_enc_decypt_byte(ctx); + out[i] = t ^ trad_enc_decrypt_byte(ctx); trad_enc_update_keys(ctx, t); } return i; @@ -1626,7 +1626,7 @@ init_winzip_aes_encryption(struct archiv return (ARCHIVE_FAILED); } - /* Set a passowrd verification value after the 'salt'. */ + /* Set a password verification value after the 'salt'. */ salt[salt_len] = derived_key[key_len * 2]; salt[salt_len + 1] = derived_key[key_len * 2 + 1]; Modified: vendor/libarchive/dist/libarchive/test/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/libarchive/test/CMakeLists.txt Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/test/CMakeLists.txt Tue Jan 10 21:18:32 2017 (r311899) @@ -183,6 +183,7 @@ IF(ENABLE_TEST) test_read_format_zip_winzip_aes_large.c test_read_format_zip_zip64.c test_read_large.c + test_read_pax_schily_xattr.c test_read_pax_truncated.c test_read_position.c test_read_set_format.c Modified: vendor/libarchive/dist/libarchive/test/test_archive_read_add_passphrase.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_archive_read_add_passphrase.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/test/test_archive_read_add_passphrase.c Tue Jan 10 21:18:32 2017 (r311899) @@ -191,7 +191,7 @@ DEFINE_TEST(test_archive_read_add_passph /* Fist call, we should get "passCallBack" as a passphrase. */ assertEqualString("passCallBack", __archive_read_next_passphrase(ar)); __archive_read_reset_passphrase(ar); - /* After reset passphrase, we should get "passCallBack"passphrase. */ + /* After reset passphrase, we should get "passCallBack" passphrase. */ assertEqualString("passCallBack", __archive_read_next_passphrase(ar)); /* Second call, we should get NULL which means all the passphrases * are passed already. */ Modified: vendor/libarchive/dist/libarchive/test/test_compat_uudecode.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_compat_uudecode.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/test/test_compat_uudecode.c Tue Jan 10 21:18:32 2017 (r311899) @@ -40,7 +40,7 @@ static char archive_data[] = { }; /* - * Compatibility: uudecode command ignores junk data placed ater the "end" + * Compatibility: uudecode command ignores junk data placed after the "end" * marker. */ DEFINE_TEST(test_compat_uudecode) Modified: vendor/libarchive/dist/libarchive/test/test_read_format_cpio_afio.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_read_format_cpio_afio.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/test/test_read_format_cpio_afio.c Tue Jan 10 21:18:32 2017 (r311899) @@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$"); /* -ecute the following to rebuild the data for this program: +execute the following to rebuild the data for this program: tail -n +33 test_read_format_cpio_afio.c | /bin/sh # How to make a sample data. Modified: vendor/libarchive/dist/libarchive/test/test_read_format_zip_traditional_encryption_data.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_read_format_zip_traditional_encryption_data.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/test/test_read_format_zip_traditional_encryption_data.c Tue Jan 10 21:18:32 2017 (r311899) @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); DEFINE_TEST(test_read_format_zip_traditional_encryption_data) { - /* This file is password protected (Traditional PKWARE Enctypted). + /* This file is password protected (Traditional PKWARE Encrypted). The headers are NOT encrypted. Password is "12345678". */ const char *refname = "test_read_format_zip_traditional_encryption_data.zip"; @@ -36,7 +36,7 @@ DEFINE_TEST(test_read_format_zip_traditi struct archive *a; char buff[512]; - /* Check if running system has cryptographic functionarity. */ + /* Check if running system has cryptographic functionality. */ assert((a = archive_write_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a)); assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a)); Modified: vendor/libarchive/dist/libarchive/test/test_read_format_zip_winzip_aes.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_read_format_zip_winzip_aes.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/test/test_read_format_zip_winzip_aes.c Tue Jan 10 21:18:32 2017 (r311899) @@ -33,7 +33,7 @@ test_winzip_aes(const char *refname, int struct archive *a; char buff[512]; - /* Check if running system has cryptographic functionarity. */ + /* Check if running system has cryptographic functionality. */ assert((a = archive_write_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a)); assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a)); Modified: vendor/libarchive/dist/libarchive/test/test_read_format_zip_winzip_aes_large.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_read_format_zip_winzip_aes_large.c Tue Jan 10 21:10:20 2017 (r311898) +++ vendor/libarchive/dist/libarchive/test/test_read_format_zip_winzip_aes_large.c Tue Jan 10 21:18:32 2017 (r311899) @@ -34,7 +34,7 @@ DEFINE_TEST(test_read_format_zip_winzip_ char buff[512]; - /* Check if running system has cryptographic functionarity. */ + /* Check if running system has cryptographic functionality. */ assert((a = archive_write_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_zip(a)); assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_none(a)); Added: vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/libarchive/test/test_read_pax_schily_xattr.c Tue Jan 10 21:18:32 2017 (r311899) @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2016 IBM Corporation + * Copyright (c) 2003-2007 Tim Kientzle + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This test case's code has been derived from test_entry.c + */ +#include "test.h" + +DEFINE_TEST(test_schily_xattr_pax) +{ + struct archive *a; + struct archive_entry *ae; + const char *refname = "test_read_pax_schily_xattr.tar"; + const char *xname; /* For xattr tests. */ + const void *xval; /* For xattr tests. */ + size_t xsize; /* For xattr tests. */ + const char *string, *array; + + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); + + extract_reference_file(refname); + assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_filename(a, refname, 10240)); + + assertEqualInt(ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualInt(2, archive_entry_xattr_count(ae)); + assertEqualInt(2, archive_entry_xattr_reset(ae)); + + assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize)); + assertEqualString(xname, "security.selinux"); + string = "system_u:object_r:unlabeled_t:s0"; + assertEqualString(xval, string); + /* the xattr's value also contains the terminating \0 */ + assertEqualInt((int)xsize, strlen(string) + 1); + + assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize)); + assertEqualString(xname, "security.ima"); + assertEqualInt((int)xsize, 265); + /* we only compare the first 12 bytes */ + array = "\x03\x02\x04\xb0\xe9\xd6\x79\x01\x00\x2b\xad\x1e"; + assertEqualMem(xval, array, 12); + + /* Close the archive. */ + assertEqualInt(ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Jan 11 05:42:08 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E30FCAA457; Wed, 11 Jan 2017 05:42:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17B09125B; Wed, 11 Jan 2017 05:42:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0B5g7YV094799; Wed, 11 Jan 2017 05:42:07 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B5g7IG094796; Wed, 11 Jan 2017 05:42:07 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201701110542.v0B5g7IG094796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 11 Jan 2017 05:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311913 - vendor-crypto/openssh/dist X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 05:42:08 -0000 Author: delphij Date: Wed Jan 11 05:42:06 2017 New Revision: 311913 URL: https://svnweb.freebsd.org/changeset/base/311913 Log: Apply upstream fix for CVE-2016-10009 and CVE-2016-10010: add a whitelist of paths from which ssh-agent will load (via ssh-pkcs11-helper) a PKCS#11 module; ok markus@ disable Unix-domain socket forwarding when privsep is disabled (Note that this is a backport of upstream fixes, and this commit is mainly to ease future imports). Obtained from: OpenBSD Modified: vendor-crypto/openssh/dist/serverloop.c vendor-crypto/openssh/dist/ssh-agent.1 vendor-crypto/openssh/dist/ssh-agent.c Modified: vendor-crypto/openssh/dist/serverloop.c ============================================================================== --- vendor-crypto/openssh/dist/serverloop.c Wed Jan 11 02:21:34 2017 (r311912) +++ vendor-crypto/openssh/dist/serverloop.c Wed Jan 11 05:42:06 2017 (r311913) @@ -995,7 +995,7 @@ server_request_direct_streamlocal(void) /* XXX fine grained permissions */ if ((options.allow_streamlocal_forwarding & FORWARD_LOCAL) != 0 && - !no_port_forwarding_flag) { + !no_port_forwarding_flag && use_privsep) { c = channel_connect_to_path(target, "direct-streamlocal@openssh.com", "direct-streamlocal"); } else { @@ -1279,7 +1279,7 @@ server_input_global_request(int type, u_ /* check permissions */ if ((options.allow_streamlocal_forwarding & FORWARD_REMOTE) == 0 - || no_port_forwarding_flag) { + || no_port_forwarding_flag || !use_privsep) { success = 0; packet_send_debug("Server has disabled port forwarding."); } else { Modified: vendor-crypto/openssh/dist/ssh-agent.1 ============================================================================== --- vendor-crypto/openssh/dist/ssh-agent.1 Wed Jan 11 02:21:34 2017 (r311912) +++ vendor-crypto/openssh/dist/ssh-agent.1 Wed Jan 11 05:42:06 2017 (r311913) @@ -1,4 +1,4 @@ -.\" $OpenBSD: ssh-agent.1,v 1.62 2015/11/15 23:54:15 jmc Exp $ +.\" $OpenBSD: ssh-agent.1,v 1.63 2016/11/30 03:07:37 djm Exp $ .\" .\" Author: Tatu Ylonen .\" Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -47,6 +47,7 @@ .Op Fl a Ar bind_address .Op Fl E Ar fingerprint_hash .Op Fl t Ar life +.Op Fl P Ar pkcs11_whitelist .Op Ar command Op Ar arg ... .Nm ssh-agent .Op Fl c | s @@ -121,6 +122,18 @@ The default is Kill the current agent (given by the .Ev SSH_AGENT_PID environment variable). +.It Fl P +Specify a pattern-list of acceptable paths for PKCS#11 shared libraries +that may be added using the +.Fl s +option to +.Xr ssh-add 1 . +The default is to allow loading PKCS#11 libraries from +.Dq /usr/lib/*,/usr/local/lib/* . +PKCS#11 libraries that do not match the whitelist will be refused. +See PATTERNS in +.Xr ssh_config 5 +for a description of pattern-list syntax. .It Fl s Generate Bourne shell commands on .Dv stdout . Modified: vendor-crypto/openssh/dist/ssh-agent.c ============================================================================== --- vendor-crypto/openssh/dist/ssh-agent.c Wed Jan 11 02:21:34 2017 (r311912) +++ vendor-crypto/openssh/dist/ssh-agent.c Wed Jan 11 05:42:06 2017 (r311913) @@ -83,11 +83,16 @@ #include "misc.h" #include "digest.h" #include "ssherr.h" +#include "match.h" #ifdef ENABLE_PKCS11 #include "ssh-pkcs11.h" #endif +#ifndef DEFAULT_PKCS11_WHITELIST +# define DEFAULT_PKCS11_WHITELIST "/usr/lib/*,/usr/local/lib/*" +#endif + #if defined(HAVE_SYS_PRCTL_H) #include /* For prctl() and PR_SET_DUMPABLE */ #endif @@ -139,6 +144,9 @@ pid_t cleanup_pid = 0; char socket_name[PATH_MAX]; char socket_dir[PATH_MAX]; +/* PKCS#11 path whitelist */ +static char *pkcs11_whitelist; + /* locking */ #define LOCK_SIZE 32 #define LOCK_SALT_SIZE 16 @@ -741,7 +749,7 @@ no_identities(SocketEntry *e, u_int type static void process_add_smartcard_key(SocketEntry *e) { - char *provider = NULL, *pin; + char *provider = NULL, *pin, canonical_provider[PATH_MAX]; int r, i, version, count = 0, success = 0, confirm = 0; u_int seconds; time_t death = 0; @@ -773,10 +781,21 @@ process_add_smartcard_key(SocketEntry *e goto send; } } + if (realpath(provider, canonical_provider) == NULL) { + verbose("failed PKCS#11 add of \"%.100s\": realpath: %s", + provider, strerror(errno)); + goto send; + } + if (match_pattern_list(canonical_provider, pkcs11_whitelist, 0) != 1) { + verbose("refusing PKCS#11 add of \"%.100s\": " + "provider not whitelisted", canonical_provider); + goto send; + } + debug("%s: add %.100s", __func__, canonical_provider); if (lifetime && !death) death = monotime() + lifetime; - count = pkcs11_add_provider(provider, pin, &keys); + count = pkcs11_add_provider(canonical_provider, pin, &keys); for (i = 0; i < count; i++) { k = keys[i]; version = k->type == KEY_RSA1 ? 1 : 2; @@ -784,8 +803,8 @@ process_add_smartcard_key(SocketEntry *e if (lookup_identity(k, version) == NULL) { id = xcalloc(1, sizeof(Identity)); id->key = k; - id->provider = xstrdup(provider); - id->comment = xstrdup(provider); /* XXX */ + id->provider = xstrdup(canonical_provider); + id->comment = xstrdup(canonical_provider); /* XXX */ id->death = death; id->confirm = confirm; TAILQ_INSERT_TAIL(&tab->idlist, id, next); @@ -1176,7 +1195,7 @@ usage(void) { fprintf(stderr, "usage: ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]\n" - " [-t life] [command [arg ...]]\n" + " [-P pkcs11_whitelist] [-t life] [command [arg ...]]\n" " ssh-agent [-c | -s] -k\n"); exit(1); } @@ -1220,7 +1239,7 @@ main(int ac, char **av) __progname = ssh_get_progname(av[0]); seed_rng(); - while ((ch = getopt(ac, av, "cDdksE:a:t:")) != -1) { + while ((ch = getopt(ac, av, "cDdksE:a:P:t:")) != -1) { switch (ch) { case 'E': fingerprint_hash = ssh_digest_alg_by_name(optarg); @@ -1235,6 +1254,11 @@ main(int ac, char **av) case 'k': k_flag++; break; + case 'P': + if (pkcs11_whitelist != NULL) + fatal("-P option already specified"); + pkcs11_whitelist = xstrdup(optarg); + break; case 's': if (c_flag) usage(); @@ -1269,6 +1293,9 @@ main(int ac, char **av) if (ac > 0 && (c_flag || k_flag || s_flag || d_flag || D_flag)) usage(); + if (pkcs11_whitelist == NULL) + pkcs11_whitelist = xstrdup(DEFAULT_PKCS11_WHITELIST); + if (ac == 0 && !c_flag && !s_flag) { shell = getenv("SHELL"); if (shell != NULL && (len = strlen(shell)) > 2 && @@ -1416,7 +1443,7 @@ skip: signal(SIGTERM, cleanup_handler); nalloc = 0; - if (pledge("stdio cpath unix id proc exec", NULL) == -1) + if (pledge("stdio rpath cpath unix id proc exec", NULL) == -1) fatal("%s: pledge: %s", __progname, strerror(errno)); platform_pledge_agent(); From owner-svn-src-vendor@freebsd.org Wed Jan 11 08:15:23 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C369CAAA92; Wed, 11 Jan 2017 08:15:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B197F10B3; Wed, 11 Jan 2017 08:15:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0B8FMOm055941; Wed, 11 Jan 2017 08:15:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0B8FJxP055910; Wed, 11 Jan 2017 08:15:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701110815.v0B8FJxP055910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 11 Jan 2017 08:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311922 - in vendor/NetBSD/tests/dist/lib/libc: . c063 gen gen/posix_spawn string sys X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 08:15:23 -0000 Author: ngie Date: Wed Jan 11 08:15:18 2017 New Revision: 311922 URL: https://svnweb.freebsd.org/changeset/base/311922 Log: Pull in changes from upstream for lib/libc/{c063,gen,string,sys} to address issues resolved in FreeBSD or support added to testcases In collaboration with: Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_fexecve.c vendor/NetBSD/tests/dist/lib/libc/c063/t_fstatat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_mkfifoat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_mknodat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c vendor/NetBSD/tests/dist/lib/libc/c063/t_openat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_readlinkat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_unlinkat.c vendor/NetBSD/tests/dist/lib/libc/c063/t_utimensat.c vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/t_fileactions.c vendor/NetBSD/tests/dist/lib/libc/gen/t_assert.c vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c vendor/NetBSD/tests/dist/lib/libc/gen/t_ftok.c vendor/NetBSD/tests/dist/lib/libc/gen/t_humanize_number.c vendor/NetBSD/tests/dist/lib/libc/gen/t_sleep.c vendor/NetBSD/tests/dist/lib/libc/gen/t_time.c vendor/NetBSD/tests/dist/lib/libc/gen/t_ttyname.c vendor/NetBSD/tests/dist/lib/libc/gen/t_vis.c vendor/NetBSD/tests/dist/lib/libc/string/t_strchr.c vendor/NetBSD/tests/dist/lib/libc/string/t_strerror.c vendor/NetBSD/tests/dist/lib/libc/sys/t_access.c vendor/NetBSD/tests/dist/lib/libc/sys/t_chroot.c vendor/NetBSD/tests/dist/lib/libc/sys/t_mincore.c vendor/NetBSD/tests/dist/lib/libc/sys/t_mmap.c vendor/NetBSD/tests/dist/lib/libc/sys/t_wait.c vendor/NetBSD/tests/dist/lib/libc/t_cdb.c Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_faccessat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 20 #include #include #include -#include #define DIR "dir" #define FILE "dir/faccessat" Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_fchmodat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 201 #include #include #include -#include #define DIR "dir" #define FILE "dir/fchmodat" Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_fchownat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -40,7 +42,6 @@ __RCSID("$NetBSD: t_fchownat.c,v 1.3 201 #include #include #include -#include #define DIR "dir" #define FILE "dir/fchownat" Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_fexecve.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_fexecve.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_fexecve.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $ */ +/* $NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $"); +__RCSID("$NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include @@ -70,6 +70,7 @@ ATF_TC_BODY(fexecve, tc) error = 76; else error = EXIT_FAILURE; + (void)close(fd); err(error, "fexecve"); } } Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_fstatat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_fstatat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_fstatat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_fstatat.c,v 1.2 2013 #include #include #include -#include #define DIR "dir" #define FILE "dir/fstatat" Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_mkfifoat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_mkfifoat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_mkfifoat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include #include @@ -63,6 +63,7 @@ ATF_TC_BODY(mkfifoat_fd, tc) ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FIFO, F_OK) == 0); + (void)close(dfd); } ATF_TC(mkfifoat_fdcwd); Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_mknodat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_mknodat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_mknodat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $"); #include #include @@ -80,6 +80,7 @@ ATF_TC_BODY(mknodat_fd, tc) ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FILE, F_OK) == 0); + (void)close(dfd); } ATF_TC(mknodat_fdcwd); Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_o_search.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,9 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $"); #include + +#include +#include + #include #include #include @@ -40,7 +44,6 @@ __RCSID("$NetBSD: t_o_search.c,v 1.4 201 #include #include #include -#include /* * dholland 20130112: disable tests that require O_SEARCH semantics Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_openat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_openat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_openat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_openat.c,v 1.2 2013/ #include #include #include -#include #define DIR "dir" #define FILE "dir/openat" Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_readlinkat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_readlinkat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_readlinkat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_readlinkat.c,v 1.3 2 #include #include #include -#include #define DIR "dir" #define FILE "dir/readlinkat" Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_unlinkat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_unlinkat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_unlinkat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include +#include #include #include #include @@ -39,7 +41,6 @@ __RCSID("$NetBSD: t_unlinkat.c,v 1.2 201 #include #include #include -#include #define DIR "dir" #define FILE "dir/unlinkat" Modified: vendor/NetBSD/tests/dist/lib/libc/c063/t_utimensat.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/c063/t_utimensat.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/c063/t_utimensat.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $"); +#include +#include +#include #include #include #include @@ -39,8 +42,6 @@ __RCSID("$NetBSD: t_utimensat.c,v 1.5 20 #include #include #include -#include -#include #define DIR "dir" #define FILE "dir/utimensat" Modified: vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/t_fileactions.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/t_fileactions.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/posix_spawn/t_fileactions.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fileactions.c,v 1.5 2012/04/09 19:42:07 martin Exp $ */ +/* $NetBSD: t_fileactions.c,v 1.6 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -32,6 +32,10 @@ #include + +#include +#include + #include #include #include @@ -39,7 +43,6 @@ #include #include #include -#include ATF_TC(t_spawn_openmode); Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_assert.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_assert.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_assert.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $ */ +/* $NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $"); +__RCSID("$NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $"); +#include +#include +#include #include #include @@ -40,6 +43,17 @@ __RCSID("$NetBSD: t_assert.c,v 1.2 2011/ #include #include +static void +disable_corefile(void) +{ + struct rlimit limits; + + limits.rlim_cur = 0; + limits.rlim_max = 0; + + ATF_REQUIRE(setrlimit(RLIMIT_CORE, &limits) == 0); +} + static void handler(int); static void @@ -65,6 +79,7 @@ ATF_TC_BODY(assert_false, tc) if (pid == 0) { + disable_corefile(); (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); @@ -102,6 +117,7 @@ ATF_TC_BODY(assert_true, tc) if (pid == 0) { + disable_corefile(); (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_dir.c,v 1.6 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: t_dir.c,v 1.8 2017/01/11 07:26:17 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -26,18 +26,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include - +#include #include +#include #include #include +#include #include #include #include #include #include -#include + ATF_TC(seekdir_basic); ATF_TC_HEAD(seekdir_basic, tc) @@ -54,10 +55,19 @@ ATF_TC_BODY(seekdir_basic, tc) struct dirent *entry; long here; - mkdir("t", 0755); - creat("t/a", 0600); - creat("t/b", 0600); - creat("t/c", 0600); +#define CREAT(x, m) do { \ + int _creat_fd; \ + ATF_REQUIRE_MSG((_creat_fd = creat((x), (m)) != -1), \ + "creat(%s, %x) failed: %s", (x), (m), \ + strerror(errno)); \ + (void)close(_creat_fd); \ + } while(0); + + ATF_REQUIRE_MSG(mkdir("t", 0755) == 0, + "mkdir failed: %s", strerror(errno)); + CREAT("t/a", 0600); + CREAT("t/b", 0600); + CREAT("t/c", 0600); dp = opendir("t"); if ( dp == NULL) @@ -70,6 +80,8 @@ ATF_TC_BODY(seekdir_basic, tc) /* get first entry */ entry = readdir(dp); here = telldir(dp); + ATF_REQUIRE_MSG(here != -1, + "telldir failed: %s", strerror(errno)); /* get second entry */ entry = readdir(dp); @@ -109,6 +121,7 @@ ATF_TC_BODY(seekdir_basic, tc) atf_tc_fail("3rd seekdir found wrong name"); closedir(dp); + free(wasname); } ATF_TC(telldir_leak); Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_ftok.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_ftok.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_ftok.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $ */ +/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $"); +__RCSID("$NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $"); #include #include @@ -68,6 +68,7 @@ ATF_TC_BODY(ftok_link, tc) fd = open(path, O_RDONLY | O_CREAT); ATF_REQUIRE(fd >= 0); + (void)close(fd); ATF_REQUIRE(link(path, hlnk) == 0); ATF_REQUIRE(symlink(path, slnk) == 0); Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_humanize_number.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_humanize_number.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_humanize_number.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_humanize_number.c,v 1.8 2012/03/18 07:14:08 jruoho Exp $ */ +/* $NetBSD: t_humanize_number.c,v 1.9 2017/01/10 15:20:44 christos Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -241,6 +241,7 @@ ATF_TC_BODY(humanize_number_basic, tc) newline(); atf_tc_fail_nonfatal("Failed for table entry %d", i); } + free(buf); } ATF_TC(humanize_number_big); Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_sleep.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_sleep.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_sleep.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_sleep.c,v 1.9 2016/08/11 21:34:11 kre Exp $ */ +/* $NetBSD: t_sleep.c,v 1.11 2017/01/10 15:43:59 maya Exp $ */ /*- * Copyright (c) 2006 Frank Kardel @@ -26,8 +26,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +#include +#include +#include /* for TIMESPEC_TO_TIMEVAL on FreeBSD */ + #include #include +#include #include #include #include @@ -35,10 +41,6 @@ #include #include -#include -#include -#include - #include "isqemu.h" #define BILLION 1000000000LL /* nano-seconds per second */ Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_time.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_time.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_time.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $ */ +/* $NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $"); +__RCSID("$NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $"); #include #include @@ -38,6 +38,7 @@ __RCSID("$NetBSD: t_time.c,v 1.3 2014/10 #include #include #include +#include #include ATF_TC(time_copy); Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_ttyname.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_ttyname.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_ttyname.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $ */ +/* $NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $"); +__RCSID("$NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $"); #include #include @@ -78,6 +78,7 @@ ATF_TC_BODY(ttyname_err, tc) ATF_REQUIRE(ttyname(fd) == NULL); ATF_REQUIRE(errno == ENOTTY); + (void)close(fd); } } Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_vis.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_vis.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_vis.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_vis.c,v 1.8 2015/05/23 14:02:11 christos Exp $ */ +/* $NetBSD: t_vis.c,v 1.9 2017/01/10 15:16:57 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -144,6 +144,7 @@ ATF_TC_BODY(strunvis_hex, tc) } } +#ifdef VIS_NOLOCALE ATF_TC(strvis_locale); ATF_TC_HEAD(strvis_locale, tc) { @@ -172,6 +173,7 @@ ATF_TC_BODY(strvis_locale, tc) setlocale(LC_CTYPE, ol); free(ol); } +#endif /* VIS_NOLOCALE */ ATF_TP_ADD_TCS(tp) { @@ -180,7 +182,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, strvis_null); ATF_TP_ADD_TC(tp, strvis_empty); ATF_TP_ADD_TC(tp, strunvis_hex); +#ifdef VIS_NOLOCALE ATF_TP_ADD_TC(tp, strvis_locale); +#endif /* VIS_NOLOCALE */ return atf_no_error(); } Modified: vendor/NetBSD/tests/dist/lib/libc/string/t_strchr.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/string/t_strchr.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/string/t_strchr.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_strchr.c,v 1.1 2011/07/07 08:59:33 jruoho Exp $ */ +/* $NetBSD: t_strchr.c,v 1.2 2017/01/10 15:34:49 christos Exp $ */ /* * Written by J.T. Conklin @@ -58,9 +58,10 @@ ATF_TC_HEAD(strchr_basic, tc) ATF_TC_BODY(strchr_basic, tc) { - unsigned int t, a; + void *dl_handle; char *off; char buf[32]; + unsigned int t, a; const char *tab[] = { "", @@ -245,8 +246,8 @@ ATF_TC_BODY(strchr_basic, tc) "abcdefgh/abcdefgh/", }; - - strchr_fn = dlsym(dlopen(0, RTLD_LAZY), "test_strchr"); + dl_handle = dlopen(NULL, RTLD_LAZY); + strchr_fn = dlsym(dl_handle, "test_strlen"); if (!strchr_fn) strchr_fn = strchr; @@ -281,6 +282,7 @@ ATF_TC_BODY(strchr_basic, tc) verify_strchr(buf + a, 0xff, t, a); } } + (void)dlclose(dl_handle); } ATF_TP_ADD_TCS(tp) Modified: vendor/NetBSD/tests/dist/lib/libc/string/t_strerror.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/string/t_strerror.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/string/t_strerror.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $ */ +/* $NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,10 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $"); +__RCSID("$NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $"); #include #include +#include /* Needed for sys_nerr on FreeBSD */ #include #include #include Modified: vendor/NetBSD/tests/dist/lib/libc/sys/t_access.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/sys/t_access.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/sys/t_access.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); + +#include + +#include #include #include @@ -38,8 +42,6 @@ __RCSID("$NetBSD: t_access.c,v 1.1 2011/ #include #include -#include - static const char path[] = "access"; static const int mode[4] = { R_OK, W_OK, X_OK, F_OK }; Modified: vendor/NetBSD/tests/dist/lib/libc/sys/t_chroot.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/sys/t_chroot.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/sys/t_chroot.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,9 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include +#include #include #include Modified: vendor/NetBSD/tests/dist/lib/libc/sys/t_mincore.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/sys/t_mincore.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/sys/t_mincore.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $ */ +/* $NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -59,9 +59,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $"); +__RCSID("$NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $"); #include +#include #include #include Modified: vendor/NetBSD/tests/dist/lib/libc/sys/t_mmap.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/sys/t_mmap.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/sys/t_mmap.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $ */ +/* $NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,10 +55,11 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $"); #include #include +#include #include #include #include Modified: vendor/NetBSD/tests/dist/lib/libc/sys/t_wait.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/sys/t_wait.c Wed Jan 11 07:46:01 2017 (r311921) +++ vendor/NetBSD/tests/dist/lib/libc/sys/t_wait.c Wed Jan 11 08:15:18 2017 (r311922) @@ -1,4 +1,4 @@ -/* $NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $ */ +/* $NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $"); +__RCSID("$NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $"); #include #include @@ -60,22 +60,6 @@ ATF_TC_BODY(wait6_invalid, tc) && errno == EINVAL); } -ATF_TC(wait6_noproc); -ATF_TC_HEAD(wait6_noproc, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Test that wait6(2) returns ECHILD with for no processes"); -} - -ATF_TC_BODY(wait6_noproc, tc) -{ - siginfo_t si; - struct wrusage wru; - int st; - ATF_REQUIRE(wait6(P_ALL, 0, &st, WEXITED, &wru, &si) == -1 - && errno == ECHILD); -} - ATF_TC(wait6_exited); ATF_TC_HEAD(wait6_exited, tc) { @@ -92,12 +76,12 @@ ATF_TC_BODY(wait6_exited, tc) switch (pid = fork()) { case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); case 0: exit(0x5a5a5a5a); /*NOTREACHED*/ default: - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFEXITED(st) && WEXITSTATUS(st) == 0x5a); ATF_REQUIRE(si.si_status = 0x5a5a5a5a); ATF_REQUIRE(si.si_pid == pid); @@ -128,10 +112,10 @@ ATF_TC_BODY(wait6_terminated, tc) sleep(100); /*FALLTHROUGH*/ case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); default: ATF_REQUIRE(kill(pid, SIGTERM) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGTERM); ATF_REQUIRE(si.si_status == SIGTERM); ATF_REQUIRE(si.si_pid == pid); @@ -164,9 +148,9 @@ ATF_TC_BODY(wait6_coredumped, tc) *(char *)8 = 0; /*FALLTHROUGH*/ case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); default: - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGSEGV && WCOREDUMP(st)); ATF_REQUIRE(si.si_status == SIGSEGV); @@ -200,11 +184,14 @@ ATF_TC_BODY(wait6_stop_and_go, tc) sleep(100); /*FALLTHROUGH*/ case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); default: ATF_REQUIRE(kill(pid, SIGSTOP) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(!WIFSIGNALED(st)); ATF_REQUIRE(WIFSTOPPED(st) && WSTOPSIG(st) == SIGSTOP); + ATF_REQUIRE(!WIFCONTINUED(st)); ATF_REQUIRE(si.si_status == SIGSTOP); ATF_REQUIRE(si.si_pid == pid); ATF_REQUIRE(si.si_uid == getuid()); @@ -213,8 +200,11 @@ ATF_TC_BODY(wait6_stop_and_go, tc) (uintmax_t)si.si_utime); ATF_REQUIRE(kill(pid, SIGCONT) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(!WIFSIGNALED(st)); ATF_REQUIRE(WIFCONTINUED(st)); + ATF_REQUIRE(!WIFSTOPPED(st)); ATF_REQUIRE(si.si_status == SIGCONT); ATF_REQUIRE(si.si_pid == pid); ATF_REQUIRE(si.si_uid == getuid()); @@ -223,8 +213,11 @@ ATF_TC_BODY(wait6_stop_and_go, tc) (uintmax_t)si.si_utime); ATF_REQUIRE(kill(pid, SIGQUIT) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGQUIT); + ATF_REQUIRE(!WIFSTOPPED(st)); + ATF_REQUIRE(!WIFCONTINUED(st)); ATF_REQUIRE(si.si_status == SIGQUIT); ATF_REQUIRE(si.si_pid == pid); ATF_REQUIRE(si.si_uid == getuid()); @@ -235,15 +228,78 @@ ATF_TC_BODY(wait6_stop_and_go, tc) } } +ATF_TC(wait6_stopgo_loop); +ATF_TC_HEAD(wait6_stopgo_loop, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait6(2) handled stopped/continued process loop"); +} + +ATF_TC_BODY(wait6_stopgo_loop, tc) +{ + siginfo_t si; + struct wrusage wru; + int st; + pid_t pid; + static const struct rlimit rl = { 0, 0 }; + size_t N = 100; + + ATF_REQUIRE(setrlimit(RLIMIT_CORE, &rl) == 0); + switch (pid = fork()) { + case 0: + sleep(100); + /*FALLTHROUGH*/ + case -1: + ATF_REQUIRE(pid > 0); + } + + printf("Before loop of SIGSTOP/SIGCONT sequence %zu times\n", N); + while (N --> 0) { + ATF_REQUIRE(kill(pid, SIGSTOP) == 0); + ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(!WIFSIGNALED(st)); + ATF_REQUIRE(WIFSTOPPED(st) && WSTOPSIG(st) == SIGSTOP); + ATF_REQUIRE(!WIFCONTINUED(st)); + ATF_REQUIRE(si.si_status == SIGSTOP); + ATF_REQUIRE(si.si_pid == pid); + ATF_REQUIRE(si.si_uid == getuid()); + ATF_REQUIRE(si.si_code == CLD_STOPPED); + + ATF_REQUIRE(kill(pid, SIGCONT) == 0); + ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(!WIFSIGNALED(st)); + ATF_REQUIRE(WIFCONTINUED(st)); + ATF_REQUIRE(!WIFSTOPPED(st)); + ATF_REQUIRE(si.si_status == SIGCONT); + ATF_REQUIRE(si.si_pid == pid); + ATF_REQUIRE(si.si_uid == getuid()); + ATF_REQUIRE(si.si_code == CLD_CONTINUED); + } + ATF_REQUIRE(kill(pid, SIGQUIT) == 0); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGQUIT); + ATF_REQUIRE(!WIFSTOPPED(st)); + ATF_REQUIRE(!WIFCONTINUED(st)); + ATF_REQUIRE(si.si_status == SIGQUIT); + ATF_REQUIRE(si.si_pid == pid); + ATF_REQUIRE(si.si_uid == getuid()); + ATF_REQUIRE(si.si_code == CLD_KILLED); + printf("user: %ju system: %ju\n", (uintmax_t)si.si_utime, + (uintmax_t)si.si_utime); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, wait6_invalid); - ATF_TP_ADD_TC(tp, wait6_noproc); ATF_TP_ADD_TC(tp, wait6_exited); ATF_TP_ADD_TC(tp, wait6_terminated); ATF_TP_ADD_TC(tp, wait6_coredumped); ATF_TP_ADD_TC(tp, wait6_stop_and_go); + ATF_TP_ADD_TC(tp, wait6_stopgo_loop); return atf_no_error(); } Modified: vendor/NetBSD/tests/dist/lib/libc/t_cdb.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/t_cdb.c Wed Jan 11 07:46:01 2017 (r311921) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Jan 12 07:21:58 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 718F5CACCA8; Thu, 12 Jan 2017 07:21:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3297D1487; Thu, 12 Jan 2017 07:21:58 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C7Lvfe021040; Thu, 12 Jan 2017 07:21:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C7Lv33021037; Thu, 12 Jan 2017 07:21:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701120721.v0C7Lv33021037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 12 Jan 2017 07:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311965 - in vendor/NetBSD/tests/dist/lib/libc: gen string X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 07:21:58 -0000 Author: ngie Date: Thu Jan 12 07:21:56 2017 New Revision: 311965 URL: https://svnweb.freebsd.org/changeset/base/311965 Log: Commit updates accepted upstream (NetBSD) Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c vendor/NetBSD/tests/dist/lib/libc/string/t_memmem.c Modified: vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c Thu Jan 12 06:58:31 2017 (r311964) +++ vendor/NetBSD/tests/dist/lib/libc/gen/t_dir.c Thu Jan 12 07:21:56 2017 (r311965) @@ -1,4 +1,4 @@ -/* $NetBSD: t_dir.c,v 1.8 2017/01/11 07:26:17 christos Exp $ */ +/* $NetBSD: t_dir.c,v 1.10 2017/01/11 18:15:02 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ ATF_TC_BODY(seekdir_basic, tc) #define CREAT(x, m) do { \ int _creat_fd; \ - ATF_REQUIRE_MSG((_creat_fd = creat((x), (m)) != -1), \ + ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))) != -1, \ "creat(%s, %x) failed: %s", (x), (m), \ strerror(errno)); \ (void)close(_creat_fd); \ @@ -75,29 +75,40 @@ ATF_TC_BODY(seekdir_basic, tc) /* skip two for . and .. */ entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + ".", strerror(errno)); + entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "..", strerror(errno)); /* get first entry */ entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "first", strerror(errno)); + here = telldir(dp); - ATF_REQUIRE_MSG(here != -1, - "telldir failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(here != -1, "telldir failed: %s", strerror(errno)); /* get second entry */ entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "second", strerror(errno)); + wasname = strdup(entry->d_name); if (wasname == NULL) atf_tc_fail("cannot allocate memory"); /* get third entry */ entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "third", strerror(errno)); /* try to return to the position after the first entry */ seekdir(dp, here); entry = readdir(dp); - - if (entry == NULL) - atf_tc_fail("entry 1 not found"); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "first[1]", strerror(errno)); if (strcmp(entry->d_name, wasname) != 0) atf_tc_fail("1st seekdir found wrong name"); @@ -105,18 +116,17 @@ ATF_TC_BODY(seekdir_basic, tc) seekdir(dp, here); here = telldir(dp); entry = readdir(dp); - - if (entry == NULL) - atf_tc_fail("entry 2 not found"); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "second[1]", strerror(errno)); if (strcmp(entry->d_name, wasname) != 0) atf_tc_fail("2nd seekdir found wrong name"); /* One more time, to make sure that telldir() doesn't affect result */ seekdir(dp, here); entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "third[1]", strerror(errno)); - if (entry == NULL) - atf_tc_fail("entry 3 not found"); if (strcmp(entry->d_name, wasname) != 0) atf_tc_fail("3rd seekdir found wrong name"); Modified: vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c Thu Jan 12 06:58:31 2017 (r311964) +++ vendor/NetBSD/tests/dist/lib/libc/string/t_memcpy.c Thu Jan 12 07:21:56 2017 (r311965) @@ -1,4 +1,4 @@ -/* $NetBSD: t_memcpy.c,v 1.5 2013/03/17 02:23:31 christos Exp $ */ +/* $NetBSD: t_memcpy.c,v 1.6 2017/01/11 18:05:54 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -96,7 +96,8 @@ ATF_TC_BODY(memcpy_basic, tc) if (i != j) runTest(start[i], start[j]); MD5End(mc, result); - ATF_REQUIRE_EQ(strcmp(result, goodResult), 0); + ATF_REQUIRE_EQ_MSG(strcmp(result, goodResult), 0, "%s != %s", + result, goodResult); } ATF_TC(memccpy_simple); Modified: vendor/NetBSD/tests/dist/lib/libc/string/t_memmem.c ============================================================================== --- vendor/NetBSD/tests/dist/lib/libc/string/t_memmem.c Thu Jan 12 06:58:31 2017 (r311964) +++ vendor/NetBSD/tests/dist/lib/libc/string/t_memmem.c Thu Jan 12 07:21:56 2017 (r311965) @@ -1,4 +1,4 @@ -/* $NetBSD: t_memmem.c,v 1.2 2011/07/07 08:27:36 jruoho Exp $ */ +/* $NetBSD: t_memmem.c,v 1.3 2017/01/11 18:07:37 christos Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -51,6 +51,8 @@ char p6[] = "9"; int lp6 = 1; char p7[] = "654"; int lp7 = 3; +char p8[] = "89abc"; +int lp8 = 5; char b0[] = ""; int lb0 = 0; @@ -89,6 +91,7 @@ ATF_TC_BODY(memmem_basic, tc) expect(memmem(b2, lb2, p4, lp4) == NULL); expect(memmem(b2, lb2, p7, lp7) == NULL); + expect(memmem(b2, lb2, p8, lp8) == NULL); } ATF_TP_ADD_TCS(tp) From owner-svn-src-vendor@freebsd.org Thu Jan 12 07:26:41 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 066EDCACD48; Thu, 12 Jan 2017 07:26:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EF1F1721; Thu, 12 Jan 2017 07:26:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C7QdFw023384; Thu, 12 Jan 2017 07:26:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C7QdcR023376; Thu, 12 Jan 2017 07:26:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701120726.v0C7QdcR023376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 12 Jan 2017 07:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311966 - in vendor/NetBSD/tests/dist: . crypto/libcrypto crypto/libcrypto/rc4 dev dev/audio dev/cgd fs/ffs fs/fifofs fs/nfs/nfsservice fs/psshfs fs/puffs fs/vfs kernel lib lib/libc/arc... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 07:26:41 -0000 Author: ngie Date: Thu Jan 12 07:26:39 2017 New Revision: 311966 URL: https://svnweb.freebsd.org/changeset/base/311966 Log: Sync ^/vendor/NetBSD/tests/dist with upstream Added: vendor/NetBSD/tests/dist/dev/cgd/t_cgd_3des.c (contents, props changed) vendor/NetBSD/tests/dist/dev/cgd/t_cgd_aes.c (contents, props changed) vendor/NetBSD/tests/dist/dev/cgd/t_cgd_blowfish.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/msg.h (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ptrace.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.h (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ptrace_wait3.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ptrace_wait4.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ptrace_wait6.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ptrace_waitid.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/t_ptrace_waitpid.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_clock_nanosleep.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_wait_noproc.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/sys/t_wait_noproc_wnohang.c (contents, props changed) vendor/NetBSD/tests/dist/net/net/t_mtudisc.sh (contents, props changed) vendor/NetBSD/tests/dist/net/net/t_mtudisc6.sh (contents, props changed) vendor/NetBSD/tests/dist/net/net/t_ping6_opts.sh (contents, props changed) vendor/NetBSD/tests/dist/net/net_common.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_anon_union.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/d_c99_union_cast.c (contents, props changed) Modified: vendor/NetBSD/tests/dist/crypto/libcrypto/rc4/Makefile vendor/NetBSD/tests/dist/crypto/libcrypto/t_libcrypto.sh vendor/NetBSD/tests/dist/crypto/libcrypto/t_pubkey.sh vendor/NetBSD/tests/dist/dev/Makefile vendor/NetBSD/tests/dist/dev/audio/h_pad.c vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue vendor/NetBSD/tests/dist/dev/cgd/Makefile vendor/NetBSD/tests/dist/fs/ffs/ffs_common.sh vendor/NetBSD/tests/dist/fs/fifofs/t_fifo.c vendor/NetBSD/tests/dist/fs/nfs/nfsservice/Makefile vendor/NetBSD/tests/dist/fs/psshfs/t_psshfs.sh vendor/NetBSD/tests/dist/fs/puffs/t_basic.c vendor/NetBSD/tests/dist/fs/vfs/Makefile vendor/NetBSD/tests/dist/fs/vfs/t_vnops.c vendor/NetBSD/tests/dist/h_macros.h vendor/NetBSD/tests/dist/kernel/Makefile vendor/NetBSD/tests/dist/kernel/t_mqueue.c vendor/NetBSD/tests/dist/lib/Makefile vendor/NetBSD/tests/dist/lib/libc/arch/sparc64/exec_prot_support.c vendor/NetBSD/tests/dist/lib/libc/arch/sparc64/return_one.S vendor/NetBSD/tests/dist/lib/libc/db/Makefile vendor/NetBSD/tests/dist/lib/libc/db/h_db.c vendor/NetBSD/tests/dist/lib/libc/db/t_db.sh vendor/NetBSD/tests/dist/lib/libc/gen/Makefile vendor/NetBSD/tests/dist/lib/libc/gen/t_fnmatch.c vendor/NetBSD/tests/dist/lib/libc/net/getaddrinfo/Makefile vendor/NetBSD/tests/dist/lib/libc/regex/Makefile vendor/NetBSD/tests/dist/lib/libc/rpc/t_rpc.c vendor/NetBSD/tests/dist/lib/libc/sync/cpp_atomic_ops_linkable.cc vendor/NetBSD/tests/dist/lib/libc/sys/Makefile vendor/NetBSD/tests/dist/lib/libm/Makefile vendor/NetBSD/tests/dist/lib/libm/t_ldexp.c vendor/NetBSD/tests/dist/lib/libm/t_precision.c vendor/NetBSD/tests/dist/lib/libpthread/Makefile vendor/NetBSD/tests/dist/lib/libpthread/h_common.h vendor/NetBSD/tests/dist/lib/libpthread/t_mutex.c vendor/NetBSD/tests/dist/lib/librumpclient/Makefile vendor/NetBSD/tests/dist/lib/librumpclient/h_execthr.c vendor/NetBSD/tests/dist/lib/librumphijack/t_tcpip.sh vendor/NetBSD/tests/dist/lib/libusbhid/t_usbhid.c vendor/NetBSD/tests/dist/net/Makefile vendor/NetBSD/tests/dist/net/arp/Makefile vendor/NetBSD/tests/dist/net/arp/t_arp.sh vendor/NetBSD/tests/dist/net/arp/t_dad.sh vendor/NetBSD/tests/dist/net/icmp/Makefile vendor/NetBSD/tests/dist/net/icmp/t_icmp6_redirect.sh vendor/NetBSD/tests/dist/net/icmp/t_icmp_redirect.sh vendor/NetBSD/tests/dist/net/if/t_compat.c vendor/NetBSD/tests/dist/net/if/t_ifconfig.sh vendor/NetBSD/tests/dist/net/if_bridge/Makefile vendor/NetBSD/tests/dist/net/if_bridge/t_bridge.sh vendor/NetBSD/tests/dist/net/if_gif/Makefile vendor/NetBSD/tests/dist/net/if_gif/t_gif.sh vendor/NetBSD/tests/dist/net/if_pppoe/Makefile vendor/NetBSD/tests/dist/net/if_pppoe/t_pppoe.sh vendor/NetBSD/tests/dist/net/if_tap/Makefile vendor/NetBSD/tests/dist/net/if_tap/t_tap.sh vendor/NetBSD/tests/dist/net/mcast/Makefile vendor/NetBSD/tests/dist/net/mcast/t_mcast.sh vendor/NetBSD/tests/dist/net/ndp/Makefile vendor/NetBSD/tests/dist/net/ndp/t_dad.sh vendor/NetBSD/tests/dist/net/ndp/t_ndp.sh vendor/NetBSD/tests/dist/net/ndp/t_ra.sh vendor/NetBSD/tests/dist/net/net/Makefile vendor/NetBSD/tests/dist/net/net/t_forwarding.sh vendor/NetBSD/tests/dist/net/net/t_ipaddress.sh vendor/NetBSD/tests/dist/net/net/t_ipv6_lifetime.sh vendor/NetBSD/tests/dist/net/net/t_ipv6address.sh vendor/NetBSD/tests/dist/net/route/Makefile vendor/NetBSD/tests/dist/net/route/t_change.sh vendor/NetBSD/tests/dist/net/route/t_flags.sh vendor/NetBSD/tests/dist/net/route/t_flags6.sh vendor/NetBSD/tests/dist/net/route/t_route.sh vendor/NetBSD/tests/dist/rump/modautoload/Makefile vendor/NetBSD/tests/dist/rump/modautoload/t_modautoload.c vendor/NetBSD/tests/dist/rump/rumpkern/t_lwproc.c vendor/NetBSD/tests/dist/sys/net/t_print.c vendor/NetBSD/tests/dist/usr.bin/Makefile vendor/NetBSD/tests/dist/usr.bin/config/t_config.sh vendor/NetBSD/tests/dist/usr.bin/netpgpverify/t_netpgpverify.sh vendor/NetBSD/tests/dist/usr.bin/xlint/lint1/Makefile Modified: vendor/NetBSD/tests/dist/crypto/libcrypto/rc4/Makefile ============================================================================== --- vendor/NetBSD/tests/dist/crypto/libcrypto/rc4/Makefile Thu Jan 12 07:21:56 2017 (r311965) +++ vendor/NetBSD/tests/dist/crypto/libcrypto/rc4/Makefile Thu Jan 12 07:26:39 2017 (r311966) @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2009/02/13 20:58:15 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2016/10/14 16:09:45 spz Exp $ HELPER_NAME= rc4test HELPER_DIR= rc4 +CPPFLAGS= -DOPENSSL_PIC .include Modified: vendor/NetBSD/tests/dist/crypto/libcrypto/t_libcrypto.sh ============================================================================== --- vendor/NetBSD/tests/dist/crypto/libcrypto/t_libcrypto.sh Thu Jan 12 07:21:56 2017 (r311965) +++ vendor/NetBSD/tests/dist/crypto/libcrypto/t_libcrypto.sh Thu Jan 12 07:26:39 2017 (r311966) @@ -1,4 +1,4 @@ -# $NetBSD: t_libcrypto.sh,v 1.3 2010/11/08 19:06:12 pooka Exp $ +# $NetBSD: t_libcrypto.sh,v 1.4 2016/10/13 09:25:37 martin Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,7 +49,7 @@ atf_test_case bn bn_head() { atf_set "descr" "Checks BIGNUM library" - atf_set "timeout" "300" + atf_set "timeout" "360" } bn_body() { Modified: vendor/NetBSD/tests/dist/crypto/libcrypto/t_pubkey.sh ============================================================================== --- vendor/NetBSD/tests/dist/crypto/libcrypto/t_pubkey.sh Thu Jan 12 07:21:56 2017 (r311965) +++ vendor/NetBSD/tests/dist/crypto/libcrypto/t_pubkey.sh Thu Jan 12 07:26:39 2017 (r311966) @@ -1,4 +1,4 @@ -# $NetBSD: t_pubkey.sh,v 1.3 2011/06/09 05:25:21 spz Exp $ +# $NetBSD: t_pubkey.sh,v 1.4 2016/10/13 09:25:37 martin Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,7 +49,7 @@ atf_test_case rsa rsa_head() { atf_set "descr" "Checks RSA" - atf_set "timeout" "300" + atf_set "timeout" "420" } rsa_body() { @@ -60,7 +60,7 @@ atf_test_case ec ec_head() { atf_set "descr" "Checks EC cipher" - atf_set "timeout" "300" + atf_set "timeout" "480" } ec_body() { @@ -81,7 +81,7 @@ atf_test_case ecdsa ecdsa_head() { atf_set "descr" "Checks ECDSA algorithm" - atf_set "timeout" "300" + atf_set "timeout" "480" } ecdsa_body() { Modified: vendor/NetBSD/tests/dist/dev/Makefile ============================================================================== --- vendor/NetBSD/tests/dist/dev/Makefile Thu Jan 12 07:21:56 2017 (r311965) +++ vendor/NetBSD/tests/dist/dev/Makefile Thu Jan 12 07:26:39 2017 (r311966) @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.11 2016/07/29 06:13:39 pgoyette Exp $ +# $NetBSD: Makefile,v 1.12 2016/08/14 14:55:42 jakllsch Exp $ # .include TESTSDIR= ${TESTSBASE}/dev -TESTS_SUBDIRS+= cgd fss raidframe +TESTS_SUBDIRS+= cgd clock_subr fss raidframe .if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE) TESTS_SUBDIRS+= audio md scsipi sysmon usb .endif Modified: vendor/NetBSD/tests/dist/dev/audio/h_pad.c ============================================================================== --- vendor/NetBSD/tests/dist/dev/audio/h_pad.c Thu Jan 12 07:21:56 2017 (r311965) +++ vendor/NetBSD/tests/dist/dev/audio/h_pad.c Thu Jan 12 07:26:39 2017 (r311966) @@ -1,4 +1,4 @@ -/* $NetBSD: h_pad.c,v 1.1 2010/08/04 13:15:15 pooka Exp $ */ +/* $NetBSD: h_pad.c,v 1.2 2016/10/15 07:08:06 nat Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -56,14 +56,14 @@ main(int argc, char *argv[]) ssize_t n; rump_init(); - audiofd = rump_sys_open("/dev/audio0", O_RDWR); - if (audiofd == -1) - err(1, "open audio"); - padfd = rump_sys_open("/dev/pad0", O_RDONLY); if (padfd == -1) err(1, "open pad"); + audiofd = rump_sys_open("/dev/audio0", O_RDWR); + if (audiofd == -1) + err(1, "open audio"); + if ((n = rump_sys_write(audiofd, musa, sizeof(musa))) != sizeof(musa)) err(1, "write"); Modified: vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue ============================================================================== --- vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue Thu Jan 12 07:21:56 2017 (r311965) +++ vendor/NetBSD/tests/dist/dev/audio/t_pad_output.bz2.uue Thu Jan 12 07:26:39 2017 (r311966) @@ -1,1035 +1,1040 @@ begin 644 t_pad_output.bz2 -M0EIH.3%!629369%IQ#X`MT#FU'+1O7<;MT;NYNNYW<[N[OO;K>W7+>^Y[M;[LV]??=M] -MYZ[MMMO>WO;6=W.KIOKNUF:EFEJVK5I"+:J;8:B5K1JJIJVUJV,K6IK5MJJ6 -M--%5FJLS55K158M5K:U5FU4RVMJ(K0BK-6Q0-L+6JVLJ6MK559M5556*M54J -MJMIMFS-"U6LJRUBRJJRV;55::M6U[G=0JI5-4W66J=KVZ]LNW=]W=FW=S;YM -MDO<]LW>Z[WW%E@WUOD-[G!SN<'=W$CD8@[KN<36:PVO=W;*I*E%4SC -MV]XE)5!54*"@*JJMH)J0H*`4&V4`!11(``!4BJI27O>Z(]5()`22)**%4``I -M0`!*B5`D(DB*5@:5``AH`"8F3"8`F0#3(Q,FF@#1H&(&C)H-#3330!ID,C`C -M!-,F)IIA`TQ-,!,33$831@@R9&$T`!,`@TD@FC$``````&@```:-`3`F$P0T -M,$!@`$``#03T!H-`U,`33$TTQJ-,$P$P%/$R8",!-02FDI"!$QJ>S,`0`$!H -M:!#":$Q-,28$V@0-`34]$:;*:>D]1I[0H'HGDRC:AD&@]0&@/4`]0R`R,AH- -M!H`VHS2`:`(4E)*)&R>J-^GBGL!2,:::2;48GI$IO%)Y)Y)[3TE/U1^FFC*C -MQ&H>IZC$T,AIZAZF31H>4``'J!DTTT---```#U```-`9#0T``T!(I((28-)B -M>A3TTF>14]3VT&IJ>R,@F$TQ'DT3&@FU3\4GFDT>J>333&IBFTPF$T]$-,32 -MGM-4]IDTR)ZI^1I3V332;(93-4_5/R>D#":GDU-D:FIZ>IM3U-HTH)-25)%1 -MM3:3]L/-2$FWD4S4U-B:::FB;4V3"4_4R4>H>U0;4]JGJ&33T]4T`#(T-&0] -M0!HT-`_5`!Z@T````9!IH:```````_Q$/Z:,D&8X$&L.'B.D00+!M12TQ2"> -MGH4)$$U776'(,NA5T"`@H&+#%`;<'^;2<4$`CK#I>?6\SY]KTOQX,LDD%=#] -M=K=W[.S5.*PD:9EE+#8V,8RRL@"_3]+%\'Y\OE<[XY25)9,&QL(&#!(B3@T. -MCTYNF5=LVA0D0'QD+"T]J]AX/R0)P"P$\13QX$Q,/GR(O5_U5.R7J.DE`0K( -MEC0PL$_ONQ0)A@@60_";^_OE&;Q_:\_3BPGL8?\=O:KUNG!-MF0A03X9PPMX -MF'WE;&SK)O(N2J"`80_J9Y6*=6(?DZ7*_=I%;(JB,Q$/X5S@P$*M6IZ6$>F. -M&L;Y&C($S\KC'O`Q#')%M:;\FTP-4ET5[;UV7JU<$0D7*H[&KC\]MFO+$`\& -MK%L^,?8,8N-=10VF1`%ZT<0V#-6C#OCSQ<+:D1!\*'M+14@>!P\/!T&+LDA` -MM>S!`Y))"PU-A7RRF1#XLD2TAAXFXPES0HB!="\G,MI5;+<6\:#8!?:^9F[% -ME',L8MFO;T)7.GR!;_`/D0:1+;UF7Y[3=J&V"``O/U.NE!"#*9$.X86#N,8I -M`#2>Y2VR.+WM3?[`$7UIE`R.12-/ADE3=;A$1!:]O_:**7`0NS1[]JFWB&;, -M9H]?3J1$29(D`##!T*ZI]K?Y2?W`!+<"-:V[)FM&)64CY`27=R&1(43Q0:.3 -M57.RL\G5'0B!%DUBC6R2:/8GH36'00V/_3FF$$BHG7;+O%I3X!8&S2LK'/>1 -M8OS=Z#;4Y$43X>>W=G@!;JCZJXZ+CG@"_SV[O7ZI=P8DJ:+_5D',I4)`;G=/ -M'LMX@K6`@UZ4;>CQD0!>G1L^>LPH@:>W<=.CS^7@)?+I``+POTESZ]3/ZA2! -M75?3@*BYG9V,AZN4Q4&IJ@(<=6[N*2:B4T)ITB]VC:@%[*8[4SK5EZR_]5WDD@B*BP]Z -MM&`(P"9NX?<(%_4:IX/(`!5M=`Y*J0ALV/=9UEH,?/)])PN4S.3Q*JX(OE@. -M2:Z?"+C-^RQK#(AH^YZF'"(N4H(.K.`QOV&@=HI"`,-P0@1,W5)#ZE916Z/V -MDMCV8^`4YS\-7R*L!D&Y@OT/@[O\HB+8?+K:EP*>6KQIHI#9&]*\I@AOG`B[ -ME!(1^\3.":TV[8($^"X\PV,D"7'@5IA -M_&HS5?4^K5(@17-'D>"%FJ8^%HE-%-GP07=Y"M@$+JL?O=<_H_;+X"$$)/+$ -M(#&Y%>VSVDIS6@!!PH[W&3U(!SXV;RV<\".VZ\"A!%NDZM&LY*JMTR0+GH5% -M-UD0(OWQ1PM=G=;!V2D>(AEP2@)MH6&EBU77QS:R7B0`5P)?N)=]4'"%!``L -M6>;IEY>3]?^J#F8Y((@VJ'9(3=(Y;EL/U*W3_M""&*6LOPA)`2G2\;XHZ?,1 -MN@9?--I!`7BU)`)6&?V2\RV=GPPO_+AI`13_]&!9NI8WF&D8=EAD>=1@A]-M -M2*,@.#^UP_^]`1,'Y@7\>&O=GPWW86]K`46*"9"107H9R&2FIS4QC(C9?S9E -M0`/+,`K\G03>F3F0D&K]O^I"WC##9]90$6;P/K*\,L":#V^TRY\OGS?!Z.>D -M($R4A>S*K^+BN!7^#D(`!):^.YO0(#Y_7L:3*O#7:[G5>S#2DD#:[ZDW8'GX -M2)284[['@*/]+TCLR$C2\R=8*W5,5CI?!P%6`2B(:+04!>;6K6S6]](_;T]*B(`QH.-:D+F0Y(DOX[O8A^D&ZOMFWV'@4'P8^/`G6' -M4MT7D&'K95`"'TM;8HC'LCRM8)T%MM8^D+N/=;2(V#3NCX`4ISMR_2ZY!(<< -MODMH/*.`-_8\FLT9T`6L6N;B -ML+\].#\V8R;3BE920@#2V1+PA(E.R3ONAYKUN//A^GSGB+*OAX\D`:G4 -M:N6A>'`4Q\%%^V;+*\"K@=4D2`OFKMZ-$0*_[`*>S-)N7WOTB9UK:P8!A_-* -M!#IK6Q(LWF_4F>(UJO>>(9:Z7`0D,+EMF0/N3>?#*1()V)O8Z86&8^!<^ZRS=X!-^V>ZVP;`ZT!\%Z,_M4O]>(!*Q -M%78V.MY[N[_RBAL(JLA?)W_"-+S/ZED0 -M;/3I;2@T6N\'?(;S])2EU,C6-+$@`&SZ+)688"[5QVM98;-GB%YN\`AY&9IE -MW6!=**T2J@+$5]."ANQ]8K\>S;J0'=Q541?&&5H]>H.:O/8H/BC(H+5TL-!% -MC&+N0$H<`3/0LN='R;P@R<.!'<-C*;7FPP#W3-Z"8=_X,P_=A -MXHKO&(2"G=D,QU$C((T6%6GP&!#S"XF5-4V6YAT`'5EB!2_H5R+\+"TB'N$` -M+T%X4&3]-]G#I0>*@2%GIH7 -MSW9O]0D`OIGB+^\1)&P36=Y]RD/%JD1%"5@`[_O_LUM7*JV1\K6;+I3/![/Q -M.#`S2;N_U[:(B>+8XRN,SF.'J%WW8:0"&DUMP7D:"XONX&O-1"LFTT^RG -MR+S^5?!8/;3Y9K[##DDM+1(B+E*B/MD%:Y4H%W4-P>!,]+^'3!:;H\PZRRFC -M,*N]1$`Y3OHLIC/@I?18G7MEW5J04*WZE9NVEJCX]O3A@!"*.^XTQR#K_H+B -MK`_GST-]:GHOXGP6;!7_\>WC/V4[-<>[Y"(A'>SUX`+BNS=W40.$/SF;@#%7 -M/G9ZN`.E)(9E.O"`OX'_/=0TANWS\@%ZGZ"Q`@[-KB[#G4C"?(+B9O2!?3V? -MU(RWC7&#H]VG6T@"3_+P0#-+4"/+:-K195`'/]=0!>5EY/E\%"0EO%WYN;I\ -M,!92L^L[-@(=H^*F`-%2+>M'^T?2W -M'C:U,6=Z7MD- -M!S,3Y&RP>BX!RT^M!(O4_R)^"A]\?+TU4;M'@"5;;:ZIS@]DEP@`GW#)=.K] -MO\7W&3'^J?:TH`>FSXA%M?%/2O67]%.K"6EKOD22)U:K(B^/TNND%OAGR,>$A17>EHS;U89'SEZ,TK*[C@G2H>W_/QJP2&S5GGO -MJE2]X=O]U=K22`\/)G.A*\;1D5Y8TB9-1"S]]V@!)?#_OC6ZNP(-L@?M71N) -MF5SY`+]]\X//8((6RI`6'=Q>`,79HH,_*7BDQ5B$ -MF#C;\$,9E\_=O%KQ8180+*XJ:0$1[TM:]]/]?3>UY$I,\SDOR,#I1E=JFS"! -M)D6KO$6H8D4OU,[!)!$>B\C[>U3$!Z^KJW(<\.5K:U&!G41!!%$5_Y/6QC+5MNVCN4"&]Z]DJO`(9_'6]7?*ZF8/$&+R1H`D$,1>.+._G@W*)DDB;]VG`*5YF7 -MWD]IU[X\&5T,-")):A_]LR"]=;MJN5!LX6;D=]@@KQ`@^-G`>;-=H$6+3?0; -MYG3YLP?<=K)H?)5`"JW_5R6!`Q9OZ8Z#_17/+4<,$0*_:]M -M['1B(#.(QC+-;7CH'N\LREOH(>W0-/OY\=&_S[F9)"7_77XA@06;X>OJ&IOK -M]_"/D$]\6"(#S']/.AK:OAKS"CC7-%WN:`*S+_$Q\,^Z5>:9-EA;.ZD`(GSF -MIQ:L*`\3U-]F](KQ2F<&;.+!Y/Y?&`$JI5%RF94'0/-]9,`:CO;'C<7'S6Y/ -MC(IK?C@3Z*)/UJ'6-^%6!`"074SY(^7^GX$0[^K\-)/;:';#_=4R9TB+O0^G -M[]]7D3#&W$Q$WJ'_>WZV-KK`!WGEP^O)3UHKSY6'>%*ZJN$_$'M>40"Y'4TKT[6!UHFC)`&?/)6ALNE4_=YKB+#=*OU0?%/4DSB6RY5I(*1T -MBS_(D<8`16E0,O"KK9W:_/'P9`7LW2]VZ=L6P&CX1W4GLP1+"_P[R>#N[U"/ -M6WJ(6I\K#MUC,*=$& -M1:KI+^\1_-\P/5`$`\H[779:X^25NX"RC<8`-!NW(+E)7#8<-$0NNC.=8%;Y -M""W5''H1A\USP=7IXRZHLP`5SU[KII-+72^YR&2"Z82`/&[YW!C^'UK5S(MO -MW&B.-PG"G%8BH=8XL2#/=7#/E$X>/AR(5Z^AT]%#>CG.$(E5&]2?[<@D>*0/ -MLZ<&PTK&10ST<\S7A0!X<3B>_3^EJE_\RHP"TFVYCEX^77UK9&C9T20A*]99 -M7K6E``:<-TKEE8"N>WK92J@43N+VH+CGZ#],-YHU(37CX]<0)-RJOCFS%/>< -MAQN%3[ZBT6R(:O24[5N6@(0PW=6K8XBYT._;F*0;7N`AGO:TU&>^N%)?1CJ+ -MGA$!F/HR`O_,-OQ]:S+*EE+7F; -M)8:Y8$Z23!0[=.AU<55;Y+G00EZ:%X+;4.QH1$7K^V(=S>;QJF5!%*(66:M6 -M[]<2>?+NA5:@B'.L/3K#D=IF8CCD"I:=]2]C(V:VB`Z -MOS\_5M\P`2K/>9)C:#G,^D1A32(@7>9.&JW(0D0'@NOJ*)ZVW.3&/)46P09QKXZA5D`53`!D=\)LX*R1 -M!$VM(PTC]$J02F,8P,".;C\K*?9X_7%;MH6>P6<2HYV8U=JFL3)L0P;&-M=6 -MQ"QWM=K46:O@8B=]_\<9C+E\'NRM?3;$*AU\"9&FVFFQH!@"],<7:RQP[:(X -M(.&1#:N&(>`2H-SY3E0:Q```RU<;/1R="%-3!('Y%^`@'U3/^:?U'4DDD^2K -M_QSJ>F@<3(!_5_39XX%+[S0)3Q!$2G$(CR,W5,0ALWVR5@^PNW\Z?G(" -M`E5V)'F?/MYL@H'05?I>U/0;5$JNX(9@PLAMWF/]5Y=G2)KZA/W]\6KGP7TW -M=W;`93G$(W[@47APG.]9PXDV619K+/GQ=Y"H#*8MA2K<.U0:]J -M:[P_S0(`0S@3L$R/6W=-GT;+A'"+='OL8`Z36_XSN)T+M;(@*I\0Q$P[W.QU -M75`U^S3T[*WDD"J.S-BXH)4"-NVA`QPE7A^H`7^G#K^Y#]GW?Z@6;MLN!LH;Y8V[TBAUSY!77`-3DZ).?CA%NN(3U]N[8L)PO7=2[[? -MK?+IP4G)+./7E[L39T%%XY?YT$-0U[8TLY4Z3UDGQ6P.(=`BEAE9/#\#15F/ -M`>_ME9OM"".@E3DR84IGAU)L@Y9W1:M_[OX_)?[G)6:Y=`;!--*(GTMVGOC@ -M"M.:85V$\*TYC78\0T]2+KO*6=_-F75H3!"RI[5E%MF-L:((=8,M2&70#ZW- -M$O9J/0@H[BV!#T_DCO-3-M>J1$32[58X'"UIXHV&4I<18I##UHY6XXEJN&P/ -M[+_)I,DH:BVYVQQZ_O,X=!-]/8)XA,][37V[KG"[%TA.S(Y(\1:.1<'+8>P! -MTC2B]U(SYL#9%1^*\-#T-R]I/8`]M.T2RK3'>,$!HM`\3#=>9@\`-?GY`S\] -M'^7GF;T%I/11:4V6BU8@[1!]C9"PV\A^?P9`WL8!?79D"YCUK:`64G<=<^![ -MM#C.5F/_>8BBW!5>]G?,QPK`MOE8>+$X\S@'%B3EB66;K,\3Q-+A\#K:&\@;TVTVP'I=^: -MY=HX3U'3"E-E/-<7;]7*'2RO(T-)_@5+]/#*EW,7;/R1#'2:/\X@06H4X2+? -M`);^=S>ZPX(A-FAP#!KYMMM\W+;4D_I/>>`'+KI;G\$G;W7IKB3!)@6L?=9B -M8*,D]4:LO-(+-(:$GC_"'/22E/38XZ!EYB]IL#7&,F0SV+_9H#_L$NH_NN$; -M`YY;>`WRW)2(R_EGS0Y>4R/2%0UT!H>XOSJ#,5UEL#1:S819LJ2Y9YXR$;:* -M+2R9H5&H;4'TW\@&]O?C08ZIYG"M.?O$WF_L;$_+KZ/I@,;.8VO8-DAQLE_@ -M*F+&8>S(8K^[BR.2[.:J/%0B[B^IOZ/H"=7ELT(5Z3P-M%;0Y0'"PW0%B^-L -M^CHCB]9>CRF/0VMBJ084\S(]"?`EVGY&D]WJF)<7_849]9\T%NQU1^_WH&,_ -M5^:^K6L2FR(J\PH/W*3)P.C^9',6$)OO0-%D1.;GY>Z%(/[H^5!\IJCTY>TVV!=^XZ] -M/D?;R_(6)'WW?`>S2].TI:(%$?*%L3XD%Z`_[1*CVU3[S"EBV,S3O&V(D7C? -MCX7#((A-/5OOM."4.=)P3%-$'!ZQ;SBG8+&8(;Y]WO/QB!8>_ -M1`09PN#_L;#77^>^Z%CSS_RF*D%4_LM6Y\0W(7R&+SJ10?Z[!0X^R(2VMM<7 -MZ#@QIZ_ML697.F[D/>_WWC^,Z;,J'`[$<)J(QAJ.R^W['JQ@*YSF!LV#'(0G -MINP0WMHSPE6@)+;2#N0I#RQP\XZOY8'[VWX$,"E;-W,?+W,3.!;[=@838['X -MN'5^;;`/^,,G%+:5H+V&^EX>L`)7RZ=4\T.LI[4M4,2"M_G>?%I`_EHW'7=U -M+'\NP(?YXV&)GD&EZ'@@71ZH48<^!BD^E^U2EAOE3@"A4:9C6">_N/?-+AH: -MV$R>6I6S($%7H_C2_"R$&>,CKU`#E3X^\=.6!@_1^I.?=:Q_$04>S+1J?7[P -MOT8K<\G7.YV1#T(@W_3_Y[^,B6: -MEF)6-335TB(-Y'S(@B&TWK?H@"KS3:49A_AC%$T#$SB3$_&C7A%PGX%@U%E# -MH3OAQ,#V+C%%TJMF6WRU[G>I.+H?NE^<7ZO7[4$JNYWJ7W[J"60W_3]NLWF+ -MRZ7*TDY,V)/9C`GOL=[=+.]8$$0`E5TIH!H:),G*`Y\F'SZ6&"/IHYD84M7- -MB@SK9"-\W8^A%&3A-3T0L_8UBV6.(/_'+6Y_4<_W0:X/95G9K[]6,VW;)RW[BL&"4QI*+FQIL3-;]0MTG,P&5];4I-/<#MZ[$G6F\QXH3/S1?6PP?`?+Q$ -M]R*YE='TQ>X[,Z+H34N>&#L0FK==ON$!U>%8>&^_LQ7N:&03DMT_&/"P/5EL4ZUQPD"B_ -M&<%C2OQET?ZHSC`WFH*3S?D6R3B,6V'?[-W>B$Q@W>M,_N;\<`M2)=NG;C07 -M>9]X%OU`=]09"9P(UX,A^TM<,V7&O82A?MG/#`EKFD#9CS(HRZ_O6S(@.2:6 -M92'[SCA]-D@A0XX!P&6[(P'*M+1[4=/><0R]>^8MH)B>5ZXD?R9(8"OG#+]/ -MXU#^`[.XMGMC-!X*,,;J-L\ZJ[9JT&"-'.[P5%`A]1L53J-Z8O^1B&F(?/F? -MEZ6-.7H;)E,M&+ISG+`U?ZT)VCVXY'G]3\C'Y&&]UV(.+R!'\3#[M"',]^NSG/W!-`R+(=B;KN?>=B0!7YM]TGPN?R]6>&E? -M2\]9^5R5!!-?`^QG\F?HCEEH)^F(2RF_6)I0OS;,8,&8'4?ISN> -M4>5)YWW/\][[2T/#PW\^+!DC(RF'_+C\3NG0WN\FGH(:C?6_:G#U_-QO`]/L -MS0O9V;_2/OARD3*]*Q#?(@?>WP$_1TUJX%51#[8U%HU5L747&5+ST6H,!2 -M$X;-DZ;MV/:X!CJ#M-XM6U]D;/`Z@0PP% -MF8::)8Q5B+;K[!7`EGD7FR+Y68,^N&P?O`G.GY'PAY'?!EACMOFL9%XRW$LB -M2'AGMOZ+&XPU;+URN9\?W'D-6+ZHR5Y\[7_/)CNNL@J\UM&A5Q%+NN]]&.=% -M$U4\8`_>`>'`,HH/SN[`*'XE]#\?44AD&_N:@Q(@E("%]S%59Y!(SB/1:].4 -MW5K]Z+_CFN-\O"ZRF5<<61,*,QBBQXIKL0[ZB\?,S(&W)JZN4#'B-$WN"P)EZU%:7!\\_ -MG(CG+4Z09+L97)['"&1WNL:^#0DW7G*"RRF!3,OP,:)>2;LNA)RV"3ZU,^R* -M4.IG6(!CK#(+B8.'T2_W^NROX2A*1LH=*[VT&VU\\HRN/SG/#=KGH['/O<.# -M:MD,GO^/']`S!X]Q"]Y&MNP8FX^)U,5ME6[+T>)FM#Q2_S3_%VXB)5LUEX -M>+7;'D@[U-(:=6'&SD-&)[Z=DZAX<8/0;,9:/#^/J'9@J"U5#Z%&CSR(T0)V -MS.Y84,1>/W<3VO2T.].F:1;VG!XQH@Z)_,\(KV&\\PX%;;=Y/2.8S_ZS4_/=LX2 -MVN:NW,>H7RAPLCFW?KW"Q0#G0^A/!= -MP<([\FPL?J-D>"ZJB[,K_26\6@VQVD7L_`CR2IQ76S4JX\.6S6#&)2VE,7G+ -M3%:>?-AUK$ZV[*N&],3ZW.J+FV#:*#KV,^YD]6>2I*C$JJL2\7L&MZ:5Y\?> -MFZC=+!FI!PQTM68V@V7$888RN<*)`:TP=[R\]U$&_C;4F:,-':'75;7BZ?)[ -M:->K&P^#J_ZP.M(R$//!/IKX:D:#WJ/O*#T_!J)VF3#.,JZ\9GIRTY"\23IL -M[7GQWV+W#DZXJ?S*:M^Z^94<4.IJO:%]CN=[Q=&N1;J5O3Q6`BS@%]",K!&? -M;D]5YWW9KDY8FPV5)@E1M^=X="Z=95@N+B?B8A2[V.&;T3V!F^:R\7J"K&^5 -M>B4GI=!W*.@Q0$I:WC\K%/[R=-92FE"N;C72E0_U$DRCA%.MAXU7G#%G=*5W -MI'''Q@<"!KUFH=&EX?'G-2+BX\H72GD2#6;J3 -M[M!IO)0^%X\.1R"A\;JB^=/["Q?9"(*5_A_;RO;D:8MIG2$S]>8SN=@NGQZ!RY9'U7`WG;M>";K1[:9B$VB\<#)XCYV; -M=D8C`ZWY0NRS5^#$]6^RGZ#%!X6[A\IPI9-IA:KV)FG'(/%)6F0^4=H#ORE_ -M*0>K[,L;Z_OVL8YXT+^_I!BDS)"A]8R=)C$#HPW9[!%AT8K$*`W/?%^($=7/ -M/-ZT&8!)T'',A*Z_B'#V'B]3DQ^DB%LP^Q@P=[K[VNN&\-&V'3QK#)OQF7R\ -MFB_T=B?K>K6-_0.T;6*KK4E4X#0C.>C4:EL'),%X?6]^.;BY*,:3(RVI;K0V -MI[FDQ7J;,?GN#^M[3F%'KBU\L#)1LG0X1[*W:)RE3#6CW,.?@//J)#2\"S.7 -M\V1XS`6JQ\L>$'K==I'+F\KS.N7_RHPC6R$*9!3;CI.^%Q=1UM%9F-Q?P-S> -M(&DQZ8'4\=.>PAJ9Y&'[81 -MBU!XS]NLQK6PEH;8R@A[%F-;+C15JNUH\4:WSVWW3D58ZQC'T*'*;JUU&XJ] -M#N=&QG:27'&21/0F)\3F"IFV').61IE7[!M*A;^'0B$[B$\*?;3:B4PT!,MM -MV]HA%3>-R?[A1Y@YT&.I$4SEF+:OI;\2-Z= -ML]CLQ!48G=#\+[HFA=8$Z`M'\!.(#Y[H%J!SPR$VV6OSF^<;N#%^;%&+/.9X -M<1/#3.YW.`TMZ^`)[L%G??@EE0P*+I1[JR1HX-+>6VK/.YF!JF1=*7EX2< -M&\7:DPEVSXTW??#PV/G7),\&,=;;=K]5#?].'AT6,RM<:`P/@U)IC%WH198Q -MC8S]Z`=Z<\:7=5](-56M?`RKAS^Z6_U>.S9=BA> -M)FZ)9&HQ^$]0W`M`C@`MH[9.[]RRC`@'1U3UI.T)PQ?1`T>:%K'RVC:S61OF -M96XXV.DU^PY,-S60)MG3"YC3OQ1/0^5!`.$YAEIHL@@R(=G'A:'QT<;8&&6B0)61_[4IJ!K'%5).TB*[WJ(['O&K_"$ -MP$-C#YE/FZP?AHLWGK#.ZO)7=WF;NSUC]+%,.U^W9IENONCJG0L,UFK*QS+I -M%S&LUI;]C3FAE2]T<$T!A,?%YRAGK\H[/*_Q)?;TJN)Q11Z^0ZXM@CO`,Q7B1->Q(S2S3NE6Q,$\^N-[]M -M1#Z^YM_X?!J&J"7*?,7LP:X$1;"MH6LVCJPR95[HKIT&G2N8VCU_J>[:,:=I -MJ#/6K>VTNSHABWO(Z7/Y-";,/35L^NXO69)D49Q#L]CE5QHC(,4+Q,T.9E6@ -M:5,#D!PM!]1[$]'\A\OH^![X>_)[X(P_1H3YA^>2:6T0BP#\<`OX=I&,1(?2 -ML7WQ4]NC\&D])_,[`,]4^F]_R_(,!I-!(`.QYJ5Y<\^:0[1&>5F:=3<86763 -M!N/,2PEV>JAC'AO9<=`8_-=]Z#%(C&5/W9CQ+BE0`- -M.9S0/H5)3M.4S:$9%/._OL]QH;?'^,3RS')<,<\?MF9[#C7.+@:5Z]ZEO,KR -ME&C4<'I%0M]O&,0GL[;V9P,XS?P2[@;&REA!(_8PSB01DFHU7")L([$DQ&<\`-5A(EH'/YZ& -M=,[$\]=\SCN#4*CN^;=T#K3V883?\TMN,R.2\4'>;]@ZS_72Y[?)_"W>'L7< -M6S9N9LKFPQX5>+Q[H."G=U6,'0O>D]RQTDUN/$"'[M9/W[T+`N8A!'?APTSB -MUX-PK>+,MGQ&37<+7?8)Z6O:AA4LBV5&3&998%K7DR'LO32L%#.]P:9?V-WN -M5F"FOXC?#\V_(()7\#XSU)[\7J,M%BE,%9#(/;5&H!5ML6(*M/+*UHXU]<#U(GFTE* -MIAIAV7%BBJF6EJ'QU#M"4C4X343C7D\K6(DS]"^KIX/PIJ;[N]&0_;AO"[MW -M1YGT_YZW*_/\5:_R -M@.?#1+X.-.[U4RU-((0^J_)?%17?S*GO@H5/`-LFI3L]0&&\"&M>> -MK3+DQ&F*>4+\=]-4F,H*JJJBEFR,^VJH-*J&VQ55U?=10H7!N*"'0$E,@8?D -M0<]8&>G6D=/Z?+9K_1DT?J-A(F!@1WXT)R4QD1AT^U7G946<)I]*P]2=QG[4 -M?J*3?,"%^*QR;#>]SV6%A?:S4VEMRJA.W1CV!+^`G?']ZBKBM1MXM7@4U,X7 -M^:-=#C%L<>8VH1\Y*&+2%M12J_`ALFD'S9_^S,=]FY3N?\74R_+_6+D#0K`- -MT996(1ZC!"&>_NE(M;>W#?"*WR<\F;P<:,$==RB8?65C6S-",BY")BF^G<*: -M^01=&:?=^"];C^^CO_V)=K"JHI^[6K87'QF7-<+]9E -MCXU-JIP89K=QN6ZV+HZJ_%\\^ZQ7M^RFI@CRYG!])\`F+C>`TK]HQSK*WYW_ -M>S(4V@?L.P5IF"2+BJF^D/-8"SE.1BXW,+[-XL."9%:OKI%"RDF>VR>>GEH; -MJ-?AXUC\+B)TS7N7IZ#^P-1^*8PYL\([&0QD6L0FR7W80IY-&(ZM/`O,#(,4 -M6$\C/6FHI[\5ZAU=1J\#V.K?;26[DZ>H3IZAJEA3*FI@(S%>X"@T/W6W\/55 -M`'U`*B3[R1_OYH+QC?'/MQM2M -MQ]E>Y&()C1, -M\JZ-O^KYF1&Y,L$N+Z-X3L\`PK+H\0ZT.LH>'D]K/._PL&MQ<:^N;K`\:%B# -MTD?I(+1L#TB/'3T_.P$4R3L[AY8GZWWZ50??!-3]]JQ`@BB;PX*,5L-A_:I(TIALLN=V?KPE63I3Z#68#WDT#*0 -M""I&=IDJE4$?6:_-4$-UWUDY -M*LR^RI'^7TO'-RPH'381J9M:5V>Z9<8O,$<U!QB!YP79`\>/!3-*Q(*#Z09/T@DE/A&J@HD#Z26L< -MOI9`2@,:;2Y+2P6<1@FE7QM7:*,N'"&"P:9@Y8N_>Y[!6`,1X6X5Z>`?TE3R -MY1ZJN(Y7N3UKJF)57>OWMAGD^E4O_?+VRJ+/(,4H!@;)1&PSZRR(6S4(/UPV -M;NN+-;=)77]FW -M85FS>;!F.S)_5")LW'2CW'RZ+IT="*+5:Z.N.'/D1=]'H;B2'AN<37AXKL+T*Z_9KOR7,/I=-+1_+?NCBO&6NVI^-ITR6QVBZC:97@K&2^6_JV -MF(2A@,"Q3<7%_SXJ]:P2%4H0:7CG#')";RDM,^?+9U3#21D':*7=*RJD5"M# -MDON*3<,;#HE^;A9%@<$+2BA7Q_=E_-IH9B+CM%)'22X<(N=-F[]F?L[WOYX^ -MO?%_!^NE$>+PX_@TQ)T?7#W1=_=&I%:&,*DV$-(EQ.[TY7,RU-I&A+".'68<*R6U[G4 -M:5"4/:5=4B@_RNQWM>EV[4%*:3QRUOC+JW@I=MUU#N,:Q'I/Q/FNY@-'+Q_8 -MR6*,8YE^C@U[.O5SL)H='FT^/@HDZ,USGWLF+\^GYGM-#M&W)Y/:@;7M)W/) -M\EH6.PR'"TEJ\TE>8J,\T6"*(0L`QD/,0Q@8XX1YB!HX""!C0XCK0TJ\ON9Y -M\5(R-SU;YR3\Q]Y$JLKBM(_QAL[!@JXPGA2V[E=JERN_#Q'E;N+I]?/:]@6% -MAA1K*L;7+:TJ/M^##4LS[3&8#C4S\$V'J/!ZMGJLQO%\LE/<^6:M2?+JHHA/ -M?6UBQM&TG,"'$F`@EJ)MH;$_K-Y9]34,[\_V#^#G9M7H$N;ZVK=M6JKM3YJO -M!K?P@3RYE3#I+LIJ?3:K9]?8+;UL&UG%32(SZRQ'VE7_&3LJO -M]_Q^4\@4UA'UVW>L;TP*ZNKJR\KZC3+J1_7%PT^@K>'[+8F1;+%/4TVS'*LPR@H4,,L,PQCU0 -M/[63`H)YB@X!.SR@X!/3S+F=\.DWUABBNIU7.WE`4%W[QV(N_'T>2R*0?+4Q -M7AB5@(3UN?\ND$VJ3-H[MZS.LJ_^_[P#2N+JU[UI>>.N%5@A&1?782V0H>K\ -M[?:VO.OZS7J>I.KO+/30Z83I#NT5"=,!G2T+(`J`&(Q`!`1\!Z3!,8)CB/GP -M>ERR"9^?CGUN?*E\M#JG.R/YK_^4Y6WWV[5I+[QQF6NE&L07E;V/:A-($MF3 -M9[U)?V,DI+">K(3JDLIZB;Z0;YC&2-\$D)54AWP[]5$12!1$8I#OC&3X0=^3UCUL4UC;:C\Y,UE'G^ -MKGAV>S_PO?Q#-AO2[I3XQ__(=FP6?24:T(+8Y8(?"E)E:J*2@E*6=HR<[Z]C -M@]B/I0EK2Q19]?G:7RMI;7WAKMKLMA/OU>)K<>WYZD26[Z5M"]ZLHGC[_'QA -MY7:SZEFD_7S'S/BHNK*)5\?HYVAT>?XGC^1T?'[?17R-3'[O%6R`^3"-A,1B -M<@[LR=,[IQ5(^<"AH0\X$D>>!\^M:)="><^[/J8.=0Z#OL[N-4'2UY7;2)_: -MXWALJV0D`I0N^IUIW;-EI104$;71QVZ.34/"R'/J]-R.!94"2UYVVQ:'*;-,?2HT"5(>+SNAT/%Y_/. -MAT?]W.^?^J1]UZM[%B/44&QH$D8PY^/$C$F!\9WZQ#2$,5$@;!G9:T9"'H39 -MKOQ&0F,`F0B#)GF6XS^?]^^^59,<^4OO!UJ+GN_??DI,1+/0$:84$A`C.(D1 -M])26$[,^I]H^]>UR>;S3FY:.:C<:>8.8YN8G-(C!!('(![D&665K,E#220ON -M20_(`]S,Q/<`Z.X=CHX6P?%YX#OPLAJZ;.JM\?K*C3FU3W90Z58.0*7O4S*Z -M155T:O9/+-$/7D:GH6,.,,=]\)BAB/$Q0$V)H`03H8Q,"$(3,W>!)44#WMY\ -MPS%\^N]-FR'8?,_6?XV?Q9];Y!YOK<>LX$LX,YI#3_JX_^6)E.0AADV+C"-QT$ -M%OWF[P_3;0AL^+S. -M=[:MM[;<\+(K+6K*+53L[0$DDF"TP)`-@!B1233`1DS(LTG!14X(:=(L:SD( -M?@UOHG!'#1X":+-3?:_.8/5R>NIH3FM`CZB0R)--34;-"M#8X'!P;VV:R*A>@297S%1F!T4'F^"[C#R7W67;^\U\' -M^[_&=_]I^A_Y_V]G\WYW,SL^'@^=X;_VY:*BAKEEV03E0E2G3.#4C"$0E>0, -M30/,:/;UH-49*'B6CQ2E4F20;0]DL[:VW>VK1R6_?W-S[#_/K?@^1G?1T/MS -M0S_QO4S]@RJK+GZ)G,UK-3,BS@EJRM*'882TFTE(@R`[,A,%10AT/2FJI"F?9,_R_V!^Z-#SNU;^#[K*^)]E(N7B_X\"\7AKI -M>82&+PD-:S**:$.T*I8A3M&[;"(UCBA$AMQX`-%K+87$T/4R=]RCY-9A8W-( -MV^C..RYZNN43Z_P9HFJ+V?9B/@.SCG)X\.08E!R62-2,+,%`'GS_*R<]J(99 -M5*A0+D(SQ9AXU/5]5/6/'W_F?+_*_TN?]OKD/Q>E9SXWKBYL'9@O(/UG[ -MWJZS:-JYH.%LR6[0K;F>]M"4>.@]H?'X]:-9B&EO'K0&#!-`'Q%/#!P:VQ;: -MU;!%NVXY;A;A`M'@J%U;]^^7;PK8@5ZZG -M"\$"XBXAQKS`D$$Y6IZ+9L$(`BI4\H>5HI/+W';YO;_5GZWU]SXGW3IM6BV. -MA+X7,+JEAM>S%,+T#>J\ZJ(6`&"(K)#8DET*5D*EJHN@)@S%6'@LB<=Q-CV< -M9O[_\C?^M_@]A_DD(;W^'EX/3+=NWAJZ:LEE#52R+F9JHB!D!F(1@,51DF89 -ML*4$"@6`YE.:"0H0,O7,O7];OGP^Q8AN]3\DG.665-)DER23*"":#"&F=W:6 -M9IG=,.S$%E)MQ'@B:@RUC@!P'4AA4+A/#.@PY,3.+'!G,A`X:)Z.W1_:R?6^ -M/A^B.\.YAZ6&S245550/%G+'Q&.O$\XYQ)XEU?'UB!H#Q892FQ!*HA:#25(9 -M994J;^4XS)JIQYZ.[I/-JU>;L>F&3\;\3?7YKKQ/+U![MXNW++%PMW&>Y`0D -M)!<&=!:@SS41IV+0#L`+%).I(,0FD>P2LLV.>71:6I^AJB_![$F:+J]7:CDC -MD(H1R00.!([C.,))),&Y&J:!W`[H##+%<-UE,IC[EFM0$VI+"P:DPIG1@^T^ -MJ\=R.WL7$;"'!Y%$.I"*1VDGA_`?SFLUFSPKM3T-FD*@H;(4RA(;,#9 -M84BR%2,8I#9BJ39V:H*ZLX=DV=7PML>]_*YO1[1MF_A-S?Q*)B"K,8.+02B& -M+`&&*2HPE28I!I#%PQ5%](ZVBX7T3W#7WT^O^G^57L:].E*HY]O/ESNWFC'GS(RH<1H38!0$U`:8$I@FD<&=F+A5A,@8K1,AV+1%0AP:`Z%,#S -M7Y^ILH2HZB]QP^'\CR^]DEEDRS#K*G>>>=W=)IB8.`L,+P%FS,%X)$02/!R$ -MWE,PDTS2J9H;%81BG6OS=[?HW_.ZVK_6_\^O^5N^'=N]E];=WGV%>O":[2CR -M%>[=N)VAVE4O:">50F![4.-0:UA2NA[2(\C)'E[=9VGSK+#R'D\??]#P]_A] -M<0JB;8[=1FW!2;<@]5H#;(BC(;9%),=)CVZ`6>[MTNDZQ:*-%\0ZV3!?KOL' -MA[511Q6)&D,W1N#<;@I-U!1&W`=R153,4)B,SMC)3"D[-V9MUV'I]C[;[GN[ -M>GU_#AY'1FM:RCIZ;,/7Z8]>RI.D=`TA$"=*!0$2'3`DI3EC"=(=,Y4A@69E -M#;-S*80X(0ROV,]T@I0%F>8A\4^/['C\?UWQOOA\TX3J^=[GFR\<1XR]JS/' -MX\#Q^,\9XPU/V?C1R#QK3*2%B2S(:IJ2A)0"PU!JRF@\/9[>YMG5V?0*.J=4 -M39LU):+$9U06*;+5JD+2'50*!"&R0LBQHJ`5#9#9.(VN'A-.K5Y/KNYZ_Q#B -M_2?*]ST]I],XG&X''3@8\`<4XV;,30IQ6XXG&<4I]_,B!T''#%X\L -MG8-%#, -M:@?M$*-XN\"MX5O-V_?1ORW-JC[>'CO?28:=GOTWRNGVCZ6'T/5_#'R#L]CU?-/0:=QXG=F9NL@S=E@1 -MNS*#!;=@;A"J0P'=A@.)MW;C=J/B;MQN\7Z'T;SD-LW-L]_[C-@))YLF/+A$ -M*IREZ2D8B9A)(&I9AY`PD>:ERQ.99''2<9V!SN9AT'/P5R-\S9I9M2_$2)F% -MK(&1?4HI94AB6M(]\FDFA`F8UF.Q`B.!(PL0)P#=..L`X-$H::99XXTPE*3% -MZ_1J4G7U*L'=>UP8.N<%JBIBJ:A4.J'4/%"8#D)L@,I@I`Y#J=1J$*`2H"BA -MWH>!0034$RG)YY\M&KAK82(B%$6[DD,PW1%!NC]%%$=QV=D9G9J.S69V)V02G -ML&8)V`'7&0.)%I`-B7T6M*L+IOIT\^[W<,*VC:-J;2S:-H-DE#0GA$I\,F$# -M@>&$PDJE?CU[.SQ:K_3W^K\7)9[^SLFRK(6=NFI% -M44,I,D!@9-"LA1!9,F%,A02DPE\04AS&(.>S6/,\3WYZ.'?]C^5ZNF/>ZNH[ -MO27P1=YV=C2=G9F8TT=@/7AB!@!V9@&(TP10GL#[$=CAWSE[!EHVY>?WN_M\ -MW[?HHI34SO0]`4!0[NT[!0AJ&9D@*&`2!J&)T,)4.BB>=(WM -MC"074X>#'P1UU%%%?C:-1D<84FU`B#9`[5:VP$@;8)R"MI''?@)G:33:27@E -M,V*PF':/:[7F'5-_?V+$S[CS\.!Y_B5QQN/"XV&5)Q7A. -MR'B)PCC:8#H1JD8B,P324)QJ@Z*'C<>.LM;?Z'K'9[_/HT:+F*7:I#$PPHQM -M:J7"JA6%J,4(=63B/7!Z\]$;"I=B4]<&69@F`QG)TP5S2KK2R"LY2)6MK(?5 -M_`^%>EEM)I`DM(BE4JU!@&\[)#?&R'!**!6(7>"1B<8K`)DS2!+*[I,X26I2 -M5\`1YD2/U+>\<9=TWS;XLP-#H=`:`T(H"30P*40E%TFBIT2!@FNC,M5`8!9A -MG98Y=F7EA@THPCC2+I<-N]-BFVR;S_!W35*2B_1?TPI*54D.U"(XWB?$63B> -M*;,4P79(85`&(9#5!4BM!V(#4U.R9W03U4E)=IH[L_8KV+$5?%&8B!M#;Z^W -M&-N&+B-#M!:3:!6V*`(0D@SW42(V=KHDT1BED5V]!Y9I;LO%K<&_RX<.'-BS -M7;A=OJO-Z#ROC\KY4P"E\H^2!\MJ!Q/+)080F+,)L"O+EF$'EC3E'E\KY#T= -MN9XO%\O^/EC[IEUY"6/3FU-6,9HV&2`C9@2",8C3,($(-4&@N8'$>7L[7QO@ -M_!,WT,PS.JKF%06/H5*51(;,$8L1`L0ALDV4A20J.=0&;5JA0YT[66YGT8_> -M>UOF]OX8"WQ,;8VCB@ABLK9B'6E!U%UFL`-*Z)"=1T]4#MO"?O]S-KZNOB>FJFI%105"35`5#,Z!U0,B3*JIA%("`LG`JAP91][FYRW+N]PJ&R/W?N7?ZURY[OO79['RH._;M-M-=^6$;B(W.Z('=F#@!NS!,$HW5& -M29FW6C=`6XV?)WWHST7HS@=]&7.0YR'?W?#^IWO1M'+M7,=TLU6K>\D0$BV[ -MN6RVG3.>.D]KQZT&*Y!H#4^.1E/'!E11@!;3""TK:<=EC+@0>FYM4[NWL<(D -M19(H\.31EHPW&49CB[LQ<4H=PKN1R-VL!V2$FD2"0C"/$^.52CUL9R -M[\K\,_6V?8_A>7O;V"S9JWH6L].DJ.FDTR:4C!RHI-(&ED$!=A"4,"@AI0I) -M41%)IFEJJB+F<>>FDK/O>KZ?XO9YSW._.PW[]V[:;C=6Z"MSNB$-UNLD)"W8 -M@Z&D<2C<5N*=V;MV[N+=N[[W#O\_VWU?>UM8GIN[\**A5((D544,E0P]#IFH -M3"$:"!V8H#("S$<4Y60YPUF$$5'(Y&XWW:M^4XNL;'6S38,2DCEDDP2X1Y@4 -MT$TR$,3`),PTJE`G`:2DWA54[^&_/: -MM6IRW&_VN'M7O9GO\MG+T_8^GS\F_LH[#KZNO'*,&"NO,#$ZX**`E.N,D<%R -M7J'KDEZ]=.!U7P&CKT;5O9ZZ-$]/U]?P]8O2<1=DT[UYDB<=VG@B<0F2)F%) -MQAD*WYB&"4<;(,`B.)7;QCB4+65+TE_4LC\'A]SI7C(\=C1B'B,Z#Q$0T2<0 -M:#,R3J"%>P"D*0[$J@["*@[-=G1I"KZ)?1QUTFHTXZ#&[>U2K4 -M5+X5)0*"DPD610+`7O04142I=ED*+E8E#A=J] -M%WM%5O*&\19L4J@:0W4FV+,B1P3LW80&62XD1HD'=/&\CH)&DP/>O]G?J]?3 -M.#M12J5WE4I(T$ -MO+9Q=_:DX)!0;HJ<7/B=Z7SJ$J!S$4I@1R`.8%`IEX*;$:45@PQ1HVL]EAM%ITE+MC)'$*:-LA(I! -M&$8J[@\<5:Q'A>0>&O'N'F:NJ2;UV]J6DIQ5^J9(M..,C:.*-1NXY&$8Q2;5VSDY#`4+0F -MU`VP$!V"2C:VA*,MRJ.0P+=VL1W.6V1S3#S2RRJ4E4J3L*44YF.^2#?8VZ34 -M4++0IO"ET--.\WY8;H,WQ&ZV:]K*+A=![A[GCW?H.X][?>7K+MRXL,2XQ27( -MI%"%X"S%"Y%`4H0$)A>(+-P,>IJV^+7PGNGI]WDT7Y#DU<0\1Y3><.#OUAPW -M[*.`.`7#!]B5P%RR0Q8F3,E,X"9Y(3#JZ.IT(U\E*>Q`""`0,ZL/7.EB1?.EPYN+E+N_?[=Z]=)&E=Y -M;LG!X!PF#?OA#A++5)9B2IOA.`-2;\ZRQ0X3A/2[7A[S[>[X^4W>7><9BF+4 -M*Q#:MA:K$ZHZNO#0FO!K2NA"ET]5UR%`0U#&6F-<5!Q:#I$Z=WR^#OZL,W3A -M>Y>]ZHPJ@L799DHEV2#)%4;T>YR=RO/K0:S;ZVX< -M/%A2XTN.*8T&&-+#B=<9+@-'39`/6!J,@ZR$^U,S!:$H92D-0TLE'L!Z -MQ>MAJU)H(GUHD*%]8;9A\>U(&"GK#]F'K7K?:>MF9LQS#CQFPDEB.SAQ=KN; -MG%:M;F6Y;MA;II*6HH=J0$F'8I=V'&&*6!T,%*I!TU%-%-%#VF@$*JLK(JX> -MWR=B68FPSF&4$)*4G@Y,$PD$KIQD!,[H09`P$0+P1VPO`'@[,,.#T.\X%;22 -M7J[F%^0V_*E+$A'(6[DI+,TR221+,FE0$PR3$TP!2;YV0ZAQ#A-#&RM_#,R# -MR<=W#P[W6Y.R8F[C>L+LNWBW-QN1$EV,(WJ`A%D-@A>&+3>FE"]38*B51@'! -MCP8+PZ/#V.]YVOU>3DQ;>9[-ZBFJF#JH2*G14DJL^`[-4[L5)F@TR01L,819 -M"DC)E5`B!9(6)E64&$!`J80@NWK5IK0M;6N'%FB]MHM?B?I5])AW=QM&8>KI -MP<0H0^R"BCJ"Z>AUU9!J;/7^3TFP[AXCU.][7LNG2XUS&6C/&KV-CIS:O'[7'R<$\'!6OO^IISSZAQ -M]=R3(TLV(4AF&8"A,LZC+KV<0-@&0%`0>S,>SD'H[\##9KQZPU.KTLWIU:N] -MO[VO=Q*;IHN8J"PN!BA+)+DLP62)%-BJEF2\4QO+U11>]ZKJ8%SBUE^V>CV^ -MO?%QV\<>O2I4O30,<;V$)/.)"S")%DNQ:8%03:HC%+MS%P/1-M];GU\_N?=O -MI?)[?+]N.GEZ3@/!EGEV3,SS0SI,Z0I4S'IRST^]/5R\WAZ?2WC#6G5O,;I,1;-K0HA=NEF%D$A9DB!YU4I* -M%A<,871V+6O>[YV/%K^&?/_'[^G/+`PF$<4*(F-1),80Q0$`PM03%DL%("D2 -M8CAMEDW*J8XY<"Y2]]'9[7E^Y]S@WNX]SSAY_E<3E%RM-N\/3Y>I8-+1TC2$C11I#LD-I)+IM2FE>HLE3`(NDFD -MDHI.ANDH3!:VZW-O2,CM7<[?O=WE\L\E^SK;INO4561:]H. -M--.K5*SU1-0B:5`U*$4U)$FG502U.,(&@F$R06W1;M,ZP-KW,2(/6850&20<6RY'+9OX% -MW\.[._O*39R]/(9.UYOKU&GO;.S/+.\Z<<@E.)A,$Z9(81"R'&$9#C+D&)OB -M/?LGB\BX]%=V'9 -MDA)IYT(E,I)+,^7?Y>2[VXRN:1L5_=S6:?-GL9V-LS9&P'LF0NLUFA.Q#80& -M1*`NAH2%$4-"6==]!KW9T;V]T6X^@[AXGA-/3;3=V/7M=VLPW6X#H1W9C0%! -MB[BS=FY=34ZG4-4LX5EGIJLC-3,, -MZI2I)FD9#-(1A'@SL2E#.G'=#50(/!D69Z<.&K!O:I:Y)Y8XT16(E@>.-HU# -MMU@8.W;CJ-2]$CB)L@90VPP;5&F<3)\`21R.\F"(\/L6-B+>NO%92C(FC0B- -M((FZMNI=ILP3%-L(2!2&V!A?!F68B8TG=HV2(V49''H&1HZM:6S[SYE_!EQ9 -MB\KVQ*TJ!22N6(;Y,C!-X1OEP`S,6AR&@88)20)22,5C8BZ]:O>KV+%LM -MW'N$5B)E!X*P,Q8$ZO8]CLV"FAU(RQ;'LUFK3V9KQ^38;KQ^2.'!>[W_-\KI -MW[F.Z,N7#07`T--:**)*A-"+`$#&J4"F1DO12E!L-F:#`QNZ+%%]C1K5L^!B -M.38WEZ_ON]Z/GO/ZG:S;FYL[ES*9+H[O=+MVZ@97+KH,'QR0ODO+(4LIY81A -MU&&8$4>5"9U=:RPKCJU;M]-]DW;TDLFL9IL>:AZTY.MBB`XZH;D\GE$W)Y1` -M3R6!*Y%;7I=3KWJY=(BS:%(6;1-*TS5G9PD4Q -M!5H,X;))3?(4,!NM^8#(4#2&+OG$2J`SDC8732P@^&3"_%-Q=[W$]<.D:)HM -MHH0:+,:)*R'3(9#B'3"$O2GM)TDW5F=/KGAZ?:T'PZ6[BR9-6HJ:J-Q$1%&X -M[$97K0:`"591IDS1K*@<1VUF/L2AH#XL?%@,#;09S#=""NTBYKJ-Z:V"MPQ& -M]O6]0L11#Q(2NMHM$D$:9$8&ZD4!@*!NDEV$$#=9NL*8D-TW1&;NDOEUST=> -MX;2FV[4V6SM(J6VD&*;0&T)3(5`#902;(@A6U0L-FIM*;4KK:LY]&A$M[M9. -MQU/6Z??\GP>AEWZ>79M6K]J^)%M[5M-2BV-;9.G":8A%!A-40+,*"=29I$>I -M1J.!S-1J-<=8-A;'?-3NYI8S(5Y(FBC=AVC0FC`KI(83,[9R3HDU#"[0S$`P -M=GD)C?/`<)WQB/ -M`E"`T30,!P(,G@F:#.[RIB#30K.#LE-=N2%R@GVJ?7W\9TM)%P\?2'0=2'5& -MR-0Z'J"&1V0E)#U&8N2P@TDYI#FD8:XA>/O^Z]YV>3O[&S@X2XKUV%X=%UY& -MEEK6H-6\B"MY$AO@LUOV!L##AT7ICM?-K -MJ0()SBPWRK"C?/`4%_S-2FE3$LSN[*4F@F:-3(0VL*-D;5=Q`=&L4-">`LER -M$@=\P*5#(E2$I3`387=R,DCDPMYO&W7.P98R3+>DD16XRK<;G=MQU.D-T&2X -MH4[(6`(02$2DA)6@[OW)'7"OI.]<"#U=>)#C-($-' -MQH!A>N:2E)-%)W*Z"%=W:"1!(M6[<Y#DG.'+6LUNN4ZU02"ZXBJ"CY@FC+S0Z$,)-0Y+`'FD)\V92FLUJ<.OL' -MGZ\O;W>,\7:[FY?$QQQIF`LQIH2&*,2#)Z#%BA$)3),8&*.PF)CA,3`R6!TG -M?6T\AC@NW,Y>2X\^9AF6%+R -M8"$YSSD.4II71%`LO.B6'EG1HV0;-5S/0'EO0>^?H^]N]OHY./T=\IPQ2Z71 -M,=BB\ED278%"2B1$)C)<8L(R&-5+B4R47"_43CJY3=8'OZV;'P][T?4]3V-[ -M?T\<^/&U.)Z1ZG!-4#U.PBH"IE(P,A@)#)%)3(5"9"(U14C,N"IE:THR%4[O -M@^%VL=''HQ,3%QQQG->K72T+K5AL4+:`WIH:`2%UC)&!=A%(D+HI!`NA25+H -MP2]`\VM->LX=?I^GX?:Z.CWO[V;OT]+;-G%CVML@/=K.[7;;%UU=>Z7;HURZ -M"2'=V+KXX!Y925\L'VLC`%+28/EK,*P+B=0NU@NM=%L[5O3O*Z=;COKDS=VXAQJI@>)-`P(;UXYB&+Q>)QH]^"8G((U#9U#'U>M%BCQ0>*.,2L!%$XXS. -MS$43.DDPR8&<&$$-`D2*:$B;DT=GLF'P^/#V/,?<##`<,\7$QF>/4L6ES8D+ -ME502ZL(D"XJ0$A+@6$R$]F%@B51&T:(JI.KK]O\[S?>[GO:V;=TZJ=RBEJ6I -MH#EPUSV#L4YP%+*=%1$#('T^Q[ -M[T3;-AF*N:JD#/1`R`RF2Y5*A41F0Q@*"PR@+UTDR(4,4`23@.YG0AT63,TN -M?K<_1US]__O?7[5KXW/2-$T:)?1!00#0*D$DT(BB`P*ZB2(.SH9!$-62KQ.A -M%@Y%CBWCN8ML_E%KM]HY/T7RS/5YO5SN8#F_.W<):X:SVNYQ']XYEOO]4[-K8M54U,J2@*$U+` -M[)W&*44ZS"@)3G$0)"SQ\9Q>E^/II>3'&-DCTW1 -M*2A*DTJ$U9$H[EWQ2$`6_'(`P4W5OL6MELM!6R.XY#'D%,1[6/3VIINM\'M5 -M_PSSO<9#U=,T[74JM<\M-:69T)O&'M>T.>UEK,B!,CVB$H2!*4>:%I#(!U:+ -M6FF?4+E8S0<@)75;3U/4X>=UBH\&>?!DY=O/(>O#@!F3*`,F#"<" -M*!P6HI(%B!DL6,A$DL'`!E5%&67`=O-[QWN?7Z=[P_;'^MUR>?J4ST\F["BR -MZJ*K)G)&JK3LK36F23)K0!>T>UFM0L)HD-D!@'M&S$P/:G),]I&:1TG`?\B_ -M#?AG?^)NUO&]NM;SO;"7EZ2]Z2E%Q"7&"D$DO54R*`P+F#0*1DJ#N5Q)J]^Q -M=MG>][H'9Y9HIGZQ8W(BU%;MRRC2LTHA,2DDANB(20W;\I&`RI"6\>'`Q-I? -M%G)X(2XTA(*6_N;9M'5ZF_A]+V7O7Y9>;(T1&A$9&-'$XSC1IEE#1$04%*0O8 -M42$.V2VE$3*)U&W34FOP%92S;$^*CZ7USR.O\/L[7?T-G0VGWQ<4,HFI%@D.(03B8AQ4TJ'$CPTG8.QPZ?C?E3Z -M_ZDNSY_NFT]W;V.LVEM3LVA=ED&MJ[&0A=I020#M*)2E@=M[$N;8C069M#Y& -M2>.+36,\SX7F:_K=7R]AZ_JUO>OW.(ZGJ\5;X6Y#F&VC*9S(ZDT,H4F_O`-]V11)-$9`9"XBA$DT#'0,.6"P6$E8;>-D7)ZLG!*?5 -M^ELEGW?Z8K?[\_ZG#!<4%]QMYOX/1[//Q>0UTZYQ=R+PZ]8:Y#7$@L!8)#7$ -M#4&*^:(BD(1\R^;Y.:\&!I-AGF\W=LSY/G7'R6S!/*R]48IY8@A(3R20'ELC@9L;FX- -MP@QBH."A#CA!P2@1<)"RASENG2ON,!Q^AC(3W8&4A)^C//5EF,7M?:O/[LA\'@X.PFE2)=^932\V8'9E,Z9/F$?'D@#@Q10[)3%=Q&0F -M(%!,)G0.$Q,!O%A1R2%.WV.WER_47+!Q,BB>1WGH>>M8<]G/[CT'V_MF?/_4_OOW -M-]?/IY;MWR'>;]YO@S`WVYH#%=VLP8)`MV4TY(&#^/.ZU#O#1OMYM=>_PK>3 -M9%V3WZJF/M38F1(&9F/(PT6K9 -M)B&^Z(AY&N,4)$*U:?L^8N9O]R[Q=?M<>UMP16(GW6>/64 -MD<4@%4RNZAIDD:-U5&Z,7"6`D@FL($TC.[B3<+1+6#64%8DUMZ7XWRN/ZAC_ -M$K<_P_4^SSGYO.SNO]-?`Y_0_2^S[[P:]YB_>:^=&Z%Y)7B\RO.DF9KB$DDP -M23AMQ!9CR4=2T*).H(`S64AQ37SO/SEG`N=WSVOP_R?E_,A?SOZ?TK3\S.K5 -MN9S.IZONKO`6^FBU::S9W!QVM%2;2V&B66`78(Y,"I`J(Q",CG0B9`64BET6 -M0LJH[9NEE[6;=?=6X=KZ'T^]_M\D]SUU6K>A>YF;WOK=IWYS>)\;>P>,K^ZV -M&_@;!A@-?AA0L,`%A3NS&%DWF@<0\]LUK12,)L)/^F<3O)([I[PPG*`!@XF< -MS1Z>;9,S80K*?Y?)8UO+]U$RJ:+E(3(>8J-34IAI2DT,QYI/-#2"9)#H@,L0 -M/$5XLR3KG$#X\)L_#L`$,%E`BR9\'++.GLAN)6FS=Z7TZJH?SOW'X7S?Q=WY -MSZ&A^9\W._7_CZ-;@YU;0S_O?D^)H>=P8/.;"8,`L`Q@#!:08`>"9BZ24A`U -MTRLAY6"?)%Y/+!Y?T?J^Z/5W9]S_&][DY?]O=M7.'YGC^+^)E)20T:)#MCUO -MD9*T<3I%Q<0XPH1N0C*3T2![:VHQ3VX38&;,]NT)D21('MQ1[>&4TDJY,FJ/->7D7W>;F^B\BOE>`<[A7LU:R[O3-Z-%FD!O#F#3?N4DWL -M0JZ`^J,SUO&)79@XJKDY*SC%!R<`Y.0/'9#C(=6"*,`XT4C).L"*?BF%=#25 -MMB+=S30?'OM3BO?&;,H21HTG? -M$1G,@XF%HZ1I^-,Z!U/68=XP^[!V,:9I*W[I17!U1X9;3JN9'Y+:%\/\R_HO -M6V(0SNAT.9G\_Q.=@PX7\3R/6.)L38C2383$R98G0"1B=#RG?+1DAB!WQ7?+ -MDC"&40R.9@1@H/@]3ZC[2E]54!ZE]50DC[_JS/PMFE1(48;;30PGE%%"=?@PM -MU%@L!DIJQ3WL457XVUUGV:DI])L.PU&12:I2OU)R>OT8WI4YZ1=G=X?9LDO: -MWJXXS#_;.O,:18>$*LMKB:##2S,:RLLZ$*3>R;?HYGMT:O[+;^!_$?@?.!@SLME -ME:CC/#<\M9AQXQAYCX7:BS?J7/[1,R^P0"7P3.74$F&AU.\M<_P/=&PX\V%` -MYY56;R<0JMXU;+X)%QH94;'PCA4ZRJ:V2P5]$RQ+`IL3E`LS9L7K'E,KM/E`XYY"\H\IOA -MI^$'X:\D`9.14$2A\,I(_>990,0$H86IP.,>YZCSRJ@E!E"A1M%#GH,P^<]- -M]^NQN\BMKF>GUEI]YOD86)25S9RJK%S]]QZ^\8/S(SZ;%)?18KRVTJ21A4V+ -MJ3/#.64OG;6!D9T3FW,AP\(L/3.FJNF -MQT_&882=#.R$;SM@)JU/XF.+LAP&^<&?5C']/!]`Q]5F/S_G^%;U2"//6FI= -M#TBXF\S%[9UTQCN>U*0A;_R9^71"DS$SD(<(DJ53_YF7O6*VNVWO64NMAL!X -M[:+60#:TH#[7UD>;K'@-RZLKRVA95MR:E^+S+,X$KM=,&=SQXV3'#Q#-MIG7$GW'@F@NLF<8WD&RX/!SK\IJ'WWP.8+S>P9G'0[LLWQ<]GA"YO)2,B@T5E";(XDXC@^W\"ZA4= -M_*FR5:S3UC)*'N@U5%T6]*Y/H#%Z,:I+C`SKBVRJ3$P\)5R4Y`[-Y;&40[&2 -M`Y>18#,NMB6,=V)9:&IN;$BRP!I6&`^=GE\?C/5\1X8=92'B62>PB,1!).YX -M*+,I4D80\]@@HA$D\#3*$9X/!/D8>'U_#ZGK^`G]MFI/PH]O1J*!E8>]MY7< -M^;?2L5JM%M$` -MUIEBVI5O;M'1<5M*DADH\GW+-6Q)65H:EL-+HE=FI?6`Y+OSQ[';Z_/S^][W -MO>3+M^,^K[)PP\3Y)-;Y!&/DZA`5&**+!)/(J)^QK]8DM`\"##V5#V3OD\IY -M?9]XXS9IBCHB/]AFKP>(]T-C#(>-V=_#^R6#U0QGO,XY7L:NK\>A2[;]5]LY -MK'%L-3RJD,OVP]$N+0/SYS)F6C[+_<;F)F56U)--:PZ34&O-:^WN#>QI,TNH -MW=68'!J:41\,+EQ=GR>3C\?C\6Z3PU7AW=@GL69&54HD\"(BD8$?G8?/B8*$ -MA;,^59#`8_//G:_WOH?0=G#Y_Y7SC]KF%:V!J#N#%!M6^I$,=U-[MJP_ZS)S -M;=M'2=Z(^+3P$_<&ZNP/4&\5F^)F<5]TY9Y\;!*(4T*9*F^O1,OO01REU(M; -MGD$-I4@P?"BC3T*HJ(QDE==T*6GF4_@+[&TL"H_Z9NG"=CD4S?1)Y0QWQ?$:2NUZA0+'[Q -M2WE,5H[QJ-SV#H0KK1I(_!U>5\PC6JA;Z:NONJ@HCNL31S5E.VK//!>S43^^ -MR:G/V=^_ENZ.YXVV48/&K_>GP^B&AKU=?L[:#L]ANR;-9,=E*6^['Q`!3SWS -M*/FJI!`*9OI0L(OF&#-@^<>[)W]R*"%.-(VF@DS6!X'OZ:_W%KHAB:OA969S -M43C,9<4%@/VOPR9?>0.73_BPZJ<*RU'6/5:.F6N`O^-2-5.QYYEKO0*M\U):WF"?[[.^=I&L+ZP)EMG? -MLWAK<7Q7#4M1#$_C^$CLMGO,T%^!SOL]Z3I_4WL._N^-9D-?>U]K`W[?ZQT] -MDN7/(/Y/N3TDN%JU@(>@_F'H+5@?-^L?5UAB'WTS40A]68AOWN9!3(E2-T1` -M1!"I!HN\!%(-D&,\/$&(C^O$&MD/M\4'X3XG_16SOGH`=);1T?75?BY]_:6& -M+FT%^Z7W?9-_TK0D!];^AB(/R$=CHKZG26/T]%JW+P:6,Y;4V!Z9H".;EJ:?'Z((@VO%,U>X;6FAG:!56R'M;Z-1.7$=[KMNMM?QEYO]G -M.23COHYBZ8K$`\0'9#&B?I%>6P.^/OR^;@&6D7/T631$10L+]]'U/O=:#IC! -M?D=&!F&5[MEY(Q-@_4_A,^'9L#'\/9GT#][F4@2E(Q^+B#_N+0>),Y^3&RNR -MTEOQ!36APMM+HG37+@P^']\4WP-Q\M3*\%<:K60_' -MX&92+LOS&'>.-V;AT>LW.$9O,.=#??D*RGB_/JMQLG+2YH[&A,/>+7Y1,[M9\0-6^1R -M=\<18SVQ_.37F&$E#9OEL-/`!-=-9Y@^,BLSX6C4\8*6:F5]6+LNCM*+4O5+ -M-!1;X2L+,S([83MX-/ORULE>KRMN+@'R;*MM*JM2LK,B%H1B,=K-(D".BJJ" -MA`2D2E"*D%D9"(A&)`60(L)!@?+3\:C_%6+*[-!@2?&)#(^/!$9!A^0_^-_+ -M)^0EM+4\/&_6S!O;;[7!WNN!>*/;%10]_#V'\1AW2D5J,2S/.;^=,.1A"W2E/8#J -MU<+M<9^A7F3E:$+HXG7J9#2=3J0LK^'$6[*5[%\W_37+S4\TGP7=4;)Q2G!4 -M[H:@D;6!MZYW)/:/N.CKS'X^3<0OU/H=FT.E(=!X[36&2D71[KW@7KJ!/U,/ -MH%%!+43UF'D/=5]8QF:7PH%;RM<'V#K5RA:>6RZ&MBF"J/QNAT-7CIJN.@+8 -MP=DP8+AH8QF@,[57.7F?R/@6)BSPX?I/TVCX:0^]:H_.0/Y=4444"?EIA9?# -M!0$>(R(;J?H[?SS5'0VKOH-CZ$=;4H^*? -M"[MQL#Y9)--Y>*2_R6J21P'OI\#!W_AUJ;7-<5<'2A -M'99R]BXQ^PX;JA;M@*[+''S>!!B('((BA"E*-OZ4`/"X>AI(>M@8]3^9B(3[-?IA(ILD?>:: -MBTU0QTOE3ACA<3-X]WG,T5@84>:!41KR]1H:A"[/B65Y]) -MYA?BS'ZZ!*JD_6R!@CRB#]=GZ_64C/QHJE_SIUX,\%&K']I^PPT'V1)?"QHS -M#6\-%HC11X$-"RLRD7S?.M(?;XF)Q?`@J0L[?4H)>P4FM]7.)WW$*03=!N;& -MH.\SF62KS\5R.\L&6GG1U2KT2?6A-EFIS>HXVO@KWIM+?5&1G;MA.3_ -MKK%.P8PT^S^^"U[O&\.`D@WRQS]Y.Y_3UPXZY"JV1HU+Z;XL/K%_K81C&^KM -M\(-\_\W[Y[A->IF?X*G[C>^P;B(`D\?#86,8L_49PPR4+W<.:RTM!Y"0W;^Z -MKJH?`TSS%NUNX[G$G8@9]G%^K5&4?Y*&PJZ>EQ-9.:JIZ).3QYJ1\^6+2BI6 -MR8A1O)[5D`J)QBK":D8BB&;;H497&3G-9!2MVQFLA<:ZRD9Z/#[9/F.NUAI= -M89JD73,B4>S6E>H%***JG9%]R,!&9-J,=6Y'-`N4G,9P;GNT,5EE!H9$\6=! -M@8OHY^,+^4U1NE#\H*D)$_*JJ_)S*OU__5FF)R[;$3;2&CVW.UE97,#'JXX0 -M:D!6!PV9,;SR]F,&1WFK[,5,Q!C*.JEX1\BQ-W%K2XV5%2^+"]UE\5?Q@.1R -M7AMH?+G?LX#[#Z'RTG\Y0?6>!L?/1S:AJVAK[W^Q_W8&8:AU#:1JD;&=U6=C -M]^8.L[WM?U=@^VZVWMVF9?[([7+#0RR&(-.A'PY/B1LUK?C'+O]+\MS;UC$\ -MC"P9J'55NY$"%/R:-]XIA6)N+#[E\H9VKW/6S,YXQ_YC29"^>*,X:5N1)R?H.=D99V8:*BQ -M&1X$BSEJSC08#0^O&/7UFON42L(?^ESRY6[E)<; -MQ`\22F?CL?53^ZCZ@4VF8EL-DG.+=:F[8A1FIMB?=9J:CJ948&DL5H:."K'9 -MA?"TKWG8@*98\D%\HV?6ZT@%=RLFC/,<5;F9+7.G:CU"KM6>7+(+6.+J--FN -M@:'6[%W`7TT'LV>XUX!XXM9>2Z8I\^"&R5MG;H#^S*"E/Y_\S]9\0V3$`?&C -M]A\M-F@P1TWGD<$]:/RZB*G_LP,@_-_8I^QUAL_5;#7[+#_/VPPX1NCM;^O. -M./FQFA`\C#(/L[G<'I1^WV>P.U?--D5VQYJ!.G_:CNPOP9QHQ?Z!O[+S<%@W -MSR_\K>C>BD21,8<73+]&G9[W>>H+OXPP6'5H,!XQ.TEVW68%@LB9N.`*G'/7 -M',''2,O[HH]LOF3>YUE+>,4SG$!C!M@`J3*TP>F,WZU@5HT2UX#`7+OD%%1S -MGM&G3OJP4F[?#(MN]=GU#"V37 -M>@Y^KD/)A\V6ZC/;7N3@5FZY+/UQ]9M$D1>Z!/`HACQH),ZXT.GQE?`%M&)6*Q -MGB[K)O(/[7^B/1+>'\ORT(FI(X15F$)FJ&7ETPM:O`3(F[C7',=(OA4TU7O5 -M3A9E46C7^0UM%K\P+^V>[!MG*II`;MC^28+)M&_[LU[G+C);'%*-/N-?48%\ -MZ@+$,[T^PNE]K"^G#]27F;OHO1,>,#X6=XV5GS7^U.4M)HQ1A1E8N_M-F'?: -M'#`FF.DO`4:@"&U-96>9`BO^NAJ,^UV;"0Z]_#;K;N4@+SXQ!H"CB4&."_K( -MP4_;0.?W@8T_J8<5*#P2?N>N\A:UW$B/%HGX']HQZ^:8@!I'^8_"U:$A^NK?^FH3;_B$@',-)T7HUOJ -MR'OHLBT-NOL?QBZ* -M2\K*O]D?*2NH\EG+J_VO\,8N>SJMIQ7ZQ$L<*#W,E<<,:_]N?CCY`4SU@;]AZN!@#8 -MST"]\>`6B[#B1_&GND-DZEK[G?FIUOHH_,Y,P1#8>@4RKE7^RD*VPF^"(D^7 -MS2C(K#ZN7:X'D-!I@=ZVG/"X`6:K$^!M*,Z<2-9TJW#@'SA)Y\E;:U1HF`H^?J!4]X'N5?YPS@2Z:\&47!)R -M;`O'Q@BOUO"VV@%U]3LW$3PRK5K^\$!2$FO]U6QO#7#+X^\\:DN*R=\^0SF^K]!&)CR* -MJ9:0"%H8S"ES>QI*V.L'8K%<$@!(K^5?,CO_/@KJT1I7T/C/9]!5N98:,>O@&8L,K$% -MT;,6P14,DMM-#&!/YZ$^2SB?):D2?C$J'SS%A/YWLT?U7^'>H'VQA?H7R*.I -M5DD'O6?PB-NU@E&",KSPR)J,8>ZFO-D^*V]0@IA!R#L: -M=/2Q)OU,.<=Q)[3ES\%G\I00Y<'`O14"#2IKA1IPWLK^:2_O>KJ6,ZQPZN;A -M>\8L[8X[M]@>WDR5X-;MG74S_3FY\94&,;)R5S2Y%%1^[M;@6ERKAVJ3-=S8$MJDF!!N79% -MY;)^J\4OQ^_TU:TFFG/?6/UOU&-QE^-^0]K73^@ACQ&4S -M;U5T\D`Y(\(I4^??LG"[V(?O!:,]?=&@]^MI!- -M<5;CW_8;$X"`@!J#?W5P\N<'&N\PA?-FK+S6WWQ/0FOUL_%]RWOF9KC?39=C -M\4[VEL)C#P.9DEP,'?'UNI>.@6S=],^GF954%[U-%P]YE,KRS`Z;6F$DP+'[ -M]:]'DT?%&JG2:9#99+;O_JOMM9TN9WI\"G432$RQ^',Q+3LF`YR_]]J5#*M* -MCYIOXMDEZRX=.+ENC30F-'OI%BZV6G3(S`$F8BAH>AU6XLDD;;SA%V<&XYXJ -MG[CX\V,FM5N@#'J_W?2&D,.5/1&$W47ENY8^\#DU* -MW^7!6WE=H9KI;VRU>&TT,O0'"[>SQ*C[;T?H9+A9'L5@(]857IY"E -ME!+ZZ[L6P<+G%,F'R:]@=X=7I-Q*&1T^W(F';ZNA)A@+FY&A"Z8G:J6)MZER -M>6667-Y[#9#7=,[BE`:],6]^APSV;K17V8XQNT*!1$;0M2:-V1?J'Y5"Z;*1 -MW)Z*G)G%85!"-,/VYG`*22+'*W_Z9B-56GBC,*BU?EJG,5/17G,K%D.$I4NL -M'B]:5_BNA%-1SK&I>E_#KI!G(("'^^WZF2V=X!U%4Y/6%N37P%'AI*RA+CU1 -MSI7%F^O/G'233ENB&KG=[@TVDF$_Z=AE8YXHJSY&*?BE\@=TM"5`M_QQ*S97 -M)>O+:FMPE[SR52T'!:";XB\^1L?5W^2MWG\#E3VL#?O*YLQN=*'W.)V"[FPB -M"";-H\>8()>Y)$)4\!S,67%8P[WM5;]]?,5M>LGKBF,&9PR&%^A#!%%+3/<* -M+X0XX>.UL3=\6`HL7P06+OOIQ+K0'IX4W50$>0PV1-4#]6']SJP@G[V#/CM2 -M_JF/S?Q<#;L3N4#A98H\*TQ0_WN^>::P?R>Z)Y.ZXF$F[@":SV/;2B#M0\1G -M^S.$[LW1Z:`"AU#\?V_Y0@8[!/J4SF'YJ7M^KSVJM;_]T,,;`X?&M*6A(*.Z -M8_>S&2SWAL^:N[X\)#`J&8?8-(]G@R22Q&=Z-AF"-T<7$=MUENMN;%QX[3#Q!1X.;X?\CI_.SUND2BB2MH&VOM;Q!4MA$D&>E%S;?+"<+A4_H&H.6Y@L_6VO]T&AH?HE:3M$_QV.I -M7CD&A&FY09.`6:_CI!I&W9G@MC<_X@_HO\AKSYF\W85]A'&'\36-&)U -MN\.;4'`<"%XOX\C27J^^/-*^& -M1C9ZP>S(S57HHXR.W7Y%X4M;F2B/Z^ONZ.%)SOH_#]2UBT8$Q4P1AML^*(`P -M3?1#"T^C&/'OSK3_9Y1VRM>9XS>S_W]D-9C,^R]TPJ -MJ_U]_:'P\0@_77#*89PU,(.M^75TGODAXWKTL6( -M43O0)-!Q.UJ/8P6($A8#P&KUA,"XQ4Z(R8,EYJ^;'P2;#W?,_#V=O(@:OR;8 -MT(8?OA&>J%#)F1IG>Y&&ZF=-TKVG,6]I+X>R?!?I$?F:&&!XP(*%IMMUSSE> -M6:08]B85"[?]'_KU)->WH'(,"!I[[O.X++S$$Z(CA4.!Z!=?;TP'7?3*N%)_O!V-O2RY9OTYD]H(&8+B4.'[>/;$/(WR9XMG8"<,2B77@ -MNIH6E_BZ)7<#LR!6=&<@3?`Q-#H,?J2#E&.IKU=I6QY0600$A(=#!G+P=M.S -M*.77NX!J="T;<:)U._N6(OY@#APKYP."LPX`'?,F`D,Y[#`+W)B5`7779$!"8F=YFP]@5ZL\L" -M6(S/CAF"$Y=[;W_*Y'F^M!*?T>#L>F8COJ'O]G&0CQ^(T%FYF`^7Z8![7%TT -M%F?9`\7G8FM1<<7\/L!PJ6Y=_!=#2WR`5+#WB.TBI:7NC;,B]^L_)L40_-_; -M?\.A?!`%(00K7[*``7(II^+9$2`4A$BE115143,55%1(@%04P`T(20[K]`R! -ML*"?ZD_K-G7_9HGUNP?!BQ40156;A?)],0$@,6Y]!P)_9*LU-SVO,_^ -M(./;XT4O]EGOL_.;@DN4W2G\KL$=9A0X`E-LEVGHNYD`'W -M&/U;K3J21`0'%AU-C%?^\Y[=(YG2&2.`]4U\L;`D\IKY!S%;Q[@T,XY&*9"E -MN)*XGE5]]^2DAW_!P'%F#>9(,CD>,5NFJNQ7=![`4%KOW,/B?4AJM=Q-OBAZ,-*@!: -MK/QWF-@ZG'XXZX@VJ:1$038,#*I<](GB*(R&3`@(RVDRD=6.4>"9AW$JA3P)W6R?X(2+O=A -M@3`N0PJIXEW+$IWLL*B(.)!2_\>+;<"M9/-K+";R6&"QO5_"<#[`N- -M6CO$)`/:[\A"]R@Y3U1Y\M,C,@:M\D55@1$"R1'C:?,^=M@I -M@-TS`N%,RGR-E:=UU>*HE]AYM47(;-^>*CWOJJ2;XSFQ9\"4 -M((-2.U];6QH%(DR:I,`:;1#S]5?3#876*V=OK*,W8,@46MC<;5N'W(1QE/X@ -MXF)KS13VED"LJV1.&QO.6][>K'!X.;-%FH73.AHJZ-SLL*/Z\"KU1P"]7+Q: -MFS8&'F/^UIE(HM;;&(W^$.SER>O^WU=KD7J/$(2MLL*M+^"O,BGWO.H"]5OL -M5$V);;U8'([XHC07/E5[?*\O198X0RQ0[;KCV.Q6G/`EILZU[067?=S($/AS -M)@@#MT9!?3'LU)"UE_]#(W\-5F@1U0H\B+Z^,EV//:=I+SIHA'LSB,N9@>R_ -M.'&/`MQ+(%*R>>FSZ)2!>QLTET0C(BE:U7AH_M9WYXA&&YCP?$V3O@J?#B"]TM,Z'F'"#WVJ>\H3!4FP^$T,Z8W/H@XL -MR&*U42.(G[5)@[5+CM#Y8?OY+E:1G@TE#\2&>8^47]9#-G -M@,/[KE1+D/6]6[1>'"Y-3W0-'GFC\XR8Y%.?(0GK!K7^8T1#A9F*(2O+F/=2 -MNAWHF`'Z&YLJFQ)!?_?SXR5CSH%,I3X#:FZS9&R^34`P>T:!NLL<=`NE^,L! -M)4G[-FR&'O^#9-?7!NGUM4;+0.TX!=AXV!S$.!V:IK$G/P9+RIKRX$4=4>O. -M!GC:KP?.`]*(%;9&!S*\0WZ=M#1J=K1''-FX/)PAV_^Z-&N&B8X/REJL['>L -MV!`=O!V0&5F=*P'P'^YYA>%E.'[U>M`QN^OSP/Z,"5A<3^/'WD)6J81UNW+Y -ML%O?S\W^G#RP3RU=G`&/2`L27L=<]<`Z6G+AN@.!L.]XC9&J6"5"GS&HKRZ/Z.+2)R.D2FO%E -M[_4V!L3>[B@4HWOQHK)>CRS\354Z/@*IX#;KGAY@6<9RS0<_N2=%%8Q/=IUW -MN'2'8_%0!4;"YD.@<`ZRYP`.M.XBX;=YD@R1^.V!MP=]%S/FNZTR75+SRIG2 -MTQ"HJ7.U&F;3I4?:4(R)2O\`I,''>P%ONF5O=E[,IJI\V5#1RQ%[-DQ=5CSL -M^I%^63(O1ZN[Z4>3OU(3\L1/SMOO0?D,T!2^;$^Z.0#4C3P9TAZQ#&&1Y\-6 -M@3D&JZ4VJ9X5]GF\"=!>[[>>RFS@W'`F@`S?4(O,,W/+E0?`>-%>#%,AGO\L -M@"AUJU>GBVE[0@"WDD -MI[K)\Z2-\G88%LUR@AS8M:@IC6'31(SW)*XGKHT%Y%$D!L5'UZR4LSI2ZK?T -M:(E1CQR`(ZUT1KX`4 -M%WG30=OSMB&:S<33<\`=*DQKV;+H0440NM<99Y4OA8.>:FZ$'0/3C9D7AJ<<^;8N' -MX%KS;XA'QQPVS/[<&%`":VX.0H^..E2!$4SM;]QHK`I:YMJ-=OB'>.Y -MMR-TW*(O+Y,6H1D8=WQ#40F-WS\<'.]TR`L[=X;EZ*!.'9X$'0:!"7^?B16. -MXQ.,".%]>$7X8QX/`@M&(">,`W)XTA%8*GF&AL!/':@X&G)^X?X%4<=W:=?!"TNG?&TR#(PH`9X>!X\3OYH^QDQ^4; -ME9,Z=R=R`ZT@XY0WAPX`X$IIL(^+_'D4TRXT\.\V5N"`'?\,ZROLG!EZ,1_@ -M#]GL+8$\S3SE-%^-!:D7NMO-8<(#A:#PXKL#\BR?8)L`*JTGSTR>\,FI.GQ1 -M^8>$OG%D34U8K_M5/`$OFS0_3Y?)7L+^RLJ!KT5T0$\SQ[_HD'#I/&!5]];I -MC]KZ]:;,)0`"L3%VZ.XB$@1A::%Q:$&2:0EG6))&0K[>:/I -M1Q!UJ%^ZT9[A7J.@-NQ(ZUB=^@04'C931XJU$<$>A6^UL[[_GRI*`KO]_Y0_ -M4XR7I,[*7E]KJK_*%D0VVFV-L;8VBA;>D>AWVCO/EZ:S1<9R@E8?]_1[K.Q6 -M!6`;3?(LN#B;/].ET_D@F/^N,\CD[CDY^2A2YM-![A._OKRDS)+S- -M'I^FGGP0A%G>_'[=5)/73K][:X,'0"5-U8[EZJG/:I.\_/MN'SAZ9AS>00D1 -M(DR*[G9VT+@?*`^,!4Y.`S5>`7->J5=J55(>ZG8]N8-:2@\#KZ&>'K-] -MM[W2QEP>!!-3,XF\?FWDIV\#<;F*6'0QO>0=(" -M0ZSIW'^)X?!0?PQ\C@(*EET/SX-GS_?TD&*8E#XZSHH2(+:XTSTMP_MTT.JR -M.K;6Z"HY1``5#L7/PZ3'8]8?/8_,=/3'@"5]A+.*1CV?V;NIW&] -M*[2``8MS0:)O)__$>-^F-`MX%G]=ZC(%V:#/ED1QV/GPJPYT$<(!4!!N8QSF -MPI<*M:)_A_WIG@0TFU^W$?RVU)MF%LFTRP:K):V:0`4SW83`H-:3[&<^R -MN>!"'O_#OO-OA.063TC[^V3F]#QDUHB`$WT?.TO4T-$T)D%OO/)\L^`2_YHA -MVF0)''_)?TT?S%B"G7*)2"(..*V7^01SSEKZF;Z2\(A7??Y^*@97!K6):OL\4=E6)R:I0Z"CWG/M:UEI#\@D'(W^U^E@Z[AM]['T_4`&ZL^U9 -MN^HSR+W7#B[Q^!G.;?]NYX@'&Y7NUT]/%HP2Y,:H)VBL$YM/D0V26U_CM"SY -M[CQ1-J,!M.]O50`KE\>_,XUPO]+$Y'S)!@ZE$1#!^GQNOY`0Z0U!$;B]-7*0 -M`ZN9?%/RA(?W&?Y*1CAF)Y_0D"2(R_@U,AMFO+*LUE_G.9VRHD1`6+[@!*G8 -M-6LTG*'@!IVC`"`/NXH[?SG0`P8W<$WY;=S&4B>JH^NIQ:(@$=A3RFZSU3TR -MCI:N2XEODORF<="1#0)\1UBZ>&/W/)#[FYJO:4(`$&XZ3MV0':I[3>[R29DV -M3'M0D"W*.)P5,N'T9/?\#=)(@OL@(OUL]KS)HJSFFX/P0#\VGP`I^S>!S=Z# -M7?B\SG^`)H=X5!M.;O-MDIPZ>!#&T&'<5N(=(*_D?TB%@B&15G'?4FQW]2IH`!GN3>E -M=:J8DP3OOYW,MNW>+X^`K(/M*DLRJ#>[MHGQ$T:XA!!=4O2V$4!%><'SFR@0 -MXJP\.]1D07GJ5P$(`PN:;=/(74ROQ-P?W,)->)U`0'T[F$!'J2TH<6[G(2+S7F'ZNN7]C=[P\A221X"AWT -MY_U:0[1,-127"0=`"\UOL/##L^DOE[56D-EP82X\LP0&%UOSS_%U\@1JJN:B -M-G20`"TOC4BK\6N:%A/;ZGVQ;L,K]^JE)GP^YKO8S:>]2`%4SLQ,+)>[Q[K) -M\[M)PI`#:^M,S-W``BW+0QW6SC]E]NI@N!P03AD,U'5]I4;&#EK>S_*RE$0= -M75L*\X:O!2+L8.&WX\`.;4D)_SR2^A4,$\11U&!*4W%=Z8,?IUQKY("`QE0] -M+IF!"2Y;/09[,?&J/D7&NB+RUN'#]XS@92:5DV#1@#AP(+S>H3J:@1_*QM%, -M%EWCS@(ZT)W/8OFT]"(`/_TB5;[P!\/--HQ7O/)HDMN0@M!`@8/I;A1)Q\'0 -M7'A?."->7=[3'X*WA6R`#1>D%GCZ+(M10U]R]7!-'(Y/Q0$3E5?W -MM]H`9L-]33<1;SFQG=]Z>,D`#+=7CD5`.FNJ'(UQT"9<78`6GW0J"^G??IC( -M">4J=3.KJ4"$1A1`*!SSS'O>ZHG/R^+;6/Z^_H1@B8.)Z"#!#7*=J@]9@SWC -MY%9(\R"US[ZPVZ;63M)&NA!RA5B2A$8`'XYU002QX>;>>W)L!X$N>:>`_NBL -M.4B1BO.^!ZVW?W78TJ(\1*7( -MF>D012>Y;[XX+_JN6U!"P$XM[QI:F>/26/3+H^I]$DD78`%+DS@M>7":?Z/E -M0-;L60)=::9DLB)>QE\`L6#?33Z&=VNPW[=5)!$&:1Z!)76;M<-S-G2&S5/F -M14_\U?=_[8QB@?`@\S4$6%]GUL_<8)&65,01J(BSG.O""G_.]_LG;;')GP4% -M:J_E`N^#F*++HMMP>:Y;QRBQ[THB"7^M7/`#TW[E -MAM3?&42,-3EY$@`?2.E%7P$)U-#.:#-!R7F(1Z)(GM%.+DNE$`U0DHMLBP5.TUT;J'.II@!D(2A -M94I0T'JM<%"1/.[R9#^)\NZ5JD=*1PX_C$43SA:VF20O[Y!(""^922+\:=HV -M3J<+QUUQZ02+6XJ9R9S(R@)E@9,]NG7)W=]QXJ&2`!FH<`?50]2P.0C?JND? -MU=&188`PI,4DV_'>48+^[*!(!^_YB51V!T6[,-EEM7A(06,^0%+A(] -MJY[8Q1;JF2>\%ZX200V'8E`5O%6*6T,&KGCX&$]Z>.4_."$M2=OZ8B7>ME.@ -M*1(M%BNT>&B4V5E&4RCGOD@`51$HC-+45]:EED,?4(05K5Q:.>!<#,;)22%% -M^]I\$O^2EJ`!EWV47;\5-X*+)H`51)R&7\H'OKOHB"-D2/[1$7N;%:_(1+NQ -M/L9O*FHY"F"^='1D01[^DC<1F?L?1*8%O@W&](MWWW2D/4VBBLY`$,A[D9`N -MR`/QMQOA6A/R?.I!P_F_(!!AH05%,=4FMRB -MYGC#-'0,C?S`()(@OMJ:H;*4XKNW9@(B*AO"*FN8%(LOD=#YZ90@/WU;_RM_ -M8:%-_K)CHLNW2@4GJXN^QX`YZA(064OA.]*F#6A!:T@%KG4\G(0GPB( -M@S];2D30M_45-;R64'B'OA4[3D&O^:%O2]2MH@$N^2].0*$R,@'F*KO3UJE='8:(1)!?:-,0<'9$0 -MT'G?][N@NQZE;4<")2C206+O@4/JA#@*262!=[[5&K2%5 -MWVN59(CLOH:\KX'IG300X-!0@!E\]F3B_.Z2>)#D(\ARG:($`Z4#43J?!"?K -MFF:_J;SB(2VF=O#G]UD>3W4!"VR/5!#V\+\1@G>XAG3Y*%CY)SM\4B'6:G-G -MRW".WDY9_:+`#!4U>\X:YT*-Q;$)",BVC_HT@.K8^>SE*1+C-'C$UN6=`_(R -M`D(TB&LQB5J!$]7S_M83O,B+M>*ZX!%CKU$$2+9\\\7P?N#F^,"'EO?(O=56 -MW![SJ6W-$*N>(G=%QW->Y5HYLB`F#GZA)("EE1VMZE(TI^9('S(@5_S2(6'A -MS]FN#(]#O/'0HC"`BVO=G`0U6OBFW/Z.@JN;:2&B2`$+>"%- -MX)1A\239!5UT@JH@%TQ_2',7-?]HYW:[8?S\]-<<-B$O2.OP@!5,*1 -M;6,@7-FFK&-/E[=K_R/$96($!LL]D]#BMFYU^JZ#&>X'2SO?9T>\3""^\PP! -M8S$RMV\!03.LX.]DO7B802@"VEIMIX@6@1C/[:GS,TC>JM"!8ZX@&SC7GU8A -MN91JAI=)1`IN_Q.B0#7190>6/G$A>/E]\F"T3G7]CH=)K/#AO2H"8''))S?B -MG<)DBF0[)%KLORUMBC@A+F+-8=_I$+$_G(SMJV54@K7/H\J^"'5?*F_T*=^I -M'.]\,5OR(?3=/VW9#(2]'J9*MJ0B!0^(C^>.R9`3S=U!GWM>Y!T\!L%@@%I< -MG[Z[IGWJH@Q)[_UY8B#)45W18%;6Z#.UT5DQ4)0!,01B!+:Y<8]6@#E;'-%# -M$A64Z5*`,PSD0/JM7OY^&F4&0B#RF0S]>0*2Z.VVJ1J0\>MX;^1!]:S:#@JA -MUVSW">?Q^;-?D%@$`]1&+OQ`27&QKIC=&[,"2%R29X2*(DBX^N3Y#5ISL2?( -M:NQ<_UQ2(MJW.VP9J<[-KT?I@"XE)UHE4L,CZ-)VT(>-W%RBIHP1/7F>,?]@ -MF.,)N^5"9%(+^.I`>+H3"1M5_IK`D5!""W?LH(@@5?Z"^NFT_#D`P(BR&F[U *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Thu Jan 12 08:46:21 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16CBACAABF6; Thu, 12 Jan 2017 08:46:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E550610E3; Thu, 12 Jan 2017 08:46:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C8kKmQ057632; Thu, 12 Jan 2017 08:46:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C8kJfu057628; Thu, 12 Jan 2017 08:46:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701120846.v0C8kJfu057628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 12 Jan 2017 08:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r311970 - in vendor/NetBSD/tests/dist/lib: libm libpthread X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 08:46:21 -0000 Author: ngie Date: Thu Jan 12 08:46:19 2017 New Revision: 311970 URL: https://svnweb.freebsd.org/changeset/base/311970 Log: Add additional testcases missed in r311966 Added: vendor/NetBSD/tests/dist/lib/libm/t_casinh.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_fe_round.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libm/t_ilogb.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread/t_timedmutex.c (contents, props changed) Added: vendor/NetBSD/tests/dist/lib/libm/t_casinh.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/lib/libm/t_casinh.c Thu Jan 12 08:46:19 2017 (r311970) @@ -0,0 +1,81 @@ +/* $NetBSD: t_casinh.c,v 1.2 2016/09/20 17:19:28 christos Exp $ */ + +/* + * Written by Maya Rashish + * Public domain. + * + * Testing special values of casinh + * Values from ISO/IEC 9899:201x G.6.2.2 + */ + +#include +#include +#include + +#define RE(z) (((double *)(&z))[0]) +#define IM(z) (((double *)(&z))[1]) + +static const struct { + double input_re; + double input_im; + double result_re; + double result_im; +} values[] = { + { +0, +0, +0, +0}, + { +5.032E3, +INFINITY, +INFINITY, +M_PI/2}, + { +INFINITY, +5.023E3, +INFINITY, +0}, + { +INFINITY, +INFINITY, +INFINITY, +M_PI/4}, +#ifdef __HAVE_NANF + { +INFINITY, +NAN, +INFINITY, +NAN}, + { +5.032E3, +NAN, +NAN, +NAN}, /* + FE_INVALID optionally raised */ + { +NAN, +0, +NAN, +0}, + { +NAN, -5.023E3, +NAN, +NAN}, /* + FE_INVALID optionally raised */ + { +NAN, +INFINITY, +INFINITY, +NAN}, /* sign of real part of result unspecified */ + { +NAN, +NAN, +NAN, +NAN}, +#endif +}; + +#ifdef __HAVE_NANF +#define both_nan(a,b) (isnan(a) && isnan(b)) +#else +#define both_nan(a,b) 0 +#endif + +#define crude_equality(a,b) ((a == b) || both_nan(a,b)) + +#define ATF_COMPLEX_EQUAL(a,b) do { \ + complex double ci = casinh(a); \ + ATF_CHECK_MSG(crude_equality(creal(ci),creal(b)) && \ + crude_equality(cimag(ci), cimag(b)), \ + "for casinh([%g,%g]) = [%g,%g] != [%g,%g]", \ + creal(a), cimag(a), creal(ci), cimag(ci), creal(b), cimag(b)); \ +} while (0/*CONSTCOND*/) + + +ATF_TC(casinh); +ATF_TC_HEAD(casinh, tc) +{ + atf_tc_set_md_var(tc, "descr","Check casinh family - special values"); +} + +ATF_TC_BODY(casinh, tc) +{ + complex double input; + complex double result; + unsigned int i; + for (i = 0; i < __arraycount(values); i++) { + RE(input) = values[i].input_re; + IM(input) = values[i].input_im; + RE(result) = values[i].result_re; + IM(result) = values[i].result_im; + ATF_COMPLEX_EQUAL(input, result); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, casinh); + + return atf_no_error(); +} Added: vendor/NetBSD/tests/dist/lib/libm/t_fe_round.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/lib/libm/t_fe_round.c Thu Jan 12 08:46:19 2017 (r311970) @@ -0,0 +1,124 @@ +/* + * Written by Maya Rashish + * Public domain. + * + * Testing IEEE-754 rounding modes (and lrint) + */ + +#include +#include +#ifdef __HAVE_FENV +#include +#include +#include + +/*#pragma STDC FENV_ACCESS ON gcc?? */ + +#define INT 9223L + +#define EPSILON 0.001 + +static const struct { + int round_mode; + double input; + long int expected; +} values[] = { + { FE_DOWNWARD, 3.7, 3}, + { FE_DOWNWARD, -3.7, -4}, + { FE_DOWNWARD, +0, 0}, + { FE_DOWNWARD, -INT-0.01, -INT-1}, + { FE_DOWNWARD, +INT-0.01, INT-1}, + { FE_DOWNWARD, -INT+0.01, -INT}, + { FE_DOWNWARD, +INT+0.01, INT}, +#if 0 /* cpu bugs? */ + { FE_DOWNWARD, -0, -1}, + + { FE_UPWARD, +0, 1}, +#endif + { FE_UPWARD, -0, 0}, + { FE_UPWARD, -123.7, -123}, + { FE_UPWARD, 123.999, 124}, + { FE_UPWARD, -INT-0.01, -INT}, + { FE_UPWARD, +INT-0.01, INT}, + { FE_UPWARD, -INT+0.01, -INT+1}, + { FE_UPWARD, +INT+0.01, INT+1}, + + { FE_TOWARDZERO, 1.99, 1}, + { FE_TOWARDZERO, -1.99, -1}, + { FE_TOWARDZERO, 0.2, 0}, + { FE_TOWARDZERO, INT+0.01, INT}, + { FE_TOWARDZERO, INT-0.01, INT - 1}, + { FE_TOWARDZERO, -INT+0.01, -INT + 1}, + { FE_TOWARDZERO, +0, 0}, + { FE_TOWARDZERO, -0, 0}, + + { FE_TONEAREST, -INT-0.01, -INT}, + { FE_TONEAREST, +INT-0.01, INT}, + { FE_TONEAREST, -INT+0.01, -INT}, + { FE_TONEAREST, +INT+0.01, INT}, + { FE_TONEAREST, -INT-0.501, -INT-1}, + { FE_TONEAREST, +INT-0.501, INT-1}, + { FE_TONEAREST, -INT+0.501, -INT+1}, + { FE_TONEAREST, +INT+0.501, INT+1}, + { FE_TONEAREST, +0, 0}, + { FE_TONEAREST, -0, 0}, +}; + +ATF_TC(fe_round); +ATF_TC_HEAD(fe_round, tc) +{ + atf_tc_set_md_var(tc, "descr","Checking IEEE 754 rounding modes using lrint"); +} + +ATF_TC_BODY(fe_round, tc) +{ + long int received; + + for (unsigned int i = 0; i < __arraycount(values); i++) { + fesetround(values[i].round_mode); + + received = lrint(values[i].input); + ATF_CHECK_MSG( + (labs(received - values[i].expected) < EPSILON), + "lrint rounding wrong, difference too large\n" + "input: %f (index %d): got %ld, expected %ld\n", + values[i].input, i, received, values[i].expected); + + /* Do we get the same rounding mode out? */ + ATF_CHECK_MSG( + (fegetround() == values[i].round_mode), + "Didn't get the same rounding mode out!\n" + "(index %d) fed in %d rounding mode, got %d out\n", + i, fegetround(), values[i].round_mode); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, fe_round); + + return atf_no_error(); +} +#else +ATF_TC(t_nofe_round); + +ATF_TC_HEAD(t_nofe_round, tc) +{ + atf_tc_set_md_var(tc, "descr", + "dummy test case - no fenv.h support"); +} + + +ATF_TC_BODY(t_nofe_round, tc) +{ + atf_tc_skip("no fenv.h support on this architecture"); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, t_nofe_round); + return atf_no_error(); +} + +#endif Added: vendor/NetBSD/tests/dist/lib/libm/t_ilogb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/lib/libm/t_ilogb.c Thu Jan 12 08:46:19 2017 (r311970) @@ -0,0 +1,127 @@ +/* $NetBSD: t_ilogb.c,v 1.6 2016/08/26 08:01:55 christos Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Maya Rashish. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#ifndef __HAVE_FENV + +# define ATF_CHECK_RAISED_INVALID +# define ATF_CHECK_RAISED_NOTHING + +#else +# define ATF_CHECK_RAISED_INVALID do { \ + int r = fetestexcept(FE_ALL_EXCEPT); \ + ATF_CHECK_MSG(r == FE_INVALID, "r=%#x != %#x\n", r, FE_INVALID); \ + (void)feclearexcept(FE_ALL_EXCEPT); \ +} while (/*CONSTCOND*/0) + +# define ATF_CHECK_RAISED_NOTHING do { \ + int r = fetestexcept(FE_ALL_EXCEPT); \ + ATF_CHECK_MSG(r == 0, "r=%#x != 0\n", r); \ + (void)feclearexcept(FE_ALL_EXCEPT); \ +} while (/*CONSTCOND*/0) +#endif + +ATF_TC(ilogb); +ATF_TC_HEAD(ilogb, tc) +{ + atf_tc_set_md_var(tc, "descr","Check ilogb family"); +} + +ATF_TC_BODY(ilogb, tc) +{ + + ATF_CHECK(ilogbf(0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; +#endif + + ATF_CHECK(ilogbf(-0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(-0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(-0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; +#endif + + ATF_CHECK(ilogbf(INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; +#endif + + ATF_CHECK(ilogbf(-INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(-INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(-INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; +#endif + + ATF_CHECK(ilogbf(1024) == 10); + ATF_CHECK_RAISED_NOTHING; + ATF_CHECK(ilogb(1024) == 10); + ATF_CHECK_RAISED_NOTHING; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(1024) == 10); + ATF_CHECK_RAISED_NOTHING; +#endif + +#ifndef __vax__ + ATF_CHECK(ilogbf(NAN) == FP_ILOGBNAN); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(NAN) == FP_ILOGBNAN); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(NAN) == FP_ILOGBNAN); + ATF_CHECK_RAISED_INVALID; +#endif +#endif +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, ilogb); + + return atf_no_error(); +} Added: vendor/NetBSD/tests/dist/lib/libpthread/t_timedmutex.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/lib/libpthread/t_timedmutex.c Thu Jan 12 08:46:19 2017 (r311970) @@ -0,0 +1,30 @@ +/* $NetBSD: t_timedmutex.c,v 1.2 2016/10/31 16:21:23 christos Exp $ */ + +/* + * Copyright (c) 2008 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define TIMEDMUTEX +#include "t_mutex.c" From owner-svn-src-vendor@freebsd.org Fri Jan 13 03:30:31 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08F18CADDD5; Fri, 13 Jan 2017 03:30:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE7641EE7; Fri, 13 Jan 2017 03:30:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0D3UTvp022750; Fri, 13 Jan 2017 03:30:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0D3UTWQ022749; Fri, 13 Jan 2017 03:30:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701130330.v0D3UTWQ022749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 13 Jan 2017 03:30:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312007 - vendor/NetBSD/tests/01.11.2017_23.20 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 03:30:31 -0000 Author: ngie Date: Fri Jan 13 03:30:29 2017 New Revision: 312007 URL: https://svnweb.freebsd.org/changeset/base/312007 Log: Copy ^/vendor/NetBSD/tests/dist to .../01.11.2017_23.20 for incoming snapshot update Added: vendor/NetBSD/tests/01.11.2017_23.20/ - copied from r312006, vendor/NetBSD/tests/dist/ From owner-svn-src-vendor@freebsd.org Sat Jan 14 02:26:53 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB61BCAF551; Sat, 14 Jan 2017 02:26:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 591782000; Sat, 14 Jan 2017 02:26:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E2QqFR001561; Sat, 14 Jan 2017 02:26:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E2QlJt001507; Sat, 14 Jan 2017 02:26:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140226.v0E2QlJt001507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 02:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312106 - in vendor/NetBSD/tests/dist: dev/cgd dev/scsipi dev/sysmon fs/common fs/ffs fs/hfs fs/kernfs fs/lfs fs/msdosfs fs/nfs fs/nullfs fs/ptyfs fs/puffs fs/tmpfs fs/umapfs fs/union f... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 02:26:53 -0000 Author: ngie Date: Sat Jan 14 02:26:46 2017 New Revision: 312106 URL: https://svnweb.freebsd.org/changeset/base/312106 Log: Commit more accepted upstream changes from /tests/... This includes a number of accepted patches for: - lib/libc/sys - lib/libm christos was also nice enough to do the heavy lifting with the h_macros.h #includes so testcases which use h_macros.h now can work more easily with the FreeBSD tree's layout for contrib/netbsd-tests vs the testcases. Modified: vendor/NetBSD/tests/dist/dev/cgd/t_cgd_3des.c vendor/NetBSD/tests/dist/dev/cgd/t_cgd_aes.c vendor/NetBSD/tests/dist/dev/cgd/t_cgd_blowfish.c vendor/NetBSD/tests/dist/dev/scsipi/t_cd.c vendor/NetBSD/tests/dist/dev/sysmon/t_swwdog.c vendor/NetBSD/tests/dist/fs/common/h_fsmacros.h vendor/NetBSD/tests/dist/fs/ffs/h_quota2_tests.c vendor/NetBSD/tests/dist/fs/ffs/t_fifos.c vendor/NetBSD/tests/dist/fs/ffs/t_mount.c vendor/NetBSD/tests/dist/fs/ffs/t_quota2_1.c vendor/NetBSD/tests/dist/fs/ffs/t_quota2_remount.c vendor/NetBSD/tests/dist/fs/ffs/t_snapshot.c vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_log.c vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_v2.c vendor/NetBSD/tests/dist/fs/hfs/t_pathconvert.c vendor/NetBSD/tests/dist/fs/kernfs/t_basic.c vendor/NetBSD/tests/dist/fs/lfs/t_pr.c vendor/NetBSD/tests/dist/fs/msdosfs/t_snapshot.c vendor/NetBSD/tests/dist/fs/nfs/t_mountd.c vendor/NetBSD/tests/dist/fs/nullfs/t_basic.c vendor/NetBSD/tests/dist/fs/ptyfs/t_nullpts.c vendor/NetBSD/tests/dist/fs/ptyfs/t_ptyfs.c vendor/NetBSD/tests/dist/fs/puffs/t_basic.c vendor/NetBSD/tests/dist/fs/puffs/t_fuzz.c vendor/NetBSD/tests/dist/fs/puffs/t_io.c vendor/NetBSD/tests/dist/fs/tmpfs/t_renamerace.c vendor/NetBSD/tests/dist/fs/umapfs/t_basic.c vendor/NetBSD/tests/dist/fs/union/t_pr.c vendor/NetBSD/tests/dist/fs/vfs/t_full.c vendor/NetBSD/tests/dist/fs/vfs/t_io.c vendor/NetBSD/tests/dist/fs/vfs/t_renamerace.c vendor/NetBSD/tests/dist/fs/vfs/t_ro.c vendor/NetBSD/tests/dist/fs/vfs/t_union.c vendor/NetBSD/tests/dist/fs/vfs/t_unpriv.c vendor/NetBSD/tests/dist/fs/vfs/t_vfsops.c vendor/NetBSD/tests/dist/fs/vfs/t_vnops.c vendor/NetBSD/tests/dist/include/sys/t_socket.c vendor/NetBSD/tests/dist/kernel/kqueue/read/t_fifo.c vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file.c vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file2.c vendor/NetBSD/tests/dist/kernel/kqueue/read/t_pipe.c vendor/NetBSD/tests/dist/kernel/kqueue/read/t_ttypty.c vendor/NetBSD/tests/dist/kernel/kqueue/t_ioctl.c vendor/NetBSD/tests/dist/kernel/kqueue/t_proc1.c vendor/NetBSD/tests/dist/kernel/kqueue/t_proc2.c vendor/NetBSD/tests/dist/kernel/kqueue/t_proc3.c vendor/NetBSD/tests/dist/kernel/kqueue/t_sig.c vendor/NetBSD/tests/dist/kernel/kqueue/write/t_fifo.c vendor/NetBSD/tests/dist/kernel/kqueue/write/t_pipe.c vendor/NetBSD/tests/dist/kernel/kqueue/write/t_ttypty.c vendor/NetBSD/tests/dist/kernel/t_extent.c vendor/NetBSD/tests/dist/kernel/t_filedesc.c vendor/NetBSD/tests/dist/kernel/t_lock.c vendor/NetBSD/tests/dist/kernel/t_ptrace.c vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.c vendor/NetBSD/tests/dist/kernel/t_pty.c vendor/NetBSD/tests/dist/kernel/t_rnd.c vendor/NetBSD/tests/dist/lib/libc/gen/t_glob.c vendor/NetBSD/tests/dist/lib/libc/regex/debug.c vendor/NetBSD/tests/dist/lib/libc/regex/t_exhaust.c vendor/NetBSD/tests/dist/lib/libc/regex/t_regex_att.c vendor/NetBSD/tests/dist/lib/libc/sys/t_clock_gettime.c vendor/NetBSD/tests/dist/lib/libc/sys/t_connect.c vendor/NetBSD/tests/dist/lib/libc/sys/t_dup.c vendor/NetBSD/tests/dist/lib/libc/sys/t_getrusage.c vendor/NetBSD/tests/dist/lib/libc/sys/t_link.c vendor/NetBSD/tests/dist/lib/libc/sys/t_listen.c vendor/NetBSD/tests/dist/lib/libc/sys/t_mmap.c vendor/NetBSD/tests/dist/lib/libc/sys/t_msgctl.c vendor/NetBSD/tests/dist/lib/libc/sys/t_msgrcv.c vendor/NetBSD/tests/dist/lib/libc/sys/t_msgsnd.c vendor/NetBSD/tests/dist/lib/libc/sys/t_nanosleep.c vendor/NetBSD/tests/dist/lib/libc/sys/t_pipe.c vendor/NetBSD/tests/dist/lib/libc/sys/t_pipe2.c vendor/NetBSD/tests/dist/lib/libc/sys/t_posix_fadvise.c vendor/NetBSD/tests/dist/lib/libc/sys/t_revoke.c vendor/NetBSD/tests/dist/lib/libc/sys/t_select.c vendor/NetBSD/tests/dist/lib/libc/sys/t_setrlimit.c vendor/NetBSD/tests/dist/lib/libc/sys/t_sigaction.c vendor/NetBSD/tests/dist/lib/libc/sys/t_sigqueue.c vendor/NetBSD/tests/dist/lib/libc/sys/t_socketpair.c vendor/NetBSD/tests/dist/lib/libc/sys/t_stat.c vendor/NetBSD/tests/dist/lib/libc/sys/t_truncate.c vendor/NetBSD/tests/dist/lib/libc/sys/t_umask.c vendor/NetBSD/tests/dist/lib/libc/sys/t_unlink.c vendor/NetBSD/tests/dist/lib/libc/sys/t_wait.c vendor/NetBSD/tests/dist/lib/libc/sys/t_write.c vendor/NetBSD/tests/dist/lib/libm/t_ilogb.c vendor/NetBSD/tests/dist/lib/libm/t_scalbn.c vendor/NetBSD/tests/dist/lib/libposix/t_rename.c vendor/NetBSD/tests/dist/lib/librumpclient/t_fd.c vendor/NetBSD/tests/dist/lib/semaphore/sem.c vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_dlerror-cleared.c vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_dlerror-false.c vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_dlinfo.c vendor/NetBSD/tests/dist/libexec/ld.elf_so/t_ifunc.c vendor/NetBSD/tests/dist/modules/t_builtin.c vendor/NetBSD/tests/dist/net/bpf/t_bpf.c vendor/NetBSD/tests/dist/net/bpf/t_mbuf.c vendor/NetBSD/tests/dist/net/bpfilter/t_bpfilter.c vendor/NetBSD/tests/dist/net/bpfjit/t_bpfjit.c vendor/NetBSD/tests/dist/net/bpfjit/t_cop.c vendor/NetBSD/tests/dist/net/bpfjit/t_extmem.c vendor/NetBSD/tests/dist/net/bpfjit/t_mbuf.c vendor/NetBSD/tests/dist/net/carp/t_basic.c vendor/NetBSD/tests/dist/net/config/netconfig.c vendor/NetBSD/tests/dist/net/icmp/t_forward.c vendor/NetBSD/tests/dist/net/icmp/t_ping.c vendor/NetBSD/tests/dist/net/if_loop/t_pr.c vendor/NetBSD/tests/dist/net/ndp/t_ra.sh vendor/NetBSD/tests/dist/net/net/t_raw.c vendor/NetBSD/tests/dist/rump/modautoload/t_modautoload.c vendor/NetBSD/tests/dist/rump/rumpkern/t_kern.c vendor/NetBSD/tests/dist/rump/rumpkern/t_lwproc.c vendor/NetBSD/tests/dist/rump/rumpkern/t_modcmd.c vendor/NetBSD/tests/dist/rump/rumpkern/t_modlinkset.c vendor/NetBSD/tests/dist/rump/rumpkern/t_signals.c vendor/NetBSD/tests/dist/rump/rumpkern/t_threads.c vendor/NetBSD/tests/dist/rump/rumpkern/t_tsleep.c vendor/NetBSD/tests/dist/rump/rumpkern/t_vm.c vendor/NetBSD/tests/dist/rump/rumpvfs/t_basic.c vendor/NetBSD/tests/dist/rump/rumpvfs/t_etfs.c vendor/NetBSD/tests/dist/rump/rumpvfs/t_p2kifs.c Modified: vendor/NetBSD/tests/dist/dev/cgd/t_cgd_3des.c ============================================================================== --- vendor/NetBSD/tests/dist/dev/cgd/t_cgd_3des.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/dev/cgd/t_cgd_3des.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_cgd_3des.c,v 1.1 2016/11/11 07:39:58 alnsn Exp $ */ +/* $NetBSD: t_cgd_3des.c,v 1.2 2017/01/13 21:30:39 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. * All rights reserved. @@ -48,7 +48,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #define SECSIZE 512 Modified: vendor/NetBSD/tests/dist/dev/cgd/t_cgd_aes.c ============================================================================== --- vendor/NetBSD/tests/dist/dev/cgd/t_cgd_aes.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/dev/cgd/t_cgd_aes.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_cgd_aes.c,v 1.5 2016/12/11 00:23:44 alnsn Exp $ */ +/* $NetBSD: t_cgd_aes.c,v 1.6 2017/01/13 21:30:39 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. * Copyright (c) 2007 The Institute of Electrical and Electronics Engineers, Inc @@ -49,7 +49,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #define SECSIZE 512 Modified: vendor/NetBSD/tests/dist/dev/cgd/t_cgd_blowfish.c ============================================================================== --- vendor/NetBSD/tests/dist/dev/cgd/t_cgd_blowfish.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/dev/cgd/t_cgd_blowfish.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_cgd_blowfish.c,v 1.1 2016/11/10 23:44:36 alnsn Exp $ */ +/* $NetBSD: t_cgd_blowfish.c,v 1.2 2017/01/13 21:30:39 christos Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. * All rights reserved. @@ -48,7 +48,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #define SECSIZE 512 Modified: vendor/NetBSD/tests/dist/dev/scsipi/t_cd.c ============================================================================== --- vendor/NetBSD/tests/dist/dev/scsipi/t_cd.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/dev/scsipi/t_cd.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_cd.c,v 1.7 2014/04/25 00:24:39 pooka Exp $ */ +/* $NetBSD: t_cd.c,v 1.8 2017/01/13 21:30:39 christos Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -39,7 +39,7 @@ #include "scsitest.h" -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(noisyeject); ATF_TC_HEAD(noisyeject, tc) Modified: vendor/NetBSD/tests/dist/dev/sysmon/t_swwdog.c ============================================================================== --- vendor/NetBSD/tests/dist/dev/sysmon/t_swwdog.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/dev/sysmon/t_swwdog.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_swwdog.c,v 1.6 2015/04/23 04:49:37 pgoyette Exp $ */ +/* $NetBSD: t_swwdog.c,v 1.7 2017/01/13 21:30:39 christos Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -43,7 +43,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" static volatile sig_atomic_t tcount; Modified: vendor/NetBSD/tests/dist/fs/common/h_fsmacros.h ============================================================================== --- vendor/NetBSD/tests/dist/fs/common/h_fsmacros.h Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/common/h_fsmacros.h Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: h_fsmacros.h,v 1.40 2015/08/29 19:19:43 dholland Exp $ */ +/* $NetBSD: h_fsmacros.h,v 1.41 2017/01/13 21:30:39 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" #define FSPROTOS(_fs_) \ int _fs_##_fstest_newfs(const atf_tc_t *, void **, const char *, \ Modified: vendor/NetBSD/tests/dist/fs/ffs/h_quota2_tests.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ffs/h_quota2_tests.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ffs/h_quota2_tests.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: h_quota2_tests.c,v 1.4 2012/09/30 21:26:57 bouyer Exp $ */ +/* $NetBSD: h_quota2_tests.c,v 1.5 2017/01/13 21:30:39 christos Exp $ */ /* * rump server for advanced quota tests @@ -22,7 +22,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" int background = 0; Modified: vendor/NetBSD/tests/dist/fs/ffs/t_fifos.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ffs/t_fifos.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ffs/t_fifos.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fifos.c,v 1.5 2010/11/07 17:51:17 jmmv Exp $ */ +/* $NetBSD: t_fifos.c,v 1.6 2017/01/13 21:30:39 christos Exp $ */ #include #include @@ -17,7 +17,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC_WITH_CLEANUP(fifos); ATF_TC_HEAD(fifos, tc) Modified: vendor/NetBSD/tests/dist/fs/ffs/t_mount.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ffs/t_mount.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ffs/t_mount.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mount.c,v 1.13 2012/11/27 16:01:49 jakllsch Exp $ */ +/* $NetBSD: t_mount.c,v 1.14 2017/01/13 21:30:39 christos Exp $ */ /* * Basic tests for mounting @@ -25,7 +25,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(48Kimage); ATF_TC_HEAD(48Kimage, tc) Modified: vendor/NetBSD/tests/dist/fs/ffs/t_quota2_1.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ffs/t_quota2_1.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ffs/t_quota2_1.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_quota2_1.c,v 1.4 2012/03/15 02:02:22 joerg Exp $ */ +/* $NetBSD: t_quota2_1.c,v 1.5 2017/01/13 21:30:39 christos Exp $ */ /* * Basic tests for quota2 @@ -18,7 +18,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" static void do_quota(const atf_tc_t *tc, int n, const char *newfs_opts, int log) Modified: vendor/NetBSD/tests/dist/fs/ffs/t_quota2_remount.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ffs/t_quota2_remount.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ffs/t_quota2_remount.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_quota2_remount.c,v 1.4 2012/03/15 02:02:22 joerg Exp $ */ +/* $NetBSD: t_quota2_remount.c,v 1.5 2017/01/13 21:30:39 christos Exp $ */ /* * Basic tests for quota2 @@ -19,7 +19,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" static void do_quota(const atf_tc_t *tc, int n, const char *newfs_opts, int log) Modified: vendor/NetBSD/tests/dist/fs/ffs/t_snapshot.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ffs/t_snapshot.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ffs/t_snapshot.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_snapshot.c,v 1.6 2013/02/06 09:05:01 hannken Exp $ */ +/* $NetBSD: t_snapshot.c,v 1.7 2017/01/13 21:30:39 christos Exp $ */ #include #include @@ -15,7 +15,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #define IMGNAME "ffs.img" #define NEWFS "newfs -F -s 10000 " IMGNAME Modified: vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_log.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_log.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_log.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_snapshot_log.c,v 1.2 2013/02/06 09:05:01 hannken Exp $ */ +/* $NetBSD: t_snapshot_log.c,v 1.3 2017/01/13 21:30:39 christos Exp $ */ #include #include @@ -15,7 +15,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #define IMGNAME "ffs.img" #define NEWFS "newfs -F -s 10000 " IMGNAME Modified: vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_v2.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_v2.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ffs/t_snapshot_v2.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_snapshot_v2.c,v 1.2 2013/02/06 09:05:01 hannken Exp $ */ +/* $NetBSD: t_snapshot_v2.c,v 1.3 2017/01/13 21:30:39 christos Exp $ */ #include #include @@ -15,7 +15,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #define IMGNAME "ffs.img" #define NEWFS "newfs -F -s 10000 -O 2 " IMGNAME Modified: vendor/NetBSD/tests/dist/fs/hfs/t_pathconvert.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/hfs/t_pathconvert.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/hfs/t_pathconvert.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_pathconvert.c,v 1.5 2011/02/25 20:54:18 martin Exp $ */ +/* $NetBSD: t_pathconvert.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -18,7 +18,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(colonslash); ATF_TC_HEAD(colonslash, tc) Modified: vendor/NetBSD/tests/dist/fs/kernfs/t_basic.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/kernfs/t_basic.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/kernfs/t_basic.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_basic.c,v 1.3 2010/05/31 23:44:54 pooka Exp $ */ +/* $NetBSD: t_basic.c,v 1.4 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -20,7 +20,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(getdents); ATF_TC_HEAD(getdents, tc) Modified: vendor/NetBSD/tests/dist/fs/lfs/t_pr.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/lfs/t_pr.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/lfs/t_pr.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_pr.c,v 1.6 2011/02/22 18:41:05 pooka Exp $ */ +/* $NetBSD: t_pr.c,v 1.7 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -17,7 +17,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(mknod); ATF_TC_HEAD(mknod, tc) Modified: vendor/NetBSD/tests/dist/fs/msdosfs/t_snapshot.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/msdosfs/t_snapshot.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/msdosfs/t_snapshot.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_snapshot.c,v 1.3 2014/06/10 13:15:18 martin Exp $ */ +/* $NetBSD: t_snapshot.c,v 1.4 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -17,7 +17,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #define IMGNAME "msdosfs.img" #define NEWFS "newfs_msdos -C 5M " IMGNAME Modified: vendor/NetBSD/tests/dist/fs/nfs/t_mountd.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/nfs/t_mountd.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/nfs/t_mountd.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_mountd.c,v 1.5 2012/02/24 13:53:46 joerg Exp $ */ +/* $NetBSD: t_mountd.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #include "../common/h_fsmacros.h" ATF_TC(mountdhup); Modified: vendor/NetBSD/tests/dist/fs/nullfs/t_basic.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/nullfs/t_basic.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/nullfs/t_basic.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_basic.c,v 1.3 2010/06/09 08:37:16 pooka Exp $ */ +/* $NetBSD: t_basic.c,v 1.4 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -18,7 +18,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(basic); ATF_TC_HEAD(basic, tc) Modified: vendor/NetBSD/tests/dist/fs/ptyfs/t_nullpts.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ptyfs/t_nullpts.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ptyfs/t_nullpts.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_nullpts.c,v 1.5 2011/01/10 11:11:04 hannken Exp $ */ +/* $NetBSD: t_nullpts.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -19,7 +19,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" static void mountptyfs(const char *mp, int flags) Modified: vendor/NetBSD/tests/dist/fs/ptyfs/t_ptyfs.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/ptyfs/t_ptyfs.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/ptyfs/t_ptyfs.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptyfs.c,v 1.1 2010/06/11 23:52:38 pooka Exp $ */ +/* $NetBSD: t_ptyfs.c,v 1.2 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -17,7 +17,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" static void mountptyfs(const char *mp, int flags) Modified: vendor/NetBSD/tests/dist/fs/puffs/t_basic.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/puffs/t_basic.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/puffs/t_basic.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_basic.c,v 1.13 2016/12/01 14:49:04 hannken Exp $ */ +/* $NetBSD: t_basic.c,v 1.14 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -20,7 +20,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #include "../common/h_fsmacros.h" /* Modified: vendor/NetBSD/tests/dist/fs/puffs/t_fuzz.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/puffs/t_fuzz.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/puffs/t_fuzz.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fuzz.c,v 1.5 2012/04/21 01:03:46 manu Exp $ */ +/* $NetBSD: t_fuzz.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #define ITERATIONS 100 Modified: vendor/NetBSD/tests/dist/fs/puffs/t_io.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/puffs/t_io.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/puffs/t_io.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_io.c,v 1.1 2010/11/12 17:33:28 pooka Exp $ */ +/* $NetBSD: t_io.c,v 1.2 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -20,7 +20,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" #include "../common/h_fsmacros.h" #define MAKEOPTS(...) \ Modified: vendor/NetBSD/tests/dist/fs/tmpfs/t_renamerace.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/tmpfs/t_renamerace.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/tmpfs/t_renamerace.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_renamerace.c,v 1.13 2011/08/18 21:44:55 riastradh Exp $ */ +/* $NetBSD: t_renamerace.c,v 1.14 2017/01/13 21:30:40 christos Exp $ */ /* * Modified for rump and atf from a program supplied @@ -23,7 +23,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(renamerace2); ATF_TC_HEAD(renamerace2, tc) Modified: vendor/NetBSD/tests/dist/fs/umapfs/t_basic.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/umapfs/t_basic.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/umapfs/t_basic.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_basic.c,v 1.4 2010/07/19 15:35:39 pooka Exp $ */ +/* $NetBSD: t_basic.c,v 1.5 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -20,7 +20,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(basic); ATF_TC_HEAD(basic, tc) Modified: vendor/NetBSD/tests/dist/fs/union/t_pr.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/union/t_pr.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/union/t_pr.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_pr.c,v 1.8 2011/08/10 06:27:02 hannken Exp $ */ +/* $NetBSD: t_pr.c,v 1.9 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -17,7 +17,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(multilayer); ATF_TC_HEAD(multilayer, tc) Modified: vendor/NetBSD/tests/dist/fs/vfs/t_full.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/vfs/t_full.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/vfs/t_full.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_full.c,v 1.8 2013/03/16 05:45:37 jmmv Exp $ */ +/* $NetBSD: t_full.c,v 1.9 2017/01/13 21:30:40 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #include "../common/h_fsmacros.h" -#include "../../h_macros.h" +#include "h_macros.h" /* * Write this much over the image size. This is to force an NFS commit, Modified: vendor/NetBSD/tests/dist/fs/vfs/t_io.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/vfs/t_io.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/vfs/t_io.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_io.c,v 1.16 2015/04/04 12:34:44 riastradh Exp $ */ +/* $NetBSD: t_io.c,v 1.17 2017/01/13 21:30:40 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #include "../common/h_fsmacros.h" -#include "../../h_macros.h" +#include "h_macros.h" #define TESTSTR "this is a string. collect enough and you'll have Em" #define TESTSZ sizeof(TESTSTR) Modified: vendor/NetBSD/tests/dist/fs/vfs/t_renamerace.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/vfs/t_renamerace.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/vfs/t_renamerace.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_renamerace.c,v 1.33 2016/05/04 08:30:22 dholland Exp $ */ +/* $NetBSD: t_renamerace.c,v 1.34 2017/01/13 21:30:40 christos Exp $ */ /* * Modified for rump and atf from a program supplied @@ -34,7 +34,7 @@ #define FSTEST_IMGSIZE (50000 * 512) #include "../common/h_fsmacros.h" -#include "../../h_macros.h" +#include "h_macros.h" static volatile int quittingtime; pid_t wrkpid; Modified: vendor/NetBSD/tests/dist/fs/vfs/t_ro.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/vfs/t_ro.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/vfs/t_ro.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ro.c,v 1.5 2011/02/22 21:23:19 yamt Exp $ */ +/* $NetBSD: t_ro.c,v 1.6 2017/01/13 21:30:40 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #include "../common/h_fsmacros.h" -#include "../../h_macros.h" +#include "h_macros.h" #define AFILE "testfile" #define ADIR "testdir" Modified: vendor/NetBSD/tests/dist/fs/vfs/t_union.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/vfs/t_union.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/vfs/t_union.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_union.c,v 1.8 2011/08/07 06:01:51 hannken Exp $ */ +/* $NetBSD: t_union.c,v 1.9 2017/01/13 21:30:40 christos Exp $ */ #include #include @@ -17,7 +17,7 @@ #include -#include "../../h_macros.h" +#include "h_macros.h" #include "../common/h_fsmacros.h" #define MSTR "magic bus" Modified: vendor/NetBSD/tests/dist/fs/vfs/t_unpriv.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/vfs/t_unpriv.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/vfs/t_unpriv.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_unpriv.c,v 1.12 2015/04/09 19:51:13 riastradh Exp $ */ +/* $NetBSD: t_unpriv.c,v 1.13 2017/01/13 21:30:40 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #include "../common/h_fsmacros.h" -#include "../../h_macros.h" +#include "h_macros.h" #define USES_OWNER \ if (FSTYPE_MSDOS(tc)) \ Modified: vendor/NetBSD/tests/dist/fs/vfs/t_vfsops.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/vfs/t_vfsops.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/vfs/t_vfsops.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_vfsops.c,v 1.11 2011/04/04 19:16:58 hannken Exp $ */ +/* $NetBSD: t_vfsops.c,v 1.12 2017/01/13 21:30:40 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #include "../common/h_fsmacros.h" -#include "../../h_macros.h" +#include "h_macros.h" static void tmount(const atf_tc_t *tc, const char *path) Modified: vendor/NetBSD/tests/dist/fs/vfs/t_vnops.c ============================================================================== --- vendor/NetBSD/tests/dist/fs/vfs/t_vnops.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/fs/vfs/t_vnops.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_vnops.c,v 1.58 2016/08/29 02:31:46 kre Exp $ */ +/* $NetBSD: t_vnops.c,v 1.59 2017/01/13 21:30:40 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ #include #include "../common/h_fsmacros.h" -#include "../../h_macros.h" +#include "h_macros.h" #define TESTFILE "afile" Modified: vendor/NetBSD/tests/dist/include/sys/t_socket.c ============================================================================== --- vendor/NetBSD/tests/dist/include/sys/t_socket.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/include/sys/t_socket.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_socket.c,v 1.4 2015/02/27 08:30:30 martin Exp $ */ +/* $NetBSD: t_socket.c,v 1.5 2017/01/13 21:30:41 christos Exp $ */ #include #include @@ -18,7 +18,7 @@ #include #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(cmsg_sendfd_bounds); ATF_TC_HEAD(cmsg_sendfd_bounds, tc) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/read/t_fifo.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/read/t_fifo.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/read/t_fifo.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $ */ +/* $NetBSD: t_fifo.c,v 1.4 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $"); +__RCSID("$NetBSD: t_fifo.c,v 1.4 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_fifo.c,v 1.3 2010/11 #include -#include "../../../h_macros.h" +#include "h_macros.h" #define FIFONAME "fifo" Modified: vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_file.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $ */ +/* $NetBSD: t_file.c,v 1.4 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_file.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $"); +__RCSID("$NetBSD: t_file.c,v 1.4 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -50,7 +50,7 @@ __RCSID("$NetBSD: t_file.c,v 1.3 2010/11 #include -#include "../../../h_macros.h" +#include "h_macros.h" #define FILENAME "file" #define NLINES 5 Modified: vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file2.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file2.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/read/t_file2.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_file2.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $ */ +/* $NetBSD: t_file2.c,v 1.4 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_file2.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $"); +__RCSID("$NetBSD: t_file2.c,v 1.4 2017/01/13 21:30:41 christos Exp $"); #include @@ -41,7 +41,7 @@ __RCSID("$NetBSD: t_file2.c,v 1.3 2010/1 #include -#include "../../../h_macros.h" +#include "h_macros.h" ATF_TC(file2); ATF_TC_HEAD(file2, tc) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/read/t_pipe.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/read/t_pipe.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/read/t_pipe.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */ +/* $NetBSD: t_pipe.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $"); +__RCSID("$NetBSD: t_pipe.c,v 1.2 2017/01/13 21:30:41 christos Exp $"); #include @@ -41,7 +41,7 @@ __RCSID("$NetBSD: t_pipe.c,v 1.1 2009/02 #include -#include "../../../h_macros.h" +#include "h_macros.h" ATF_TC(pipe); ATF_TC_HEAD(pipe, tc) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/read/t_ttypty.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/read/t_ttypty.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/read/t_ttypty.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */ +/* $NetBSD: t_ttypty.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $"); +__RCSID("$NetBSD: t_ttypty.c,v 1.2 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_ttypty.c,v 1.1 2009/ #include -#include "../../../h_macros.h" +#include "h_macros.h" static void h_check(bool check_master) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/t_ioctl.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/t_ioctl.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/t_ioctl.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ioctl.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */ +/* $NetBSD: t_ioctl.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_ioctl.c,v 1.2 2015/01/14 22:22:32 christos Exp $"); +__RCSID("$NetBSD: t_ioctl.c,v 1.3 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -42,7 +42,7 @@ __RCSID("$NetBSD: t_ioctl.c,v 1.2 2015/0 #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(kfilter_byfilter); ATF_TC_HEAD(kfilter_byfilter, tc) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/t_proc1.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/t_proc1.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/t_proc1.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_proc1.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */ +/* $NetBSD: t_proc1.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_proc1.c,v 1.2 2015/01/14 22:22:32 christos Exp $"); +__RCSID("$NetBSD: t_proc1.c,v 1.3 2017/01/13 21:30:41 christos Exp $"); /* * this also used to trigger problem fixed in @@ -51,7 +51,7 @@ __RCSID("$NetBSD: t_proc1.c,v 1.2 2015/0 #include -#include "../../h_macros.h" +#include "h_macros.h" static int child(void) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/t_proc2.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/t_proc2.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/t_proc2.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_proc2.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */ +/* $NetBSD: t_proc2.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_proc2.c,v 1.2 2015/01/14 22:22:32 christos Exp $"); +__RCSID("$NetBSD: t_proc2.c,v 1.3 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_proc2.c,v 1.2 2015/0 #include -#include "../../h_macros.h" +#include "h_macros.h" static void child_two(void) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/t_proc3.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/t_proc3.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/t_proc3.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_proc3.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */ +/* $NetBSD: t_proc3.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: t_proc3.c,v 1.2 2015/01/14 22:22:32 christos Exp $"); +__RCSID("$NetBSD: t_proc3.c,v 1.3 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -45,7 +45,7 @@ __RCSID("$NetBSD: t_proc3.c,v 1.2 2015/0 #include -#include "../../h_macros.h" +#include "h_macros.h" ATF_TC(proc3); ATF_TC_HEAD(proc3, tc) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/t_sig.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/t_sig.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/t_sig.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_sig.c,v 1.2 2010/11/03 16:10:20 christos Exp $ */ +/* $NetBSD: t_sig.c,v 1.3 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_sig.c,v 1.2 2010/11/03 16:10:20 christos Exp $"); +__RCSID("$NetBSD: t_sig.c,v 1.3 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -48,7 +48,7 @@ __RCSID("$NetBSD: t_sig.c,v 1.2 2010/11/ #include -#include "../../h_macros.h" +#include "h_macros.h" #define NSIGNALS 5 Modified: vendor/NetBSD/tests/dist/kernel/kqueue/write/t_fifo.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/write/t_fifo.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/write/t_fifo.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $ */ +/* $NetBSD: t_fifo.c,v 1.4 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_fifo.c,v 1.3 2010/11/07 17:51:20 jmmv Exp $"); +__RCSID("$NetBSD: t_fifo.c,v 1.4 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -46,7 +46,7 @@ __RCSID("$NetBSD: t_fifo.c,v 1.3 2010/11 #include -#include "../../../h_macros.h" +#include "h_macros.h" #define FIFONAME "fifo" Modified: vendor/NetBSD/tests/dist/kernel/kqueue/write/t_pipe.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/write/t_pipe.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/write/t_pipe.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */ +/* $NetBSD: t_pipe.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_pipe.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $"); +__RCSID("$NetBSD: t_pipe.c,v 1.2 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -44,7 +44,7 @@ __RCSID("$NetBSD: t_pipe.c,v 1.1 2009/02 #include -#include "../../../h_macros.h" +#include "h_macros.h" ATF_TC(pipe1); ATF_TC_HEAD(pipe1, tc) Modified: vendor/NetBSD/tests/dist/kernel/kqueue/write/t_ttypty.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/kqueue/write/t_ttypty.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/kqueue/write/t_ttypty.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:58 jmmv Exp $ */ +/* $NetBSD: t_ttypty.c,v 1.2 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_ttypty.c,v 1.1 2009/02/20 21:39:58 jmmv Exp $"); +__RCSID("$NetBSD: t_ttypty.c,v 1.2 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -47,7 +47,7 @@ __RCSID("$NetBSD: t_ttypty.c,v 1.1 2009/ #include -#include "../../../h_macros.h" +#include "h_macros.h" static void h_check(bool check_master) Modified: vendor/NetBSD/tests/dist/kernel/t_extent.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/t_extent.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/t_extent.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_extent.c,v 1.4 2012/01/27 18:53:10 para Exp $ */ +/* $NetBSD: t_extent.c,v 1.5 2017/01/13 21:30:41 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_extent.c,v 1.4 2012/01/27 18:53:10 para Exp $"); +__RCSID("$NetBSD: t_extent.c,v 1.5 2017/01/13 21:30:41 christos Exp $"); #include #include @@ -41,7 +41,7 @@ __RCSID("$NetBSD: t_extent.c,v 1.4 2012/ #include -#include "../h_macros.h" +#include "h_macros.h" static int ret; static struct extent *ex; Modified: vendor/NetBSD/tests/dist/kernel/t_filedesc.c ============================================================================== --- vendor/NetBSD/tests/dist/kernel/t_filedesc.c Sat Jan 14 01:37:03 2017 (r312105) +++ vendor/NetBSD/tests/dist/kernel/t_filedesc.c Sat Jan 14 02:26:46 2017 (r312106) @@ -1,4 +1,4 @@ -/* $NetBSD: t_filedesc.c,v 1.5 2012/03/18 09:46:50 jruoho Exp $ */ +/* $NetBSD: t_filedesc.c,v 1.6 2017/01/13 21:30:41 christos Exp $ */ /*- *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jan 14 06:18:55 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5FBECAF517; Sat, 14 Jan 2017 06:18:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DAA81906; Sat, 14 Jan 2017 06:18:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0E6IsuX096225; Sat, 14 Jan 2017 06:18:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0E6Isj3096222; Sat, 14 Jan 2017 06:18:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701140618.v0E6Isj3096222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 14 Jan 2017 06:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312123 - in vendor/NetBSD/tests/dist: dev/clock_subr kernel kernel/arch kernel/arch/amd64 kernel/arch/i386 lib/libc/gen/exect lib/libpthread_dbg lib/librefuse net/if_tun net/if_vlan sy... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 06:18:56 -0000 Author: ngie Date: Sat Jan 14 06:18:54 2017 New Revision: 312123 URL: https://svnweb.freebsd.org/changeset/base/312123 Log: Add additional tests missed in previous merges Reminder: use cvs up -APd to pull new directories Added: vendor/NetBSD/tests/dist/dev/clock_subr/ vendor/NetBSD/tests/dist/dev/clock_subr/clock_subr_test_data_gen.sh (contents, props changed) vendor/NetBSD/tests/dist/dev/clock_subr/t_clock_subr.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/ vendor/NetBSD/tests/dist/kernel/arch/amd64/ vendor/NetBSD/tests/dist/kernel/arch/amd64/t_ptrace_wait.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/amd64/t_ptrace_wait3.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/amd64/t_ptrace_wait4.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/amd64/t_ptrace_wait6.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/amd64/t_ptrace_waitid.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/amd64/t_ptrace_waitpid.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/i386/ vendor/NetBSD/tests/dist/kernel/arch/i386/t_ptrace_wait.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/i386/t_ptrace_wait3.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/i386/t_ptrace_wait4.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/i386/t_ptrace_wait6.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/i386/t_ptrace_waitid.c (contents, props changed) vendor/NetBSD/tests/dist/kernel/arch/i386/t_ptrace_waitpid.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libc/gen/exect/ vendor/NetBSD/tests/dist/lib/libc/gen/exect/t_exect.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread_dbg/ vendor/NetBSD/tests/dist/lib/libpthread_dbg/h_common.h (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread_dbg/t_dummy.c (contents, props changed) vendor/NetBSD/tests/dist/lib/libpthread_dbg/t_threads.c (contents, props changed) vendor/NetBSD/tests/dist/lib/librefuse/ vendor/NetBSD/tests/dist/lib/librefuse/t_refuse_opt.c (contents, props changed) vendor/NetBSD/tests/dist/net/if_tun/ vendor/NetBSD/tests/dist/net/if_tun/t_tun.sh (contents, props changed) vendor/NetBSD/tests/dist/net/if_vlan/ vendor/NetBSD/tests/dist/net/if_vlan/t_vlan.sh (contents, props changed) vendor/NetBSD/tests/dist/sys/uvm/ vendor/NetBSD/tests/dist/sys/uvm/t_uvm_physseg.c (contents, props changed) vendor/NetBSD/tests/dist/sys/uvm/t_uvm_physseg_load.c (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/mixerctl/ vendor/NetBSD/tests/dist/usr.bin/mixerctl/t_mixerctl.sh (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/uniq/ vendor/NetBSD/tests/dist/usr.bin/uniq/d_basic.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/uniq/d_basic.out vendor/NetBSD/tests/dist/usr.bin/uniq/d_counts.out vendor/NetBSD/tests/dist/usr.bin/uniq/d_input.in (contents, props changed) vendor/NetBSD/tests/dist/usr.bin/uniq/d_show_duplicates.out vendor/NetBSD/tests/dist/usr.bin/uniq/d_show_uniques.out vendor/NetBSD/tests/dist/usr.bin/uniq/t_uniq.sh (contents, props changed) Modified: vendor/NetBSD/tests/dist/kernel/t_ptrace_wait.c Added: vendor/NetBSD/tests/dist/dev/clock_subr/clock_subr_test_data_gen.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/dev/clock_subr/clock_subr_test_data_gen.sh Sat Jan 14 06:18:54 2017 (r312123) @@ -0,0 +1,25 @@ +#!/bin/ksh + +export TZ=Etc/Universal + +datesub() { + gdate "$@" '+ FILL(%_11s,%_4Y,%_m,%_d,%w,%_H,%_M,%_S), // %a %b %e %H:%M:%S %Z %Y' +} + +( + datesub -d '1970/01/01 00:00:00' + datesub -d '1981/04/12 12:00:03' + datesub -d '2011/07/21 09:57:00' + datesub -d @2147483647 + datesub -d @2147483648 + datesub -d '2063/04/05 00:00:00' + for year in `seq 1970 1 2030`; do + datesub -d "${year}/01/01 00:00:00" + datesub -d "${year}/07/01 00:00:00" + done + for year in `seq 2000 25 2600`; do + datesub -d "$((${year} - 1))/12/31 23:59:59" + datesub -d "$((${year} + 0))/01/01 00:00:00" + datesub -d "$((${year} + 1))/01/01 00:00:00" + done +)|sort -u Added: vendor/NetBSD/tests/dist/dev/clock_subr/t_clock_subr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/dev/clock_subr/t_clock_subr.c Sat Jan 14 06:18:54 2017 (r312123) @@ -0,0 +1,309 @@ +/* $NetBSD: t_clock_subr.c,v 1.3 2017/01/13 21:30:39 christos Exp $ */ + +/* + * Copyright (c) 2016 Jonathan A. Kollasch + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__COPYRIGHT("@(#) Copyright (c) 2016\ + Jonathan A. Kollasch. All rights reserved."); +__RCSID("$NetBSD: t_clock_subr.c,v 1.3 2017/01/13 21:30:39 christos Exp $"); + +#include +#include + +#include +#include +#include + +#include + +#include "h_macros.h" + +#define FILL(ti,ye,mo,da,wd,ho,mi,se) \ +{ .time = (ti), .clock = { .dt_year = (ye), .dt_mon = (mo), .dt_day = (da), \ + .dt_wday = (wd), .dt_hour = (ho), .dt_min = (mi), .dt_sec = (se), } } + +static struct clock_test { + time_t time; + struct clock_ymdhms clock; +} const clock_tests[] = { + FILL( 0,1970, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1970 + FILL( 15638400,1970, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1970 + FILL( 31536000,1971, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1971 + FILL( 47174400,1971, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1971 + FILL( 63072000,1972, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 1972 + FILL( 78796800,1972, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 1972 + FILL( 94694400,1973, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 1973 + FILL( 110332800,1973, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 1973 + FILL( 126230400,1974, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 1974 + FILL( 141868800,1974, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 1974 + FILL( 157766400,1975, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 1975 + FILL( 173404800,1975, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 1975 + FILL( 189302400,1976, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1976 + FILL( 205027200,1976, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1976 + FILL( 220924800,1977, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 1977 + FILL( 236563200,1977, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 1977 + FILL( 252460800,1978, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 1978 + FILL( 268099200,1978, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 1978 + FILL( 283996800,1979, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 1979 + FILL( 299635200,1979, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 1979 + FILL( 315532800,1980, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 1980 + FILL( 331257600,1980, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 1980 + FILL( 347155200,1981, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1981 + FILL( 355924803,1981, 4,12,0,12, 0, 3), // Sun Apr 12 12:00:03 UTC 1981 + FILL( 362793600,1981, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1981 + FILL( 378691200,1982, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1982 + FILL( 394329600,1982, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1982 + FILL( 410227200,1983, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 1983 + FILL( 425865600,1983, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 1983 + FILL( 441763200,1984, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 1984 + FILL( 457488000,1984, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 1984 + FILL( 473385600,1985, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 1985 + FILL( 489024000,1985, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 1985 + FILL( 504921600,1986, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 1986 + FILL( 520560000,1986, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 1986 + FILL( 536457600,1987, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1987 + FILL( 552096000,1987, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1987 + FILL( 567993600,1988, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1988 + FILL( 583718400,1988, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 1988 + FILL( 599616000,1989, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 1989 + FILL( 615254400,1989, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 1989 + FILL( 631152000,1990, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 1990 + FILL( 646790400,1990, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 1990 + FILL( 662688000,1991, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 1991 + FILL( 678326400,1991, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 1991 + FILL( 694224000,1992, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 1992 + FILL( 709948800,1992, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1992 + FILL( 725846400,1993, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1993 + FILL( 741484800,1993, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1993 + FILL( 757382400,1994, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 1994 + FILL( 773020800,1994, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 1994 + FILL( 788918400,1995, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 1995 + FILL( 804556800,1995, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 1995 + FILL( 820454400,1996, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 1996 + FILL( 836179200,1996, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 1996 + FILL( 852076800,1997, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 1997 + FILL( 867715200,1997, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 1997 + FILL( 883612800,1998, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 1998 + FILL( 899251200,1998, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 1998 + FILL( 915148800,1999, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 1999 + FILL( 930787200,1999, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 1999 + FILL( 946684799,1999,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 1999 + FILL( 946684800,2000, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2000 + FILL( 962409600,2000, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2000 + FILL( 978307200,2001, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2001 + FILL( 993945600,2001, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2001 + FILL( 1009843200,2002, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2002 + FILL( 1025481600,2002, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2002 + FILL( 1041379200,2003, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2003 + FILL( 1057017600,2003, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 2003 + FILL( 1072915200,2004, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2004 + FILL( 1088640000,2004, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 2004 + FILL( 1104537600,2005, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2005 + FILL( 1120176000,2005, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 2005 + FILL( 1136073600,2006, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2006 + FILL( 1151712000,2006, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2006 + FILL( 1167609600,2007, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2007 + FILL( 1183248000,2007, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2007 + FILL( 1199145600,2008, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2008 + FILL( 1214870400,2008, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 2008 + FILL( 1230768000,2009, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2009 + FILL( 1246406400,2009, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 2009 + FILL( 1262304000,2010, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2010 + FILL( 1277942400,2010, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 2010 + FILL( 1293840000,2011, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2011 + FILL( 1309478400,2011, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 2011 + FILL( 1311242220,2011, 7,21,4, 9,57, 0), // Thu Jul 21 09:57:00 UTC 2011 + FILL( 1325376000,2012, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2012 + FILL( 1341100800,2012, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2012 + FILL( 1356998400,2013, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2013 + FILL( 1372636800,2013, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2013 + FILL( 1388534400,2014, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2014 + FILL( 1404172800,2014, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 2014 + FILL( 1420070400,2015, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2015 + FILL( 1435708800,2015, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 2015 + FILL( 1451606400,2016, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2016 + FILL( 1467331200,2016, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 2016 + FILL( 1483228800,2017, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2017 + FILL( 1498867200,2017, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2017 + FILL( 1514764800,2018, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2018 + FILL( 1530403200,2018, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2018 + FILL( 1546300800,2019, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2019 + FILL( 1561939200,2019, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2019 + FILL( 1577836800,2020, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2020 + FILL( 1593561600,2020, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 2020 + FILL( 1609459200,2021, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2021 + FILL( 1625097600,2021, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 2021 + FILL( 1640995200,2022, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2022 + FILL( 1656633600,2022, 7, 1,5, 0, 0, 0), // Fri Jul 1 00:00:00 UTC 2022 + FILL( 1672531200,2023, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2023 + FILL( 1688169600,2023, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2023 + FILL( 1704067200,2024, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2024 + FILL( 1719792000,2024, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2024 + FILL( 1735689599,2024,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2024 + FILL( 1735689600,2025, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2025 + FILL( 1751328000,2025, 7, 1,2, 0, 0, 0), // Tue Jul 1 00:00:00 UTC 2025 + FILL( 1767225600,2026, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2026 + FILL( 1782864000,2026, 7, 1,3, 0, 0, 0), // Wed Jul 1 00:00:00 UTC 2026 + FILL( 1798761600,2027, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2027 + FILL( 1814400000,2027, 7, 1,4, 0, 0, 0), // Thu Jul 1 00:00:00 UTC 2027 + FILL( 1830297600,2028, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2028 + FILL( 1846022400,2028, 7, 1,6, 0, 0, 0), // Sat Jul 1 00:00:00 UTC 2028 + FILL( 1861920000,2029, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2029 + FILL( 1877558400,2029, 7, 1,0, 0, 0, 0), // Sun Jul 1 00:00:00 UTC 2029 + FILL( 1893456000,2030, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2030 + FILL( 1909094400,2030, 7, 1,1, 0, 0, 0), // Mon Jul 1 00:00:00 UTC 2030 + FILL( 2147483647,2038, 1,19,2, 3,14, 7), // Tue Jan 19 03:14:07 UTC 2038 + FILL( 2147483648,2038, 1,19,2, 3,14, 8), // Tue Jan 19 03:14:08 UTC 2038 + FILL( 2524607999,2049,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 2049 + FILL( 2524608000,2050, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2050 + FILL( 2556144000,2051, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2051 + FILL( 2942956800,2063, 4, 5,4, 0, 0, 0), // Thu Apr 5 00:00:00 UTC 2063 + FILL( 3313526399,2074,12,31,1,23,59,59), // Mon Dec 31 23:59:59 UTC 2074 + FILL( 3313526400,2075, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2075 + FILL( 3345062400,2076, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2076 + FILL( 4102444799,2099,12,31,4,23,59,59), // Thu Dec 31 23:59:59 UTC 2099 + FILL( 4102444800,2100, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2100 + FILL( 4133980800,2101, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2101 + FILL( 4891363199,2124,12,31,0,23,59,59), // Sun Dec 31 23:59:59 UTC 2124 + FILL( 4891363200,2125, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2125 + FILL( 4922899200,2126, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2126 + FILL( 5680281599,2149,12,31,3,23,59,59), // Wed Dec 31 23:59:59 UTC 2149 + FILL( 5680281600,2150, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2150 + FILL( 5711817600,2151, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2151 + FILL( 6469199999,2174,12,31,6,23,59,59), // Sat Dec 31 23:59:59 UTC 2174 + FILL( 6469200000,2175, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2175 + FILL( 6500736000,2176, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2176 + FILL( 7258118399,2199,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2199 + FILL( 7258118400,2200, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2200 + FILL( 7289654400,2201, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2201 + FILL( 8047036799,2224,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 2224 + FILL( 8047036800,2225, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2225 + FILL( 8078572800,2226, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2226 + FILL( 8835955199,2249,12,31,1,23,59,59), // Mon Dec 31 23:59:59 UTC 2249 + FILL( 8835955200,2250, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2250 + FILL( 8867491200,2251, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2251 + FILL( 9624873599,2274,12,31,4,23,59,59), // Thu Dec 31 23:59:59 UTC 2274 + FILL( 9624873600,2275, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2275 + FILL( 9656409600,2276, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2276 + FILL(10413791999,2299,12,31,0,23,59,59), // Sun Dec 31 23:59:59 UTC 2299 + FILL(10413792000,2300, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2300 + FILL(10445328000,2301, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2301 + FILL(11202710399,2324,12,31,3,23,59,59), // Wed Dec 31 23:59:59 UTC 2324 + FILL(11202710400,2325, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2325 + FILL(11234246400,2326, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2326 + FILL(11991628799,2349,12,31,6,23,59,59), // Sat Dec 31 23:59:59 UTC 2349 + FILL(11991628800,2350, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2350 + FILL(12023164800,2351, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2351 + FILL(12780547199,2374,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2374 + FILL(12780547200,2375, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2375 + FILL(12812083200,2376, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2376 + FILL(13569465599,2399,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 2399 + FILL(13569465600,2400, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2400 + FILL(13601088000,2401, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2401 + FILL(14358470399,2424,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2424 + FILL(14358470400,2425, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2425 + FILL(14390006400,2426, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2426 + FILL(15147388799,2449,12,31,5,23,59,59), // Fri Dec 31 23:59:59 UTC 2449 + FILL(15147388800,2450, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2450 + FILL(15178924800,2451, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2451 + FILL(15936307199,2474,12,31,1,23,59,59), // Mon Dec 31 23:59:59 UTC 2474 + FILL(15936307200,2475, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2475 + FILL(15967843200,2476, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2476 + FILL(16725225599,2499,12,31,4,23,59,59), // Thu Dec 31 23:59:59 UTC 2499 + FILL(16725225600,2500, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2500 + FILL(16756761600,2501, 1, 1,6, 0, 0, 0), // Sat Jan 1 00:00:00 UTC 2501 + FILL(17514143999,2524,12,31,0,23,59,59), // Sun Dec 31 23:59:59 UTC 2524 + FILL(17514144000,2525, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2525 + FILL(17545680000,2526, 1, 1,2, 0, 0, 0), // Tue Jan 1 00:00:00 UTC 2526 + FILL(18303062399,2549,12,31,3,23,59,59), // Wed Dec 31 23:59:59 UTC 2549 + FILL(18303062400,2550, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2550 + FILL(18334598400,2551, 1, 1,5, 0, 0, 0), // Fri Jan 1 00:00:00 UTC 2551 + FILL(19091980799,2574,12,31,6,23,59,59), // Sat Dec 31 23:59:59 UTC 2574 + FILL(19091980800,2575, 1, 1,0, 0, 0, 0), // Sun Jan 1 00:00:00 UTC 2575 + FILL(19123516800,2576, 1, 1,1, 0, 0, 0), // Mon Jan 1 00:00:00 UTC 2576 + FILL(19880899199,2599,12,31,2,23,59,59), // Tue Dec 31 23:59:59 UTC 2599 + FILL(19880899200,2600, 1, 1,3, 0, 0, 0), // Wed Jan 1 00:00:00 UTC 2600 + FILL(19912435200,2601, 1, 1,4, 0, 0, 0), // Thu Jan 1 00:00:00 UTC 2601 +}; +#undef FILL + +ATF_TC(ymdhms_to_secs); +ATF_TC_HEAD(ymdhms_to_secs, tc) +{ + + atf_tc_set_md_var(tc, "descr", "check clock_ymdhms_to_secs"); +} +ATF_TC_BODY(ymdhms_to_secs, tc) +{ + time_t secs; + size_t i; + + for (i = 0; i < __arraycount(clock_tests); i++) { + secs = clock_ymdhms_to_secs(__UNCONST(&clock_tests[i].clock)); + ATF_CHECK_EQ_MSG(clock_tests[i].time, secs, "%jd != %jd", + (intmax_t)clock_tests[i].time, (intmax_t)secs); + } +} + +ATF_TC(secs_to_ymdhms); +ATF_TC_HEAD(secs_to_ymdhms, tc) +{ + + atf_tc_set_md_var(tc, "descr", "check clock_secs_to_ymdhms"); +} +ATF_TC_BODY(secs_to_ymdhms, tc) +{ + struct clock_ymdhms ymdhms; + size_t i; + +#define CHECK_FIELD(f) \ + ATF_CHECK_EQ_MSG(ymdhms.dt_##f, clock_tests[i].clock.dt_##f, \ + "%jd != %jd for %jd", (intmax_t)ymdhms.dt_##f, \ + (intmax_t)clock_tests[i].clock.dt_##f, \ + (intmax_t)clock_tests[i].time) + + for (i = 0; i < __arraycount(clock_tests); i++) { + clock_secs_to_ymdhms(clock_tests[i].time, &ymdhms); + CHECK_FIELD(year); + CHECK_FIELD(mon); + CHECK_FIELD(day); + CHECK_FIELD(wday); + CHECK_FIELD(hour); + CHECK_FIELD(min); + CHECK_FIELD(sec); + } +#undef CHECK_FIELD +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, ymdhms_to_secs); + ATF_TP_ADD_TC(tp, secs_to_ymdhms); + + return atf_no_error(); +} Added: vendor/NetBSD/tests/dist/kernel/arch/amd64/t_ptrace_wait.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/tests/dist/kernel/arch/amd64/t_ptrace_wait.c Sat Jan 14 06:18:54 2017 (r312123) @@ -0,0 +1,1388 @@ +/* $NetBSD: t_ptrace_wait.c,v 1.9 2017/01/13 21:30:41 christos Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.9 2017/01/13 21:30:41 christos Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "h_macros.h" + +#include "../../t_ptrace_wait.h" + + +#if defined(HAVE_GPREGS) +ATF_TC(regs1); +ATF_TC_HEAD(regs1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Call PT_GETREGS and iterate over General Purpose registers"); +} + +ATF_TC_BODY(regs1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg r; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1); + + printf("RAX=%#" PRIxREGISTER "\n", r.regs[_REG_RAX]); + printf("RBX=%#" PRIxREGISTER "\n", r.regs[_REG_RBX]); + printf("RCX=%#" PRIxREGISTER "\n", r.regs[_REG_RCX]); + printf("RDX=%#" PRIxREGISTER "\n", r.regs[_REG_RDX]); + + printf("RDI=%#" PRIxREGISTER "\n", r.regs[_REG_RDI]); + printf("RSI=%#" PRIxREGISTER "\n", r.regs[_REG_RSI]); + + printf("GS=%#" PRIxREGISTER "\n", r.regs[_REG_GS]); + printf("FS=%#" PRIxREGISTER "\n", r.regs[_REG_FS]); + printf("ES=%#" PRIxREGISTER "\n", r.regs[_REG_ES]); + printf("DS=%#" PRIxREGISTER "\n", r.regs[_REG_DS]); + printf("CS=%#" PRIxREGISTER "\n", r.regs[_REG_CS]); + printf("SS=%#" PRIxREGISTER "\n", r.regs[_REG_SS]); + + printf("RSP=%#" PRIxREGISTER "\n", r.regs[_REG_RSP]); + printf("RIP=%#" PRIxREGISTER "\n", r.regs[_REG_RIP]); + + printf("RFLAGS=%#" PRIxREGISTER "\n", r.regs[_REG_RFLAGS]); + + printf("R8=%#" PRIxREGISTER "\n", r.regs[_REG_R8]); + printf("R9=%#" PRIxREGISTER "\n", r.regs[_REG_R9]); + printf("R10=%#" PRIxREGISTER "\n", r.regs[_REG_R10]); + printf("R11=%#" PRIxREGISTER "\n", r.regs[_REG_R11]); + printf("R12=%#" PRIxREGISTER "\n", r.regs[_REG_R12]); + printf("R13=%#" PRIxREGISTER "\n", r.regs[_REG_R13]); + printf("R14=%#" PRIxREGISTER "\n", r.regs[_REG_R14]); + printf("R15=%#" PRIxREGISTER "\n", r.regs[_REG_R15]); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(__HAVE_PTRACE_WATCHPOINTS) +ATF_TC(watchpoint_count); +ATF_TC_HEAD(watchpoint_count, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Call PT_COUNT_WATCHPOINTS and assert four available watchpoints"); +} + +ATF_TC_BODY(watchpoint_count, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int N; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE((N = ptrace(PT_COUNT_WATCHPOINTS, child, NULL, 0)) != -1); + printf("Reported %d watchpoints\n", N); + + ATF_REQUIRE_EQ_MSG(N, 4, "Expected 4 hw watchpoints - got %d", N); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(__HAVE_PTRACE_WATCHPOINTS) +ATF_TC(watchpoint_read); +ATF_TC_HEAD(watchpoint_read, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Call PT_COUNT_WATCHPOINTS and assert four available watchpoints"); +} + +ATF_TC_BODY(watchpoint_read, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int i, N; + struct ptrace_watchpoint pw; + int len = sizeof(pw); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE((N = ptrace(PT_COUNT_WATCHPOINTS, child, NULL, 0)) != -1); + + ATF_REQUIRE_EQ_MSG(N, 4, "Expected 4 hw watchpoints - got %d", N); + + for (i = 0; i < N; i++) { + printf("Before reading watchpoint %d\n", i); + pw.pw_index = i; + ATF_REQUIRE(ptrace(PT_READ_WATCHPOINT, child, &pw, len) != -1); + + printf("struct ptrace {\n"); + printf("\t.pw_index=%d\n", pw.pw_index); + printf("\t.pw_lwpid=%d\n", pw.pw_lwpid); + printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address); + printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition); + printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length); + printf("}\n"); + } + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(__HAVE_PTRACE_WATCHPOINTS) +ATF_TC(watchpoint_write_unmodified); +ATF_TC_HEAD(watchpoint_write_unmodified, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Call PT_COUNT_WATCHPOINTS and assert functional write of " + "unmodified data"); +} + +ATF_TC_BODY(watchpoint_write_unmodified, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int i, N; + struct ptrace_watchpoint pw; + int len = sizeof(pw); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE((N = ptrace(PT_COUNT_WATCHPOINTS, child, NULL, 0)) != -1); + + ATF_REQUIRE_EQ_MSG(N, 4, "Expected 4 hw watchpoints - got %d", N); + + for (i = 0; i < N; i++) { + printf("Before reading watchpoint %d\n", i); + pw.pw_index = i; + ATF_REQUIRE(ptrace(PT_READ_WATCHPOINT, child, &pw, len) != -1); + + printf("struct ptrace {\n"); + printf("\t.pw_index=%d\n", pw.pw_index); + printf("\t.pw_lwpid=%d\n", pw.pw_lwpid); + printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address); + printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition); + printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length); + printf("}\n"); + + printf("Before writing watchpoint %d (unmodified)\n", i); + ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) + != -1); + } + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(__HAVE_PTRACE_WATCHPOINTS) +ATF_TC(watchpoint_trap_code0); +ATF_TC_HEAD(watchpoint_trap_code0, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Call PT_COUNT_WATCHPOINTS and test code trap with watchpoint 0"); +} + +ATF_TC_BODY(watchpoint_trap_code0, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + const int i = 0; + struct ptrace_watchpoint pw; + int len = sizeof(pw); + int watchme = 1234; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("check_happy(%d)=%d\n", watchme, check_happy(watchme)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Preparing code watchpoint trap %d\n", i); + + pw.pw_index = i; + pw.pw_lwpid = 0; + pw.pw_md.md_address = (void *)check_happy; + pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_EXECUTION; + pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE; + + printf("struct ptrace {\n"); + printf("\t.pw_index=%d\n", pw.pw_index); + printf("\t.pw_lwpid=%d\n", pw.pw_lwpid); + printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address); + printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition); + printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length); + printf("}\n"); + + printf("Before writing watchpoint %d\n", i); + ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1); + + printf("Before resuming the child process where it left off " + "and without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGTRAP); + + pw.pw_md.md_address = NULL; + printf("Before writing watchpoint %d (disable it)\n", i); + ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(__HAVE_PTRACE_WATCHPOINTS) +ATF_TC(watchpoint_trap_code1); +ATF_TC_HEAD(watchpoint_trap_code1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Call PT_COUNT_WATCHPOINTS and test code trap with watchpoint 1"); +} + +ATF_TC_BODY(watchpoint_trap_code1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + const int i = 1; + struct ptrace_watchpoint pw; + int len = sizeof(pw); + int watchme = 1234; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("check_happy(%d)=%d\n", watchme, check_happy(watchme)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Preparing code watchpoint trap %d\n", i); + + pw.pw_index = i; + pw.pw_lwpid = 0; + pw.pw_md.md_address = (void *)check_happy; + pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_EXECUTION; + pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE; + + printf("struct ptrace {\n"); + printf("\t.pw_index=%d\n", pw.pw_index); + printf("\t.pw_lwpid=%d\n", pw.pw_lwpid); + printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address); + printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition); + printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length); + printf("}\n"); + + printf("Before writing watchpoint %d\n", i); + ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1); + + printf("Before resuming the child process where it left off " + "and without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGTRAP); + + pw.pw_md.md_address = NULL; + printf("Before writing watchpoint %d (disable it)\n", i); + ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(__HAVE_PTRACE_WATCHPOINTS) +ATF_TC(watchpoint_trap_code2); +ATF_TC_HEAD(watchpoint_trap_code2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Call PT_COUNT_WATCHPOINTS and test code trap with watchpoint 2"); +} + +ATF_TC_BODY(watchpoint_trap_code2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + const int i = 2; + struct ptrace_watchpoint pw; + int len = sizeof(pw); + int watchme = 1234; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("check_happy(%d)=%d\n", watchme, check_happy(watchme)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Preparing code watchpoint trap %d\n", i); + + pw.pw_index = i; + pw.pw_lwpid = 0; + pw.pw_md.md_address = (void *)check_happy; + pw.pw_md.md_condition = X86_HW_WATCHPOINT_DR7_CONDITION_EXECUTION; + pw.pw_md.md_length = X86_HW_WATCHPOINT_DR7_LENGTH_BYTE; + + printf("struct ptrace {\n"); + printf("\t.pw_index=%d\n", pw.pw_index); + printf("\t.pw_lwpid=%d\n", pw.pw_lwpid); + printf("\t.pw_md.md_address=%p\n", pw.pw_md.md_address); + printf("\t.pw_md.md_condition=%#x\n", pw.pw_md.md_condition); + printf("\t.pw_md.md_length=%#x\n", pw.pw_md.md_length); + printf("}\n"); + + printf("Before writing watchpoint %d\n", i); + ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1); + + printf("Before resuming the child process where it left off " + "and without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGTRAP); + + pw.pw_md.md_address = NULL; + printf("Before writing watchpoint %d (disable it)\n", i); + ATF_REQUIRE(ptrace(PT_WRITE_WATCHPOINT, child, &pw, len) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(__HAVE_PTRACE_WATCHPOINTS) +ATF_TC(watchpoint_trap_code3); +ATF_TC_HEAD(watchpoint_trap_code3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Call PT_COUNT_WATCHPOINTS and test code trap with watchpoint 3"); +} + +ATF_TC_BODY(watchpoint_trap_code3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + const int i = 3; + struct ptrace_watchpoint pw; + int len = sizeof(pw); + int watchme = 1234; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("check_happy(%d)=%d\n", watchme, check_happy(watchme)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Preparing code watchpoint trap %d\n", i); + + pw.pw_index = i; + pw.pw_lwpid = 0; + pw.pw_md.md_address = (void *)check_happy; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:37:55 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 857A3CAF9F9; Sat, 14 Jan 2017 15:37:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E86CD15F9; Sat, 14 Jan 2017 15:37:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFbseI026618; Sat, 14 Jan 2017 15:37:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFbp4n026586; Sat, 14 Jan 2017 15:37:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141537.v0EFbp4n026586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312173 - in vendor/llvm/dist: . cmake/modules docs include/llvm/ADT include/llvm/Analysis include/llvm/CodeGen include/llvm/CodeGen/GlobalISel include/llvm/DebugInfo/CodeView include/l... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:37:55 -0000 Author: dim Date: Sat Jan 14 15:37:50 2017 New Revision: 312173 URL: https://svnweb.freebsd.org/changeset/base/312173 Log: Vendor import of llvm release_40 branch r292009: https://llvm.org/svn/llvm-project/llvm/branches/release_40@292009 Added: vendor/llvm/dist/cmake/modules/CheckLinkerFlag.cmake vendor/llvm/dist/include/llvm/Analysis/LoopAnalysisManager.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVTypeDumper.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabaseVisitor.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDumpVisitor.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDumperBase.h (contents, props changed) vendor/llvm/dist/include/llvm/Object/Decompressor.h (contents, props changed) vendor/llvm/dist/include/llvm/Transforms/Scalar/IVUsersPrinter.h (contents, props changed) vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopAccessAnalysisPrinter.h (contents, props changed) vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopPassManager.h (contents, props changed) vendor/llvm/dist/include/llvm/XRay/ vendor/llvm/dist/include/llvm/XRay/Trace.h (contents, props changed) vendor/llvm/dist/include/llvm/XRay/XRayRecord.h (contents, props changed) vendor/llvm/dist/include/llvm/XRay/YAMLXRayRecord.h (contents, props changed) vendor/llvm/dist/lib/Analysis/LoopAnalysisManager.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/CVTypeDumper.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabase.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDatabaseVisitor.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp (contents, props changed) vendor/llvm/dist/lib/Object/Decompressor.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/Scalar/IVUsersPrinter.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/Scalar/LoopAccessAnalysisPrinter.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/Scalar/LoopPassManager.cpp (contents, props changed) vendor/llvm/dist/lib/XRay/ vendor/llvm/dist/lib/XRay/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/XRay/Trace.cpp (contents, props changed) vendor/llvm/dist/test/Analysis/CostModel/X86/slm-arith-costs.ll vendor/llvm/dist/test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir vendor/llvm/dist/test/CodeGen/AMDGPU/fadd-fma-fmul-combine.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fneg-combines.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fp16_to_fp32.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fp16_to_fp64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select-fabs-fneg-extract-legacy.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select-fabs-fneg-extract.ll vendor/llvm/dist/test/CodeGen/AMDGPU/select-opt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/shrink-vop3-carry-out.mir vendor/llvm/dist/test/CodeGen/Mips/msa/immediates-bad.ll vendor/llvm/dist/test/CodeGen/Mips/msa/immediates.ll vendor/llvm/dist/test/CodeGen/Mips/msa/msa-nooddspreg.ll vendor/llvm/dist/test/CodeGen/PowerPC/change-no-infs.ll vendor/llvm/dist/test/CodeGen/X86/bypass-slow-division-32.ll vendor/llvm/dist/test/CodeGen/X86/bypass-slow-division-64.ll vendor/llvm/dist/test/CodeGen/X86/bypass-slow-division-tune.ll vendor/llvm/dist/test/CodeGen/X86/change-unsafe-fp-math.ll vendor/llvm/dist/test/CodeGen/X86/peephole.mir vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-avx512.ll vendor/llvm/dist/test/DebugInfo/Inputs/implicit-const-test.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/dwarfdump-implicit-const.test vendor/llvm/dist/test/FileCheck/match-full-lines.txt (contents, props changed) vendor/llvm/dist/test/ObjectYAML/MachO/DWARF-debug_line.yaml vendor/llvm/dist/test/Transforms/LICM/opt-remarks-conditional-load.ll vendor/llvm/dist/test/Transforms/LICM/opt-remarks-intervening-store.ll vendor/llvm/dist/test/Transforms/LICM/opt-remarks.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/mul_slm_16bit.ll vendor/llvm/dist/test/Transforms/LoopVectorize/pr31190.ll vendor/llvm/dist/test/Transforms/NewGVN/pr31594.ll vendor/llvm/dist/test/Transforms/PGOProfile/Inputs/multiple_hash_profile.proftext vendor/llvm/dist/test/Transforms/PGOProfile/multiple_hash_profile.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/pr31599.ll vendor/llvm/dist/test/tools/llvm-config/booleans.test vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/elf64-objcopied-instrmap.bin (contents, props changed) vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/elf64-sample-o2.bin (contents, props changed) vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/naive-log-simple.xray (contents, props changed) vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/simple-instrmap.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/Inputs/simple-xray-instrmap.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/account-deduce-tail-call.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/account-keep-going.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-case.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/account-simple-sorting.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/bad-instrmap-sizes.txt (contents, props changed) vendor/llvm/dist/test/tools/llvm-xray/X86/convert-roundtrip.yaml vendor/llvm/dist/test/tools/llvm-xray/X86/convert-to-yaml.txt (contents, props changed) vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-debug-syms.txt (contents, props changed) vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt (contents, props changed) vendor/llvm/dist/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyBuiltinDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyBuiltinDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyClassDefinitionDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyCompilandDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyCompilandDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyEnumDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyEnumDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyExternalSymbolDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyExternalSymbolDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyFunctionDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyFunctionDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyTypeDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyTypeDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyTypedefDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyTypedefDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyVariableDumper.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-pdbdump/PrettyVariableDumper.h (contents, props changed) vendor/llvm/dist/tools/llvm-xray/func-id-helper.cc (contents, props changed) vendor/llvm/dist/tools/llvm-xray/func-id-helper.h (contents, props changed) vendor/llvm/dist/tools/llvm-xray/xray-account.cc (contents, props changed) vendor/llvm/dist/tools/llvm-xray/xray-account.h (contents, props changed) vendor/llvm/dist/tools/llvm-xray/xray-converter.cc (contents, props changed) vendor/llvm/dist/tools/llvm-xray/xray-converter.h (contents, props changed) vendor/llvm/dist/tools/llvm-xray/xray-record-yaml.h (contents, props changed) vendor/llvm/dist/unittests/Support/TarWriterTest.cpp (contents, props changed) vendor/llvm/dist/unittests/Transforms/Scalar/ vendor/llvm/dist/unittests/Transforms/Scalar/CMakeLists.txt (contents, props changed) vendor/llvm/dist/unittests/Transforms/Scalar/LoopPassManagerTest.cpp (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/ vendor/llvm/dist/utils/unittest/googlemock/LICENSE.txt (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/README.LLVM vendor/llvm/dist/utils/unittest/googlemock/include/ vendor/llvm/dist/utils/unittest/googlemock/include/gmock/ vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-actions.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-cardinalities.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-generated-actions.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-generated-function-mockers.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-generated-matchers.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-generated-nice-strict.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-matchers.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-more-actions.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-more-matchers.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock-spec-builders.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/gmock.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/internal/ vendor/llvm/dist/utils/unittest/googlemock/include/gmock/internal/custom/ vendor/llvm/dist/utils/unittest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/internal/custom/gmock-matchers.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/internal/custom/gmock-port.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/internal/gmock-internal-utils.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/include/gmock/internal/gmock-port.h (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/src/ vendor/llvm/dist/utils/unittest/googlemock/src/gmock-all.cc (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/src/gmock-cardinalities.cc (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/src/gmock-internal-utils.cc (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/src/gmock-matchers.cc (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/src/gmock-spec-builders.cc (contents, props changed) vendor/llvm/dist/utils/unittest/googlemock/src/gmock.cc (contents, props changed) Deleted: vendor/llvm/dist/include/llvm/Analysis/LoopPassManager.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDumper.h vendor/llvm/dist/lib/Analysis/LoopPassManager.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/TypeDumper.cpp vendor/llvm/dist/test/CodeGen/AMDGPU/fp16_to_fp.ll vendor/llvm/dist/test/CodeGen/X86/atom-bypass-slow-division-64.ll vendor/llvm/dist/test/CodeGen/X86/atom-bypass-slow-division.ll vendor/llvm/dist/test/CodeGen/X86/slow-div.ll vendor/llvm/dist/test/FileCheck/strict-whitespace-match-full-lines.txt vendor/llvm/dist/test/tools/llvm-xray/X86/bad-instrmap-sizes.bin vendor/llvm/dist/tools/llvm-pdbdump/BuiltinDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/BuiltinDumper.h vendor/llvm/dist/tools/llvm-pdbdump/ClassDefinitionDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/ClassDefinitionDumper.h vendor/llvm/dist/tools/llvm-pdbdump/CompilandDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/CompilandDumper.h vendor/llvm/dist/tools/llvm-pdbdump/EnumDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/EnumDumper.h vendor/llvm/dist/tools/llvm-pdbdump/ExternalSymbolDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/ExternalSymbolDumper.h vendor/llvm/dist/tools/llvm-pdbdump/FunctionDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/FunctionDumper.h vendor/llvm/dist/tools/llvm-pdbdump/TypeDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/TypeDumper.h vendor/llvm/dist/tools/llvm-pdbdump/TypedefDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/TypedefDumper.h vendor/llvm/dist/tools/llvm-pdbdump/VariableDumper.cpp vendor/llvm/dist/tools/llvm-pdbdump/VariableDumper.h vendor/llvm/dist/unittests/Analysis/LoopPassManagerTest.cpp Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/LICENSE.TXT vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/include/llvm/ADT/PointerSumType.h vendor/llvm/dist/include/llvm/ADT/iterator.h vendor/llvm/dist/include/llvm/Analysis/AssumptionCache.h vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/LazyCallGraph.h vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h vendor/llvm/dist/include/llvm/CodeGen/BasicTTIImpl.h vendor/llvm/dist/include/llvm/CodeGen/DIE.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBank.h vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDumper.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFDie.h vendor/llvm/dist/include/llvm/DebugInfo/DWARF/DWARFFormValue.h vendor/llvm/dist/include/llvm/DebugInfo/MSF/StreamArray.h vendor/llvm/dist/include/llvm/IR/DIBuilder.h vendor/llvm/dist/include/llvm/IR/DebugInfoMetadata.h vendor/llvm/dist/include/llvm/IR/GlobalObject.h vendor/llvm/dist/include/llvm/IR/Intrinsics.td vendor/llvm/dist/include/llvm/IR/IntrinsicsAArch64.td vendor/llvm/dist/include/llvm/IR/IntrinsicsARM.td vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndex.h vendor/llvm/dist/include/llvm/IR/ModuleSummaryIndexYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/DWARFYAML.h vendor/llvm/dist/include/llvm/ObjectYAML/MachOYAML.h vendor/llvm/dist/include/llvm/Passes/PassBuilder.h vendor/llvm/dist/include/llvm/ProfileData/InstrProf.h vendor/llvm/dist/include/llvm/Support/CommandLine.h vendor/llvm/dist/include/llvm/Support/Dwarf.h vendor/llvm/dist/include/llvm/Support/FileOutputBuffer.h vendor/llvm/dist/include/llvm/Support/GenericDomTree.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td vendor/llvm/dist/include/llvm/Target/TargetSubtargetInfo.h vendor/llvm/dist/include/llvm/Transforms/Scalar/IndVarSimplify.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LICM.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopDeletion.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopIdiomRecognize.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopInstSimplify.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopRotation.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopSimplifyCFG.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopStrengthReduce.h vendor/llvm/dist/include/llvm/Transforms/Scalar/LoopUnrollPass.h vendor/llvm/dist/include/llvm/Transforms/Utils/LoopUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/UnrollLoop.h vendor/llvm/dist/include/llvm/Transforms/Vectorize/LoopVectorize.h vendor/llvm/dist/lib/Analysis/AssumptionCache.cpp vendor/llvm/dist/lib/Analysis/CMakeLists.txt vendor/llvm/dist/lib/Analysis/CostModel.cpp vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/Analysis/InlineCost.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/LoopAccessAnalysis.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/RegBankSelect.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/RegisterBank.cpp vendor/llvm/dist/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/DebugInfo/CodeView/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/CodeView/SymbolDumper.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFDie.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARF/DWARFUnit.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/IR/AutoUpgrade.cpp vendor/llvm/dist/lib/IR/DIBuilder.cpp vendor/llvm/dist/lib/IR/Globals.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.h vendor/llvm/dist/lib/LTO/LTOBackend.cpp vendor/llvm/dist/lib/LTO/ThinLTOCodeGenerator.cpp vendor/llvm/dist/lib/Object/CMakeLists.txt vendor/llvm/dist/lib/ObjectYAML/DWARFYAML.cpp vendor/llvm/dist/lib/Passes/PassBuilder.cpp vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/Support/FileOutputBuffer.cpp vendor/llvm/dist/lib/Support/Host.cpp vendor/llvm/dist/lib/Support/TarWriter.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64GenRegisterBankInfo.def vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterBankInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h vendor/llvm/dist/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist/lib/Target/AMDGPU/EvergreenInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/SIFoldOperands.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/SIShrinkInstructions.cpp vendor/llvm/dist/lib/Target/AMDGPU/VOP1Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOP2Instructions.td vendor/llvm/dist/lib/Target/AMDGPU/VOPCInstructions.td vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMRegisterBankInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetTransformInfo.h vendor/llvm/dist/lib/Target/Lanai/LanaiTargetTransformInfo.h vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/ManagedStringPool.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXAsmPrinter.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXAsmPrinter.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXInstrInfo.td vendor/llvm/dist/lib/Target/NVPTX/NVPTXSection.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetMachine.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetObjectFile.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetTransformInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/TargetMachine.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFastISel.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.h vendor/llvm/dist/lib/Transforms/IPO/LowerTypeTests.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineInternal.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombinePHI.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/PGOInstrumentation.cpp vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDistribute.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopIdiomRecognize.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopInstSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopSimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopSink.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/NewGVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/StructurizeCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/runtimes/CMakeLists.txt vendor/llvm/dist/test/Analysis/CostModel/AArch64/store.ll vendor/llvm/dist/test/Analysis/CostModel/X86/strided-load-i16.ll vendor/llvm/dist/test/Analysis/CostModel/X86/strided-load-i32.ll vendor/llvm/dist/test/Analysis/CostModel/X86/strided-load-i64.ll vendor/llvm/dist/test/Analysis/CostModel/X86/strided-load-i8.ll vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-ashr-cost.ll vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-lshr-cost.ll vendor/llvm/dist/test/Analysis/CostModel/X86/vshift-shl-cost.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/max-trip-count.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-neon-copy.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-nvcast.ll vendor/llvm/dist/test/CodeGen/AArch64/bitreverse.ll vendor/llvm/dist/test/CodeGen/AArch64/rbit.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fmul-2-combine-multi-use.ll vendor/llvm/dist/test/CodeGen/AMDGPU/fp32_to_fp16.ll vendor/llvm/dist/test/CodeGen/AMDGPU/insert_vector_elt.ll vendor/llvm/dist/test/CodeGen/AMDGPU/local-stack-slot-bug.ll vendor/llvm/dist/test/CodeGen/AMDGPU/mad-combine.ll vendor/llvm/dist/test/CodeGen/AMDGPU/sext-in-reg.ll vendor/llvm/dist/test/CodeGen/AMDGPU/v_mac.ll vendor/llvm/dist/test/CodeGen/ARM/fp16-promote.ll vendor/llvm/dist/test/CodeGen/ARM/fpcmp_ueq.ll vendor/llvm/dist/test/CodeGen/ARM/vdup.ll vendor/llvm/dist/test/CodeGen/ARM/vpadd.ll vendor/llvm/dist/test/CodeGen/ARM/vtrn.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/extractelement.ll vendor/llvm/dist/test/CodeGen/NVPTX/fast-math.ll vendor/llvm/dist/test/CodeGen/PowerPC/variable_elem_vec_extracts.ll vendor/llvm/dist/test/CodeGen/WebAssembly/function-bitcasts.ll vendor/llvm/dist/test/CodeGen/X86/atomic-eflags-reuse.ll vendor/llvm/dist/test/CodeGen/X86/avx-cvt.ll vendor/llvm/dist/test/CodeGen/X86/avx-trunc.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cvt.ll vendor/llvm/dist/test/CodeGen/X86/avx512-select.ll vendor/llvm/dist/test/CodeGen/X86/avx512-trunc.ll vendor/llvm/dist/test/CodeGen/X86/cmp.ll vendor/llvm/dist/test/CodeGen/X86/cpus.ll vendor/llvm/dist/test/CodeGen/X86/extractelement-index.ll vendor/llvm/dist/test/CodeGen/X86/extractelement-legalization-store-ordering.ll vendor/llvm/dist/test/CodeGen/X86/i64-mem-copy.ll vendor/llvm/dist/test/CodeGen/X86/implicit-null-checks.mir vendor/llvm/dist/test/CodeGen/X86/lzcnt-zext-cmp.ll vendor/llvm/dist/test/CodeGen/X86/slow-unaligned-mem.ll vendor/llvm/dist/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/vec_ins_extract-1.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-4.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-8.ll vendor/llvm/dist/test/CodeGen/X86/vec_int_to_fp.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-ashr-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-lshr-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-256.ll vendor/llvm/dist/test/CodeGen/X86/vector-shift-shl-512.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-combining-xop.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-variable-128.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-variable-256.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-double-shifts-var.ll vendor/llvm/dist/test/DebugInfo/Generic/simplifycfg_sink_last_inst.ll vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_BE-relocations.s vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_relocations.s vendor/llvm/dist/test/Instrumentation/AddressSanitizer/global_metadata_darwin.ll vendor/llvm/dist/test/MC/AMDGPU/vop_dpp.s vendor/llvm/dist/test/MC/AMDGPU/vop_sdwa.s vendor/llvm/dist/test/MC/ARM/directive-object_arch-2.s vendor/llvm/dist/test/MC/ARM/directive-object_arch.s vendor/llvm/dist/test/ObjectYAML/MachO/DWARF-debug_info.yaml vendor/llvm/dist/test/Other/loop-pass-ordering.ll vendor/llvm/dist/test/Other/new-pass-manager.ll vendor/llvm/dist/test/Other/pass-pipeline-parsing.ll vendor/llvm/dist/test/Transforms/GVN/assume-equal.ll vendor/llvm/dist/test/Transforms/GVN/invariant.group.ll vendor/llvm/dist/test/Transforms/InstCombine/fabs.ll vendor/llvm/dist/test/Transforms/InstCombine/fast-math.ll vendor/llvm/dist/test/Transforms/InstCombine/fdiv.ll vendor/llvm/dist/test/Transforms/InstCombine/pow-4.ll vendor/llvm/dist/test/Transforms/InstCombine/pow-sqrt.ll vendor/llvm/dist/test/Transforms/InstSimplify/floating-point-arithmetic.ll vendor/llvm/dist/test/Transforms/LICM/argmemonly-call.ll vendor/llvm/dist/test/Transforms/LICM/assume.ll vendor/llvm/dist/test/Transforms/LICM/atomics.ll vendor/llvm/dist/test/Transforms/LICM/basictest.ll vendor/llvm/dist/test/Transforms/LICM/constexpr.ll vendor/llvm/dist/test/Transforms/LICM/crash.ll vendor/llvm/dist/test/Transforms/LICM/debug-value.ll vendor/llvm/dist/test/Transforms/LICM/extra-copies.ll vendor/llvm/dist/test/Transforms/LICM/funclet.ll vendor/llvm/dist/test/Transforms/LICM/hoist-bitcast-load.ll vendor/llvm/dist/test/Transforms/LICM/hoist-deref-load.ll vendor/llvm/dist/test/Transforms/LICM/hoist-nounwind.ll vendor/llvm/dist/test/Transforms/LICM/hoist-round.ll vendor/llvm/dist/test/Transforms/LICM/hoisting.ll vendor/llvm/dist/test/Transforms/LICM/lcssa-ssa-promoter.ll vendor/llvm/dist/test/Transforms/LICM/no-preheader-test.ll vendor/llvm/dist/test/Transforms/LICM/preheader-safe.ll vendor/llvm/dist/test/Transforms/LICM/promote-order.ll vendor/llvm/dist/test/Transforms/LICM/promote-tls.ll vendor/llvm/dist/test/Transforms/LICM/scalar-promote-memmodel.ll vendor/llvm/dist/test/Transforms/LICM/scalar_promote-unwind.ll vendor/llvm/dist/test/Transforms/LICM/scalar_promote.ll vendor/llvm/dist/test/Transforms/LICM/speculate.ll vendor/llvm/dist/test/Transforms/LICM/volatile-alias.ll vendor/llvm/dist/test/Transforms/LoopSimplify/preserve-scev.ll vendor/llvm/dist/test/Transforms/LoopUnroll/peel-loop-pgo.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/Inputs/import-unsat.yaml vendor/llvm/dist/test/Transforms/LowerTypeTests/function.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/import-unsat.ll vendor/llvm/dist/test/Transforms/LowerTypeTests/simple.ll vendor/llvm/dist/test/Transforms/NewGVN/assume-equal.ll vendor/llvm/dist/test/Transforms/NewGVN/invariant.group.ll vendor/llvm/dist/test/Transforms/PGOProfile/comdat_internal.ll vendor/llvm/dist/test/Transforms/PGOProfile/comdat_rename.ll vendor/llvm/dist/test/Transforms/PGOProfile/indirect_call_profile.ll vendor/llvm/dist/test/Transforms/StructurizeCFG/no-branch-to-entry.ll vendor/llvm/dist/tools/dsymutil/DwarfLinker.cpp vendor/llvm/dist/tools/llvm-config/BuildVariables.inc.in vendor/llvm/dist/tools/llvm-config/CMakeLists.txt vendor/llvm/dist/tools/llvm-config/llvm-config.cpp vendor/llvm/dist/tools/llvm-pdbdump/CMakeLists.txt vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.cpp vendor/llvm/dist/tools/llvm-pdbdump/LLVMOutputStyle.h vendor/llvm/dist/tools/llvm-pdbdump/YAMLOutputStyle.h vendor/llvm/dist/tools/llvm-pdbdump/llvm-pdbdump.cpp vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-xray/CMakeLists.txt vendor/llvm/dist/tools/llvm-xray/xray-extract.cc vendor/llvm/dist/tools/obj2yaml/dwarf2yaml.cpp vendor/llvm/dist/tools/opt/NewPMDriver.cpp vendor/llvm/dist/tools/yaml2obj/yaml2dwarf.cpp vendor/llvm/dist/tools/yaml2obj/yaml2macho.cpp vendor/llvm/dist/tools/yaml2obj/yaml2obj.h vendor/llvm/dist/unittests/Analysis/CMakeLists.txt vendor/llvm/dist/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp vendor/llvm/dist/unittests/IR/DominatorTreeTest.cpp vendor/llvm/dist/unittests/IR/IRBuilderTest.cpp vendor/llvm/dist/unittests/Support/CMakeLists.txt vendor/llvm/dist/unittests/Transforms/CMakeLists.txt vendor/llvm/dist/utils/release/build_llvm_package.bat vendor/llvm/dist/utils/unittest/CMakeLists.txt vendor/llvm/dist/utils/unittest/UnitTestMain/TestMain.cpp Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/CMakeLists.txt Sat Jan 14 15:37:50 2017 (r312173) @@ -29,7 +29,7 @@ if(NOT DEFINED LLVM_VERSION_PATCH) set(LLVM_VERSION_PATCH 0) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) - set(LLVM_VERSION_SUFFIX svn) + set(LLVM_VERSION_SUFFIX "") endif() if (POLICY CMP0048) Modified: vendor/llvm/dist/LICENSE.TXT ============================================================================== --- vendor/llvm/dist/LICENSE.TXT Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/LICENSE.TXT Sat Jan 14 15:37:50 2017 (r312173) @@ -4,7 +4,7 @@ LLVM Release License University of Illinois/NCSA Open Source License -Copyright (c) 2003-2016 University of Illinois at Urbana-Champaign. +Copyright (c) 2003-2017 University of Illinois at Urbana-Champaign. All rights reserved. Developed by: Modified: vendor/llvm/dist/cmake/modules/AddLLVM.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/AddLLVM.cmake Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/cmake/modules/AddLLVM.cmake Sat Jan 14 15:37:50 2017 (r312173) @@ -1007,6 +1007,7 @@ function(add_unittest test_suite test_na endif() include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include) + include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include) if (NOT LLVM_ENABLE_THREADS) list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0) endif () Added: vendor/llvm/dist/cmake/modules/CheckLinkerFlag.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/cmake/modules/CheckLinkerFlag.cmake Sat Jan 14 15:37:50 2017 (r312173) @@ -0,0 +1,8 @@ +include(CheckCXXCompilerFlag) + +function(check_linker_flag flag out_var) + set(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}") + check_cxx_compiler_flag("" ${out_var}) + set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) +endfunction() Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sat Jan 14 15:37:50 2017 (r312173) @@ -597,6 +597,14 @@ if (UNIX AND append("-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) endif() +# lld doesn't print colored diagnostics when invoked from Ninja +if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja") + include(CheckLinkerFlag) + check_linker_flag("-Wl,-color-diagnostics" LINKER_SUPPORTS_COLOR_DIAGNOSTICS) + append_if(LINKER_SUPPORTS_COLOR_DIAGNOSTICS "-Wl,-color-diagnostics" + CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS) +endif() + # Add flags for add_dead_strip(). # FIXME: With MSVS, consider compiling with /Gy and linking with /OPT:REF? # But MinSizeRel seems to add that automatically, so maybe disable these Modified: vendor/llvm/dist/docs/LangRef.rst ============================================================================== --- vendor/llvm/dist/docs/LangRef.rst Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/docs/LangRef.rst Sat Jan 14 15:37:50 2017 (r312173) @@ -2169,8 +2169,9 @@ Fast-Math Flags LLVM IR floating-point binary ops (:ref:`fadd `, :ref:`fsub `, :ref:`fmul `, :ref:`fdiv `, -:ref:`frem `, :ref:`fcmp `) have the following flags that can -be set to enable otherwise unsafe floating point operations +:ref:`frem `, :ref:`fcmp `) and :ref:`call ` +instructions have the following flags that can be set to enable +otherwise unsafe floating point transformations. ``nnan`` No NaNs - Allow optimizations to assume the arguments and result are not Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sat Jan 14 15:37:50 2017 (r312173) @@ -26,11 +26,6 @@ have questions or comments, the `LLVM De `_ is a good place to send them. -Note that if you are reading this file from a Subversion checkout or the main -LLVM web page, this document applies to the *next* release, not the current -one. To see the release notes for a specific release, please see the `releases -page `_. - Non-comprehensive list of changes in this release ================================================= * The C API functions LLVMAddFunctionAttr, LLVMGetFunctionAttr, @@ -57,6 +52,9 @@ Non-comprehensive list of changes in thi the previously used names should become descriptions and a short name in the style of a programming language identifier should be added. +* LLVM now handles invariant.group across different basic blocks, which makes + it possible to devirtualize virtual calls inside loops. + * ... next change ... .. NOTE Modified: vendor/llvm/dist/include/llvm/ADT/PointerSumType.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/PointerSumType.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/ADT/PointerSumType.h Sat Jan 14 15:37:50 2017 (r312173) @@ -94,7 +94,7 @@ public: return HelperT::template Lookup::TraitsT::getFromVoidPointer(getImpl()); } - operator bool() const { return Value & HelperT::PointerMask; } + explicit operator bool() const { return Value & HelperT::PointerMask; } bool operator==(const PointerSumType &R) const { return Value == R.Value; } bool operator!=(const PointerSumType &R) const { return Value != R.Value; } bool operator<(const PointerSumType &R) const { return Value < R.Value; } Modified: vendor/llvm/dist/include/llvm/ADT/iterator.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/iterator.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/ADT/iterator.h Sat Jan 14 15:37:50 2017 (r312173) @@ -33,6 +33,32 @@ namespace llvm { /// Another abstraction that this doesn't provide is implementing increment in /// terms of addition of one. These aren't equivalent for all iterator /// categories, and respecting that adds a lot of complexity for little gain. +/// +/// Classes wishing to use `iterator_facade_base` should implement the following +/// methods: +/// +/// Forward Iterators: +/// (All of the following methods) +/// - DerivedT &operator=(const DerivedT &R); +/// - bool operator==(const DerivedT &R) const; +/// - const T &operator*() const; +/// - T &operator*(); +/// - DerivedT &operator++(); +/// +/// Bidirectional Iterators: +/// (All methods of forward iterators, plus the following) +/// - DerivedT &operator--(); +/// +/// Random-access Iterators: +/// (All methods of bidirectional iterators excluding the following) +/// - DerivedT &operator++(); +/// - DerivedT &operator--(); +/// (and plus the following) +/// - bool operator<(const DerivedT &RHS) const; +/// - DifferenceTypeT operator-(const DerivedT &R) const; +/// - DerivedT &operator+=(DifferenceTypeT N); +/// - DerivedT &operator-=(DifferenceTypeT N); +/// template Modified: vendor/llvm/dist/include/llvm/Analysis/AssumptionCache.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/AssumptionCache.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/AssumptionCache.h Sat Jan 14 15:37:50 2017 (r312173) @@ -46,6 +46,30 @@ class AssumptionCache { /// intrinsic. SmallVector AssumeHandles; + class AffectedValueCallbackVH final : public CallbackVH { + AssumptionCache *AC; + void deleted() override; + void allUsesReplacedWith(Value *) override; + + public: + using DMI = DenseMapInfo; + + AffectedValueCallbackVH(Value *V, AssumptionCache *AC = nullptr) + : CallbackVH(V), AC(AC) {} + }; + + friend AffectedValueCallbackVH; + + /// \brief A map of values about which an assumption might be providing + /// information to the relevant set of assumptions. + using AffectedValuesMap = + DenseMap, + AffectedValueCallbackVH::DMI>; + AffectedValuesMap AffectedValues; + + /// Get the vector of assumptions which affect a value from the cache. + SmallVector &getAffectedValues(Value *V); + /// \brief Flag tracking whether we have scanned the function yet. /// /// We want to be as lazy about this as possible, and so we scan the function @@ -66,11 +90,16 @@ public: /// not already be in the cache. void registerAssumption(CallInst *CI); + /// \brief Update the cache of values being affected by this assumption (i.e. + /// the values about which this assumption provides information). + void updateAffectedValues(CallInst *CI); + /// \brief Clear the cache of @llvm.assume intrinsics for a function. /// /// It will be re-scanned the next time it is requested. void clear() { AssumeHandles.clear(); + AffectedValues.clear(); Scanned = false; } @@ -87,6 +116,18 @@ public: scanFunction(); return AssumeHandles; } + + /// \brief Access the list of assumptions which affect this value. + MutableArrayRef assumptionsFor(const Value *V) { + if (!Scanned) + scanFunction(); + + auto AVI = AffectedValues.find_as(const_cast(V)); + if (AVI == AffectedValues.end()) + return MutableArrayRef(); + + return AVI->second; + } }; /// \brief A function analysis which provides an \c AssumptionCache. Modified: vendor/llvm/dist/include/llvm/Analysis/IVUsers.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/IVUsers.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/IVUsers.h Sat Jan 14 15:37:50 2017 (r312173) @@ -15,8 +15,8 @@ #ifndef LLVM_ANALYSIS_IVUSERS_H #define LLVM_ANALYSIS_IVUSERS_H +#include "llvm/Analysis/LoopAnalysisManager.h" #include "llvm/Analysis/LoopPass.h" -#include "llvm/Analysis/LoopPassManager.h" #include "llvm/Analysis/ScalarEvolutionNormalization.h" #include "llvm/IR/ValueHandle.h" @@ -193,17 +193,10 @@ class IVUsersAnalysis : public AnalysisI public: typedef IVUsers Result; - IVUsers run(Loop &L, LoopAnalysisManager &AM); + IVUsers run(Loop &L, LoopAnalysisManager &AM, + LoopStandardAnalysisResults &AR); }; -/// Printer pass for the \c IVUsers for a loop. -class IVUsersPrinterPass : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit IVUsersPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM); -}; } #endif Modified: vendor/llvm/dist/include/llvm/Analysis/LazyCallGraph.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/LazyCallGraph.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/LazyCallGraph.h Sat Jan 14 15:37:50 2017 (r312173) @@ -148,7 +148,7 @@ public: /// /// This happens when an edge has been deleted. We leave the edge objects /// around but clear them. - operator bool() const; + explicit operator bool() const; /// Returnss the \c Kind of the edge. Kind getKind() const; Modified: vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h Sat Jan 14 15:37:50 2017 (r312173) @@ -20,7 +20,7 @@ #include "llvm/ADT/SetVector.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/AliasSetTracker.h" -#include "llvm/Analysis/LoopPassManager.h" +#include "llvm/Analysis/LoopAnalysisManager.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/IR/DiagnosticInfo.h" #include "llvm/IR/ValueHandle.h" @@ -753,18 +753,8 @@ class LoopAccessAnalysis public: typedef LoopAccessInfo Result; - Result run(Loop &, LoopAnalysisManager &); - static StringRef name() { return "LoopAccessAnalysis"; } -}; - -/// \brief Printer pass for the \c LoopAccessInfo results. -class LoopAccessInfoPrinterPass - : public PassInfoMixin { - raw_ostream &OS; -public: - explicit LoopAccessInfoPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM); + Result run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR); }; inline Instruction *MemoryDepChecker::Dependence::getSource( Added: vendor/llvm/dist/include/llvm/Analysis/LoopAnalysisManager.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/Analysis/LoopAnalysisManager.h Sat Jan 14 15:37:50 2017 (r312173) @@ -0,0 +1,155 @@ +//===- LoopAnalysisManager.h - Loop analysis management ---------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +/// \file +/// +/// This header provides classes for managing per-loop analyses. These are +/// typically used as part of a loop pass pipeline over the loop nests of +/// a function. +/// +/// Loop analyses are allowed to make some simplifying assumptions: +/// 1) Loops are, where possible, in simplified form. +/// 2) Loops are *always* in LCSSA form. +/// 3) A collection of analysis results are available: +/// - LoopInfo +/// - DominatorTree +/// - ScalarEvolution +/// - AAManager +/// +/// The primary mechanism to provide these invariants is the loop pass manager, +/// but they can also be manually provided in order to reason about a loop from +/// outside of a dedicated pass manager. +/// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ANALYSIS_LOOPANALYSISMANAGER_H +#define LLVM_ANALYSIS_LOOPANALYSISMANAGER_H + +#include "llvm/ADT/PostOrderIterator.h" +#include "llvm/ADT/PriorityWorklist.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/BasicAliasAnalysis.h" +#include "llvm/Analysis/GlobalsModRef.h" +#include "llvm/Analysis/LoopInfo.h" +#include "llvm/Analysis/ScalarEvolution.h" +#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" +#include "llvm/Analysis/TargetLibraryInfo.h" +#include "llvm/Analysis/TargetTransformInfo.h" +#include "llvm/IR/Dominators.h" +#include "llvm/IR/PassManager.h" + +namespace llvm { + +/// The adaptor from a function pass to a loop pass computes these analyses and +/// makes them available to the loop passes "for free". Each loop pass is +/// expected expected to update these analyses if necessary to ensure they're +/// valid after it runs. +struct LoopStandardAnalysisResults { + AAResults &AA; + AssumptionCache &AC; + DominatorTree &DT; + LoopInfo &LI; + ScalarEvolution &SE; + TargetLibraryInfo &TLI; + TargetTransformInfo &TTI; +}; + +/// Extern template declaration for the analysis set for this IR unit. +extern template class AllAnalysesOn; + +extern template class AnalysisManager; +/// \brief The loop analysis manager. +/// +/// See the documentation for the AnalysisManager template for detail +/// documentation. This typedef serves as a convenient way to refer to this +/// construct in the adaptors and proxies used to integrate this into the larger +/// pass manager infrastructure. +typedef AnalysisManager + LoopAnalysisManager; + +/// A proxy from a \c LoopAnalysisManager to a \c Function. +typedef InnerAnalysisManagerProxy + LoopAnalysisManagerFunctionProxy; + +/// A specialized result for the \c LoopAnalysisManagerFunctionProxy which +/// retains a \c LoopInfo reference. +/// +/// This allows it to collect loop objects for which analysis results may be +/// cached in the \c LoopAnalysisManager. +template <> class LoopAnalysisManagerFunctionProxy::Result { +public: + explicit Result(LoopAnalysisManager &InnerAM, LoopInfo &LI) + : InnerAM(&InnerAM), LI(&LI) {} + Result(Result &&Arg) : InnerAM(std::move(Arg.InnerAM)), LI(Arg.LI) { + // We have to null out the analysis manager in the moved-from state + // because we are taking ownership of the responsibilty to clear the + // analysis state. + Arg.InnerAM = nullptr; + } + Result &operator=(Result &&RHS) { + InnerAM = RHS.InnerAM; + LI = RHS.LI; + // We have to null out the analysis manager in the moved-from state + // because we are taking ownership of the responsibilty to clear the + // analysis state. + RHS.InnerAM = nullptr; + return *this; + } + ~Result() { + // InnerAM is cleared in a moved from state where there is nothing to do. + if (!InnerAM) + return; + + // Clear out the analysis manager if we're being destroyed -- it means we + // didn't even see an invalidate call when we got invalidated. + InnerAM->clear(); + } + + /// Accessor for the analysis manager. + LoopAnalysisManager &getManager() { return *InnerAM; } + + /// Handler for invalidation of the proxy for a particular function. + /// + /// If the proxy, \c LoopInfo, and associated analyses are preserved, this + /// will merely forward the invalidation event to any cached loop analysis + /// results for loops within this function. + /// + /// If the necessary loop infrastructure is not preserved, this will forcibly + /// clear all of the cached analysis results that are keyed on the \c + /// LoopInfo for this function. + bool invalidate(Function &F, const PreservedAnalyses &PA, + FunctionAnalysisManager::Invalidator &Inv); + +private: + LoopAnalysisManager *InnerAM; + LoopInfo *LI; +}; + +/// Provide a specialized run method for the \c LoopAnalysisManagerFunctionProxy +/// so it can pass the \c LoopInfo to the result. +template <> +LoopAnalysisManagerFunctionProxy::Result +LoopAnalysisManagerFunctionProxy::run(Function &F, FunctionAnalysisManager &AM); + +// Ensure the \c LoopAnalysisManagerFunctionProxy is provided as an extern +// template. +extern template class InnerAnalysisManagerProxy; + +extern template class OuterAnalysisManagerProxy; +/// A proxy from a \c FunctionAnalysisManager to a \c Loop. +typedef OuterAnalysisManagerProxy + FunctionAnalysisManagerLoopProxy; + +/// Returns the minimum set of Analyses that all loop passes must preserve. +PreservedAnalyses getLoopPassPreservedAnalyses(); +} + +#endif // LLVM_ANALYSIS_LOOPANALYSISMANAGER_H Modified: vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h Sat Jan 14 15:37:50 2017 (r312173) @@ -853,17 +853,8 @@ public: void getAnalysisUsage(AnalysisUsage &AU) const override; }; -/// \brief Pass for printing a loop's contents as LLVM's text IR assembly. -class PrintLoopPass : public PassInfoMixin { - raw_ostream &OS; - std::string Banner; - -public: - PrintLoopPass(); - PrintLoopPass(raw_ostream &OS, const std::string &Banner = ""); - - PreservedAnalyses run(Loop &L, AnalysisManager &); -}; +/// Function to print a loop's contents as LLVM's text IR assembly. +void printLoop(Loop &L, raw_ostream &OS, const std::string &Banner = ""); } // End llvm namespace Modified: vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h Sat Jan 14 15:37:50 2017 (r312173) @@ -302,6 +302,10 @@ private: NonLocalPointerInfo() : Size(MemoryLocation::UnknownSize) {} }; + /// Cache storing single nonlocal def for the instruction. + /// It is set when nonlocal def would be found in function returning only + /// local dependencies. + DenseMap NonLocalDefsCache; /// This map stores the cached results of doing a pointer lookup at the /// bottom of a block. /// @@ -441,9 +445,9 @@ public: /// This analysis looks for other loads and stores with invariant.group /// metadata and the same pointer operand. Returns Unknown if it does not /// find anything, and Def if it can be assumed that 2 instructions load or - /// store the same value. - /// FIXME: This analysis works only on single block because of restrictions - /// at the call site. + /// store the same value and NonLocal which indicate that non-local Def was + /// found, which can be retrieved by calling getNonLocalPointerDependency + /// with the same queried instruction. MemDepResult getInvariantGroupPointerDependency(LoadInst *LI, BasicBlock *BB); /// Looks at a memory location for a load (specified by MemLocBase, Offs, and Modified: vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h Sat Jan 14 15:37:50 2017 (r312173) @@ -55,6 +55,11 @@ struct MemIntrinsicInfo { // Same Id is set by the target for corresponding load/store intrinsics. unsigned short MatchingId; int NumMemRefs; + + /// This is the pointer that the intrinsic is loading from or storing to. + /// If this is non-null, then analysis/optimization passes can assume that + /// this intrinsic is functionally equivalent to a load/store from this + /// pointer. Value *PtrVal; }; @@ -518,11 +523,15 @@ public: unsigned getMaxInterleaveFactor(unsigned VF) const; /// \return The expected cost of arithmetic ops, such as mul, xor, fsub, etc. + /// \p Args is an optional argument which holds the instruction operands + /// values so the TTI can analyize those values searching for special + /// cases\optimizations based on those values. int getArithmeticInstrCost( unsigned Opcode, Type *Ty, OperandValueKind Opd1Info = OK_AnyValue, OperandValueKind Opd2Info = OK_AnyValue, OperandValueProperties Opd1PropInfo = OP_None, - OperandValueProperties Opd2PropInfo = OP_None) const; + OperandValueProperties Opd2PropInfo = OP_None, + ArrayRef Args = ArrayRef()) const; /// \return The cost of a shuffle instruction of kind Kind and of type Tp. /// The index and subtype parameters are used by the subvector insertion and @@ -763,7 +772,8 @@ public: getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind Opd1Info, OperandValueKind Opd2Info, OperandValueProperties Opd1PropInfo, - OperandValueProperties Opd2PropInfo) = 0; + OperandValueProperties Opd2PropInfo, + ArrayRef Args) = 0; virtual int getShuffleCost(ShuffleKind Kind, Type *Tp, int Index, Type *SubTp) = 0; virtual int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) = 0; @@ -984,9 +994,10 @@ public: getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind Opd1Info, OperandValueKind Opd2Info, OperandValueProperties Opd1PropInfo, - OperandValueProperties Opd2PropInfo) override { + OperandValueProperties Opd2PropInfo, + ArrayRef Args) override { return Impl.getArithmeticInstrCost(Opcode, Ty, Opd1Info, Opd2Info, - Opd1PropInfo, Opd2PropInfo); + Opd1PropInfo, Opd2PropInfo, Args); } int getShuffleCost(ShuffleKind Kind, Type *Tp, int Index, Type *SubTp) override { Modified: vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfoImpl.h Sat Jan 14 15:37:50 2017 (r312173) @@ -306,7 +306,8 @@ public: TTI::OperandValueKind Opd1Info, TTI::OperandValueKind Opd2Info, TTI::OperandValueProperties Opd1PropInfo, - TTI::OperandValueProperties Opd2PropInfo) { + TTI::OperandValueProperties Opd2PropInfo, + ArrayRef Args) { return 1; } @@ -427,6 +428,63 @@ public: return VF; } protected: + // Obtain the minimum required size to hold the value (without the sign) + // In case of a vector it returns the min required size for one element. + unsigned minRequiredElementSize(const Value* Val, bool &isSigned) { + if (isa(Val) || isa(Val)) { + const auto* VectorValue = cast(Val); + + // In case of a vector need to pick the max between the min + // required size for each element + auto *VT = cast(Val->getType()); + + // Assume unsigned elements + isSigned = false; + + // The max required size is the total vector width divided by num + // of elements in the vector + unsigned MaxRequiredSize = VT->getBitWidth() / VT->getNumElements(); + + unsigned MinRequiredSize = 0; + for(unsigned i = 0, e = VT->getNumElements(); i < e; ++i) { + if (auto* IntElement = + dyn_cast(VectorValue->getAggregateElement(i))) { + bool signedElement = IntElement->getValue().isNegative(); + // Get the element min required size. + unsigned ElementMinRequiredSize = + IntElement->getValue().getMinSignedBits() - 1; + // In case one element is signed then all the vector is signed. + isSigned |= signedElement; + // Save the max required bit size between all the elements. + MinRequiredSize = std::max(MinRequiredSize, ElementMinRequiredSize); + } + else { + // not an int constant element + return MaxRequiredSize; + } + } + return MinRequiredSize; + } + + if (const auto* CI = dyn_cast(Val)) { + isSigned = CI->getValue().isNegative(); + return CI->getValue().getMinSignedBits() - 1; + } + + if (const auto* Cast = dyn_cast(Val)) { + isSigned = true; + return Cast->getSrcTy()->getScalarSizeInBits() - 1; + } + + if (const auto* Cast = dyn_cast(Val)) { + isSigned = false; + return Cast->getSrcTy()->getScalarSizeInBits(); + } + + isSigned = false; + return Val->getType()->getScalarSizeInBits(); + } + bool isStridedAccess(const SCEV *Ptr) { return Ptr && isa(Ptr); } Modified: vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h Sat Jan 14 15:37:50 2017 (r312173) @@ -169,8 +169,12 @@ template class ArrayRef; /// Return true if we can prove that the specified FP value is either a NaN or /// never less than 0.0. - bool CannotBeOrderedLessThanZero(const Value *V, const TargetLibraryInfo *TLI, - unsigned Depth = 0); + /// If \p IncludeNeg0 is false, -0.0 is considered less than 0.0. + bool CannotBeOrderedLessThanZero(const Value *V, const TargetLibraryInfo *TLI); + + /// \returns true if we can prove that the specified FP value has a 0 sign + /// bit. + bool SignBitMustBeZero(const Value *V, const TargetLibraryInfo *TLI); /// If the specified value can be set by repeating the same byte in memory, /// return the i8 value that it is represented with. This is true for all i8 Modified: vendor/llvm/dist/include/llvm/CodeGen/BasicTTIImpl.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/BasicTTIImpl.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/CodeGen/BasicTTIImpl.h Sat Jan 14 15:37:50 2017 (r312173) @@ -308,7 +308,8 @@ public: TTI::OperandValueKind Opd1Info = TTI::OK_AnyValue, TTI::OperandValueKind Opd2Info = TTI::OK_AnyValue, TTI::OperandValueProperties Opd1PropInfo = TTI::OP_None, - TTI::OperandValueProperties Opd2PropInfo = TTI::OP_None) { + TTI::OperandValueProperties Opd2PropInfo = TTI::OP_None, + ArrayRef Args = ArrayRef()) { // Check if any of the operands are vector operands. const TargetLoweringBase *TLI = getTLI(); int ISD = TLI->InstructionOpcodeToISD(Opcode); Modified: vendor/llvm/dist/include/llvm/CodeGen/DIE.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/DIE.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/CodeGen/DIE.h Sat Jan 14 15:37:50 2017 (r312173) @@ -52,13 +52,20 @@ class DIEAbbrevData { /// Dwarf form code. dwarf::Form Form; + /// Dwarf attribute value for DW_FORM_implicit_const + int64_t Value; + public: - DIEAbbrevData(dwarf::Attribute A, dwarf::Form F) : Attribute(A), Form(F) {} + DIEAbbrevData(dwarf::Attribute A, dwarf::Form F) + : Attribute(A), Form(F), Value(0) {} + DIEAbbrevData(dwarf::Attribute A, int64_t V) + : Attribute(A), Form(dwarf::DW_FORM_implicit_const), Value(V) {} /// Accessors. /// @{ dwarf::Attribute getAttribute() const { return Attribute; } dwarf::Form getForm() const { return Form; } + int64_t getValue() const { return Value; } /// @} /// Used to gather unique data for the abbreviation folding set. @@ -102,6 +109,11 @@ public: Data.push_back(DIEAbbrevData(Attribute, Form)); } + /// Adds attribute with DW_FORM_implicit_const value + void AddImplicitConstAttribute(dwarf::Attribute Attribute, int64_t Value) { + Data.push_back(DIEAbbrevData(Attribute, Value)); + } + /// Used to gather unique data for the abbreviation folding set. void Profile(FoldingSetNodeID &ID) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegBankSelect.h Sat Jan 14 15:37:50 2017 (r312173) @@ -76,6 +76,7 @@ class MachineBlockFrequencyInfo; class MachineRegisterInfo; class TargetPassConfig; class TargetRegisterInfo; +class raw_ostream; /// This pass implements the reg bank selector pass used in the GlobalISel /// pipeline. At the end of this pass, all register operands have been assigned @@ -450,6 +451,18 @@ private: bool operator>(const MappingCost &Cost) const { return *this != Cost && Cost < *this; } + + /// Print this on dbgs() stream. + void dump() const; + + /// Print this on \p OS; + void print(raw_ostream &OS) const; + + /// Overload the stream operator for easy debug printing. + friend raw_ostream &operator<<(raw_ostream &OS, const MappingCost &Cost) { + Cost.print(OS); + return OS; + } }; /// Interface to the target lowering info related @@ -626,6 +639,7 @@ public: /// \endcode bool runOnMachineFunction(MachineFunction &MF) override; }; + } // End namespace llvm. #endif Modified: vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBank.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBank.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBank.h Sat Jan 14 15:37:50 2017 (r312173) @@ -41,11 +41,8 @@ private: friend RegisterBankInfo; public: - /// The default constructor will leave the object in - /// an invalid state. I.e. isValid() == false. - /// The fields must be updated to fix that and only - /// RegisterBankInfo instances are allowed to do that - RegisterBank(); + RegisterBank(unsigned ID, const char *Name, unsigned Size, + const uint32_t *ContainedRegClasses); /// Get the identifier of this register bank. unsigned getID() const { return ID; } Modified: vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h Sat Jan 14 15:37:50 2017 (r312173) @@ -384,10 +384,6 @@ protected: /// Create a RegisterBankInfo that can accomodate up to \p NumRegBanks /// RegisterBank instances. - /// - /// \note For the verify method to succeed all the \p NumRegBanks - /// must be initialized by createRegisterBank and updated with - /// addRegBankCoverage RegisterBank. RegisterBankInfo(RegisterBank **RegBanks, unsigned NumRegBanks); /// This constructor is meaningless. @@ -400,31 +396,6 @@ protected: llvm_unreachable("This constructor should not be executed"); } - /// Create a new register bank with the given parameter and add it - /// to RegBanks. - /// \pre \p ID must not already be used. - /// \pre \p ID < NumRegBanks. - void createRegisterBank(unsigned ID, const char *Name); - - /// Add \p RCId to the set of register class that the register bank, - /// identified \p ID, covers. - /// This method transitively adds all the sub classes and the subreg-classes - /// of \p RCId to the set of covered register classes. - /// It also adjusts the size of the register bank to reflect the maximal - /// size of a value that can be hold into that register bank. - /// - /// \note This method does *not* add the super classes of \p RCId. - /// The rationale is if \p ID covers the registers of \p RCId, that - /// does not necessarily mean that \p ID covers the set of registers - /// of RCId's superclasses. - /// This method does *not* add the superreg classes as well for consistents. - /// The expected use is to add the coverage top-down with respect to the - /// register hierarchy. - /// - /// \todo TableGen should just generate the BitSet vector for us. - void addRegBankCoverage(unsigned ID, unsigned RCId, - const TargetRegisterInfo &TRI); - /// Get the register bank identified by \p ID. RegisterBank &getRegBank(unsigned ID) { assert(ID < getNumRegBanks() && "Accessing an unknown register bank"); Modified: vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h Sat Jan 14 15:37:50 2017 (r312173) @@ -503,19 +503,6 @@ namespace ISD { /// address spaces. ADDRSPACECAST, - /// CONVERT_RNDSAT - This operator is used to support various conversions - /// between various types (float, signed, unsigned and vectors of those - /// types) with rounding and saturation. NOTE: Avoid using this operator as - /// most target don't support it and the operator might be removed in the - /// future. It takes the following arguments: - /// 0) value - /// 1) dest type (type to convert to) - /// 2) src type (type to convert from) - /// 3) rounding imm - /// 4) saturation imm - /// 5) ISD::CvtCode indicating the type of conversion to do - CONVERT_RNDSAT, - /// FP16_TO_FP, FP_TO_FP16 - These operators are used to perform promotions /// and truncation for half-precision (16 bit) floating numbers. These nodes /// form a semi-softened interface for dealing with f16 (as an i16), which @@ -927,21 +914,6 @@ namespace ISD { /// SETCC_INVALID if it is not possible to represent the resultant comparison. CondCode getSetCCAndOperation(CondCode Op1, CondCode Op2, bool isInteger); - //===--------------------------------------------------------------------===// - /// This enum defines the various converts CONVERT_RNDSAT supports. - enum CvtCode { - CVT_FF, /// Float from Float - CVT_FS, /// Float from Signed - CVT_FU, /// Float from Unsigned - CVT_SF, /// Signed from Float - CVT_UF, /// Unsigned from Float - CVT_SS, /// Signed from Signed - CVT_SU, /// Signed from Unsigned - CVT_US, /// Unsigned from Signed - CVT_UU, /// Unsigned from Unsigned - CVT_INVALID /// Marker - Invalid opcode - }; - } // end llvm::ISD namespace } // end llvm namespace Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Sat Jan 14 15:37:50 2017 (r312173) @@ -626,12 +626,6 @@ public: SDValue getCondCode(ISD::CondCode Cond); - /// Returns the ConvertRndSat Note: Avoid using this node because it may - /// disappear in the future and most targets don't support it. - SDValue getConvertRndSat(EVT VT, const SDLoc &dl, SDValue Val, SDValue DTy, - SDValue STy, SDValue Rnd, SDValue Sat, - ISD::CvtCode Code); - /// Return an ISD::VECTOR_SHUFFLE node. The number of elements in VT, /// which must be a vector type, must match the number of mask elements /// NumElts. An integer mask element equal to -1 is treated as undefined. Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h Sat Jan 14 15:37:50 2017 (r312173) @@ -1860,26 +1860,6 @@ public: } }; -/// NOTE: avoid using this node as this may disappear in the -/// future and most targets don't support it. -class CvtRndSatSDNode : public SDNode { - ISD::CvtCode CvtCode; - - friend class SelectionDAG; - - explicit CvtRndSatSDNode(EVT VT, unsigned Order, const DebugLoc &dl, - ISD::CvtCode Code) - : SDNode(ISD::CONVERT_RNDSAT, Order, dl, getSDVTList(VT)), CvtCode(Code) { - } - -public: - ISD::CvtCode getCvtCode() const { return CvtCode; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::CONVERT_RNDSAT; - } -}; - /// This class is used to represent EVT's, which are used /// to parameterize some operations. class VTSDNode : public SDNode { @@ -2041,7 +2021,7 @@ public: friend class SelectionDAG; MaskedStoreSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, - bool isTrunc, bool isCompressing, EVT MemVT, + bool isTrunc, bool isCompressing, EVT MemVT, MachineMemOperand *MMO) : MaskedLoadStoreSDNode(ISD::MSTORE, Order, dl, VTs, MemVT, MMO) { StoreSDNodeBits.IsTruncating = isTrunc; @@ -2054,8 +2034,8 @@ public: bool isTruncatingStore() const { return StoreSDNodeBits.IsTruncating; } /// Returns true if the op does a compression to the vector before storing. - /// The node contiguously stores the active elements (integers or floats) - /// in src (those with their respective bit set in writemask k) to unaligned + /// The node contiguously stores the active elements (integers or floats) + /// in src (those with their respective bit set in writemask k) to unaligned /// memory at base_addr. bool isCompressingStore() const { return StoreSDNodeBits.IsCompressing; } Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVTypeDumper.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/CVTypeDumper.h Sat Jan 14 15:37:50 2017 (r312173) @@ -0,0 +1,56 @@ +//===-- CVTypeDumper.h - CodeView type info dumper --------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_CVTYPEDUMPER_H +#define LLVM_DEBUGINFO_CODEVIEW_CVTYPEDUMPER_H + +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringSet.h" +#include "llvm/DebugInfo/CodeView/TypeDatabase.h" +#include "llvm/DebugInfo/CodeView/TypeIndex.h" +#include "llvm/DebugInfo/CodeView/TypeRecord.h" +#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h" +#include "llvm/Support/ScopedPrinter.h" + +namespace llvm { + +namespace codeview { + +/// Dumper for CodeView type streams found in COFF object files and PDB files. +class CVTypeDumper { +public: + explicit CVTypeDumper(TypeDatabase &TypeDB) : TypeDB(TypeDB) {} + + /// Dumps one type record. Returns false if there was a type parsing error, + /// and true otherwise. This should be called in order, since the dumper + /// maintains state about previous records which are necessary for cross + /// type references. + Error dump(const CVType &Record, TypeVisitorCallbacks &Dumper); + + /// Dumps the type records in Types. Returns false if there was a type stream + /// parse error, and true otherwise. + Error dump(const CVTypeArray &Types, TypeVisitorCallbacks &Dumper); + + /// Dumps the type records in Data. Returns false if there was a type stream + /// parse error, and true otherwise. Use this method instead of the + /// CVTypeArray overload when type records are laid out contiguously in + /// memory. + Error dump(ArrayRef Data, TypeVisitorCallbacks &Dumper); + + static void printTypeIndex(ScopedPrinter &Printer, StringRef FieldName, + TypeIndex TI, TypeDatabase &DB); + +private: + TypeDatabase &TypeDB; +}; + +} // end namespace codeview +} // end namespace llvm + +#endif // LLVM_DEBUGINFO_CODEVIEW_TYPEDUMPER_H Modified: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDumper.h ============================================================================== --- vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDumper.h Sat Jan 14 12:55:32 2017 (r312172) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/SymbolDumper.h Sat Jan 14 15:37:50 2017 (r312173) @@ -20,15 +20,15 @@ namespace llvm { class ScopedPrinter; namespace codeview { -class CVTypeDumper; +class TypeDatabase; /// Dumper for CodeView symbol streams found in COFF object files and PDB files. class CVSymbolDumper { public: - CVSymbolDumper(ScopedPrinter &W, CVTypeDumper &CVTD, + CVSymbolDumper(ScopedPrinter &W, TypeDatabase &TypeDB, std::unique_ptr ObjDelegate, bool PrintRecordBytes) - : W(W), CVTD(CVTD), ObjDelegate(std::move(ObjDelegate)), + : W(W), TypeDB(TypeDB), ObjDelegate(std::move(ObjDelegate)), PrintRecordBytes(PrintRecordBytes) {} /// Dumps one type record. Returns false if there was a type parsing error, @@ -43,7 +43,7 @@ public: private: ScopedPrinter &W; - CVTypeDumper &CVTD; + TypeDatabase &TypeDB; std::unique_ptr ObjDelegate; bool PrintRecordBytes; Added: vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/include/llvm/DebugInfo/CodeView/TypeDatabase.h Sat Jan 14 15:37:50 2017 (r312173) @@ -0,0 +1,55 @@ +//===- TypeDatabase.h - A collection of CodeView type records ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEDATABASE_H +#define LLVM_DEBUGINFO_CODEVIEW_TYPEDATABASE_H + +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:37:59 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB83CCAFA00; Sat, 14 Jan 2017 15:37:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7163B15FB; Sat, 14 Jan 2017 15:37:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFbwuS026665; Sat, 14 Jan 2017 15:37:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFbwnp026664; Sat, 14 Jan 2017 15:37:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141537.v0EFbwnp026664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312174 - vendor/llvm/llvm-release_40-r292009 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:37:59 -0000 Author: dim Date: Sat Jan 14 15:37:58 2017 New Revision: 312174 URL: https://svnweb.freebsd.org/changeset/base/312174 Log: Tag llvm release_40 branch r292009. Added: vendor/llvm/llvm-release_40-r292009/ - copied from r312173, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:38:40 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF407CAFACD; Sat, 14 Jan 2017 15:38:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A509B18E3; Sat, 14 Jan 2017 15:38:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFcdaF026780; Sat, 14 Jan 2017 15:38:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFcdqS026779; Sat, 14 Jan 2017 15:38:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141538.v0EFcdqS026779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312176 - vendor/clang/clang-release_40-r292009 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:38:41 -0000 Author: dim Date: Sat Jan 14 15:38:39 2017 New Revision: 312176 URL: https://svnweb.freebsd.org/changeset/base/312176 Log: Tag clang release_40 branch r292009. Added: vendor/clang/clang-release_40-r292009/ - copied from r312175, vendor/clang/dist/ From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:38:37 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 183B3CAFAC8; Sat, 14 Jan 2017 15:38:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B260B18E1; Sat, 14 Jan 2017 15:38:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFcakp026733; Sat, 14 Jan 2017 15:38:36 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFcZ3X026728; Sat, 14 Jan 2017 15:38:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141538.v0EFcZ3X026728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:38:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312175 - in vendor/clang/dist: . bindings/python/clang bindings/python/tests/cindex docs include/clang-c include/clang/AST include/clang/Basic include/clang/Driver include/clang/Index ... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:38:37 -0000 Author: dim Date: Sat Jan 14 15:38:35 2017 New Revision: 312175 URL: https://svnweb.freebsd.org/changeset/base/312175 Log: Vendor import of clang release_40 branch r292009: https://llvm.org/svn/llvm-project/cfe/branches/release_40@292009 Added: vendor/clang/dist/test/CXX/basic/basic.start/basic.start.init/p2.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/pr31054.cpp (contents, props changed) vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/ vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/ vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/ vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/ vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/ vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/ vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/disable-llvm.c (contents, props changed) vendor/clang/dist/test/Modules/Inputs/FooFramework.framework/ vendor/clang/dist/test/Modules/Inputs/FooFramework.framework/Modules/ vendor/clang/dist/test/Modules/Inputs/FooFramework.framework/Modules/module.modulemap vendor/clang/dist/test/Modules/Inputs/FooFramework.framework/PrivateHeaders/ vendor/clang/dist/test/Modules/Inputs/FooFramework.framework/PrivateHeaders/Bar.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/FooFramework.framework/PrivateHeaders/Baz_Private.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/FooFramework.framework/PrivateHeaders/Foo.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/FooFramework.framework/PrivateHeaders/FooUmbrella.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR31469/ vendor/clang/dist/test/Modules/Inputs/PR31469/empty.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR31469/module.modulemap vendor/clang/dist/test/Modules/Inputs/PR31469/textual.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR31469/textual_file_shadow.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/import-textual/ vendor/clang/dist/test/Modules/Inputs/import-textual/M/ vendor/clang/dist/test/Modules/Inputs/import-textual/M/A/ vendor/clang/dist/test/Modules/Inputs/import-textual/M/A/A.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/import-textual/M/B/ vendor/clang/dist/test/Modules/Inputs/import-textual/M/B/B.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/import-textual/M/module.modulemap vendor/clang/dist/test/Modules/Inputs/import-textual/M/someheader.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/import-textual/M2/ vendor/clang/dist/test/Modules/Inputs/import-textual/M2/A/ vendor/clang/dist/test/Modules/Inputs/import-textual/M2/A/A.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/import-textual/M2/B/ vendor/clang/dist/test/Modules/Inputs/import-textual/M2/B/B.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/import-textual/M2/module.modulemap vendor/clang/dist/test/Modules/Inputs/import-textual/M2/someheader.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/cstddef vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/type_traits vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/sys/ vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/sys/_types/ vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/sys/_types/_ptrdiff_t.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/sys/_types/_types.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/module-impl-with-link/ vendor/clang/dist/test/Modules/Inputs/module-impl-with-link/foo.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/module-impl-with-link/module.modulemap vendor/clang/dist/test/Modules/builtin-import.mm vendor/clang/dist/test/Modules/import-textual-noguard.mm vendor/clang/dist/test/Modules/import-textual.mm vendor/clang/dist/test/Modules/module-impl-with-link.c (contents, props changed) vendor/clang/dist/test/Modules/pr31469.cpp (contents, props changed) vendor/clang/dist/test/Modules/textual-hdr-in-umbrella-hdr.m vendor/clang/dist/test/OpenMP/nvptx_parallel_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_parallel_for_is_device_ptr_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_parallel_for_simd_is_device_ptr_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_device_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_if_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_is_device_ptr_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_map_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_misc_messages.c (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_private_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp (contents, props changed) vendor/clang/dist/test/PCH/uses-seh.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/diagnose_if-ext.cpp (contents, props changed) Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/bindings/python/tests/cindex/test_translation_unit.py vendor/clang/dist/docs/AttributeReference.rst vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/docs/UsersManual.rst vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/StmtOpenMP.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/OpenMPKinds.def vendor/clang/dist/include/clang/Basic/StmtNodes.td vendor/clang/dist/include/clang/Driver/CLCompatOptions.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Index/IndexSymbol.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclTemplate.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/StmtOpenMP.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/Analysis/BodyFarm.cpp vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/ReachableCode.cpp vendor/clang/dist/lib/Basic/OpenMPKinds.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.h vendor/clang/dist/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntimeNVPTX.h vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Index/IndexDecl.cpp vendor/clang/dist/lib/Index/IndexSymbol.cpp vendor/clang/dist/lib/Index/IndexTypeSourceInfo.cpp vendor/clang/dist/lib/Index/IndexingContext.cpp vendor/clang/dist/lib/Index/IndexingContext.h vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseOpenMP.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/SemaCoroutine.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaOpenMP.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriterStmt.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/SValBuilder.cpp vendor/clang/dist/test/Analysis/initializer.cpp vendor/clang/dist/test/Analysis/pointer-to-member.cpp vendor/clang/dist/test/Analysis/properties.m vendor/clang/dist/test/CXX/drs/dr0xx.cpp vendor/clang/dist/test/CXX/drs/dr12xx.cpp vendor/clang/dist/test/CXX/drs/dr13xx.cpp vendor/clang/dist/test/CXX/drs/dr14xx.cpp vendor/clang/dist/test/CXX/drs/dr15xx.cpp vendor/clang/dist/test/CXX/drs/dr16xx.cpp vendor/clang/dist/test/CXX/drs/dr18xx.cpp vendor/clang/dist/test/CXX/drs/dr2xx.cpp vendor/clang/dist/test/CXX/drs/dr5xx.cpp vendor/clang/dist/test/CXX/drs/dr6xx.cpp vendor/clang/dist/test/CodeGen/always_inline.c vendor/clang/dist/test/CodeGen/arm_acle.c vendor/clang/dist/test/CodeGen/builtins-arm.c vendor/clang/dist/test/CodeGen/builtins-arm64.c vendor/clang/dist/test/CodeGen/builtins-ppc-p9vector.c vendor/clang/dist/test/CodeGen/integer-overflow.c vendor/clang/dist/test/CodeGenCXX/cxx11-thread-local.cpp vendor/clang/dist/test/CodeGenCXX/dllexport.cpp vendor/clang/dist/test/CodeGenCXX/funcsig.cpp vendor/clang/dist/test/CodeGenCXX/global-array-destruction.cpp vendor/clang/dist/test/Driver/cl-options.c vendor/clang/dist/test/Driver/linux-ld.c vendor/clang/dist/test/Driver/x86-march.c vendor/clang/dist/test/Frontend/x86-target-cpu.c vendor/clang/dist/test/Index/Core/designated-inits.c vendor/clang/dist/test/Index/Core/index-source.cpp vendor/clang/dist/test/Index/Core/index-source.m vendor/clang/dist/test/Index/Core/index-subkinds.m vendor/clang/dist/test/Index/Core/index-with-module.m vendor/clang/dist/test/Index/index-templates.cpp vendor/clang/dist/test/Misc/ast-dump-decl.cpp vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/math.h vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/module.modulemap vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/c++/v1/stddef.h vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/module.modulemap vendor/clang/dist/test/Modules/Inputs/libc-libcxx/sysroot/usr/include/stddef.h vendor/clang/dist/test/Modules/cxx-templates.cpp vendor/clang/dist/test/OpenMP/nesting_of_regions.cpp vendor/clang/dist/test/OpenMP/target_teams_distribute_collapse_messages.cpp vendor/clang/dist/test/OpenMP/threadprivate_codegen.cpp vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c vendor/clang/dist/test/Profile/gcc-flag-compatibility.c vendor/clang/dist/test/Sema/atomic-ops.c vendor/clang/dist/test/Sema/warn-unreachable.c vendor/clang/dist/test/SemaCXX/coroutines.cpp vendor/clang/dist/test/SemaCXX/cxx0x-class.cpp vendor/clang/dist/test/SemaCXX/cxx1y-variable-templates_top_level.cpp vendor/clang/dist/test/SemaCXX/uninitialized.cpp vendor/clang/dist/test/SemaCXX/warn-shadow-in-lambdas.cpp vendor/clang/dist/test/SemaCXX/warn-shadow.cpp vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_template.cpp vendor/clang/dist/test/SemaTemplate/temp_arg_template_cxx1z.cpp vendor/clang/dist/tools/clang-fuzzer/ClangFuzzer.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CXCursor.cpp vendor/clang/dist/unittests/AST/SourceLocationTest.cpp vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/www/cxx_dr_status.html vendor/clang/dist/www/cxx_status.html vendor/clang/dist/www/index.html vendor/clang/dist/www/make_cxx_dr_status Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Sat Jan 14 15:37:58 2017 (r312174) +++ vendor/clang/dist/CMakeLists.txt Sat Jan 14 15:38:35 2017 (r312175) @@ -16,7 +16,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR "--libdir" "--includedir" "--prefix" - "--src-root") + "--src-root" + "--cmakedir") execute_process( COMMAND ${CONFIG_COMMAND} RESULT_VARIABLE HAD_ERROR @@ -41,6 +42,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR list(GET CONFIG_OUTPUT 3 INCLUDE_DIR) list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT) list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR) + list(GET CONFIG_OUTPUT 6 LLVM_CMAKE_PATH) if(NOT MSVC_IDE) set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS} @@ -58,7 +60,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) - set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") if(EXISTS ${LLVMCONFIG_FILE}) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") Modified: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- vendor/clang/dist/bindings/python/clang/cindex.py Sat Jan 14 15:37:58 2017 (r312174) +++ vendor/clang/dist/bindings/python/clang/cindex.py Sat Jan 14 15:38:35 2017 (r312175) @@ -64,7 +64,6 @@ call is efficient. from ctypes import * import collections -import sys import clang.enumerations @@ -74,33 +73,6 @@ import clang.enumerations # this by marshalling object arguments as void**. c_object_p = POINTER(c_void_p) -if sys.version_info[0] > 2: -# Python 3 strings are unicode, translate them to/from utf8 for C-interop -# Python 3 replaces xrange with range, we want xrange behaviour - xrange = range - - class c_string_p(c_char_p): - def __init__(self, p=None): - if type(p) == str: - p = p.encode("utf8") - super(c_char_p, self).__init__(p) - - def __str__(self): - return str(self.value) - - @property - def value(self): - if super(c_char_p, self).value is None: - return None - return super(c_char_p, self).value.decode("utf8") - - @classmethod - def from_param(cls, param): - return cls(param) -else: - c_string_p = c_char_p - - callbacks = {} ### Exception Classes ### @@ -175,7 +147,7 @@ class CachedProperty(object): class _CXString(Structure): """Helper for transforming CXString results.""" - _fields_ = [("spelling", c_string_p), ("free", c_int)] + _fields_ = [("spelling", c_char_p), ("free", c_int)] def __del__(self): conf.lib.clang_disposeString(self) @@ -357,7 +329,7 @@ class Diagnostic(object): @property def spelling(self): - return str(conf.lib.clang_getDiagnosticSpelling(self)) + return conf.lib.clang_getDiagnosticSpelling(self) @property def ranges(self): @@ -386,8 +358,8 @@ class Diagnostic(object): def __getitem__(self, key): range = SourceRange() - value = str(conf.lib.clang_getDiagnosticFixIt(self.diag, key, - byref(range))) + value = conf.lib.clang_getDiagnosticFixIt(self.diag, key, + byref(range)) if len(value) == 0: raise IndexError @@ -420,12 +392,12 @@ class Diagnostic(object): @property def category_name(self): """The string name of the category for this diagnostic.""" - return str(conf.lib.clang_getDiagnosticCategoryText(self)) + return conf.lib.clang_getDiagnosticCategoryText(self) @property def option(self): """The command-line option that enables this diagnostic.""" - return str(conf.lib.clang_getDiagnosticOption(self, None)) + return conf.lib.clang_getDiagnosticOption(self, None) @property def disable_option(self): @@ -433,7 +405,7 @@ class Diagnostic(object): disable = _CXString() conf.lib.clang_getDiagnosticOption(self, byref(disable)) - return str(conf.lib.clang_getCString(disable)) + return conf.lib.clang_getCString(disable) def format(self, options=None): """ @@ -582,8 +554,8 @@ class BaseEnumeration(object): if value >= len(self.__class__._kinds): self.__class__._kinds += [None] * (value - len(self.__class__._kinds) + 1) if self.__class__._kinds[value] is not None: - raise ValueError('{0} value {1} already loaded'.format( - str(self.__class__), value)) + raise ValueError,'{0} value {1} already loaded'.format( + str(self.__class__), value) self.value = value self.__class__._kinds[value] = self self.__class__._name_map = None @@ -600,12 +572,12 @@ class BaseEnumeration(object): for key, value in self.__class__.__dict__.items(): if isinstance(value, self.__class__): self._name_map[value] = key - return str(self._name_map[self]) + return self._name_map[self] @classmethod def from_id(cls, id): if id >= len(cls._kinds) or cls._kinds[id] is None: - raise ValueError('Unknown template argument kind %d' % id) + raise ValueError,'Unknown template argument kind %d' % id return cls._kinds[id] def __repr__(self): @@ -624,7 +596,7 @@ class CursorKind(BaseEnumeration): @staticmethod def get_all_kinds(): """Return all CursorKind enumeration instances.""" - return [x for x in CursorKind._kinds if x] + return filter(None, CursorKind._kinds) def is_declaration(self): """Test if this is a declaration kind.""" @@ -1457,9 +1429,9 @@ class Cursor(Structure): def spelling(self): """Return the spelling of the entity pointed at by the cursor.""" if not hasattr(self, '_spelling'): - self._spelling = str(conf.lib.clang_getCursorSpelling(self)) + self._spelling = conf.lib.clang_getCursorSpelling(self) - return str(self._spelling) + return self._spelling @property def displayname(self): @@ -1471,7 +1443,7 @@ class Cursor(Structure): arguments of a class template specialization. """ if not hasattr(self, '_displayname'): - self._displayname = str(conf.lib.clang_getCursorDisplayName(self)) + self._displayname = conf.lib.clang_getCursorDisplayName(self) return self._displayname @@ -1479,7 +1451,7 @@ class Cursor(Structure): def mangled_name(self): """Return the mangled name for the entity referenced by this cursor.""" if not hasattr(self, '_mangled_name'): - self._mangled_name = str(conf.lib.clang_Cursor_getMangling(self)) + self._mangled_name = conf.lib.clang_Cursor_getMangling(self) return self._mangled_name @@ -1618,7 +1590,7 @@ class Cursor(Structure): self._objc_type_encoding = \ conf.lib.clang_getDeclObjCTypeEncoding(self) - return str(self._objc_type_encoding) + return self._objc_type_encoding @property def hash(self): @@ -1665,23 +1637,17 @@ class Cursor(Structure): @property def brief_comment(self): """Returns the brief comment text associated with that Cursor""" - r = conf.lib.clang_Cursor_getBriefCommentText(self) - if not r: - return None - return str(r) + return conf.lib.clang_Cursor_getBriefCommentText(self) @property def raw_comment(self): """Returns the raw comment text associated with that Cursor""" - r = conf.lib.clang_Cursor_getRawCommentText(self) - if not r: - return None - return str(r) + return conf.lib.clang_Cursor_getRawCommentText(self) def get_arguments(self): """Return an iterator for accessing the arguments of this cursor.""" num_args = conf.lib.clang_Cursor_getNumArguments(self) - for i in xrange(0, num_args): + for i in range(0, num_args): yield conf.lib.clang_Cursor_getArgument(self, i) def get_num_template_arguments(self): @@ -1811,7 +1777,7 @@ class StorageClass(object): if value >= len(StorageClass._kinds): StorageClass._kinds += [None] * (value - len(StorageClass._kinds) + 1) if StorageClass._kinds[value] is not None: - raise ValueError('StorageClass already loaded') + raise ValueError,'StorageClass already loaded' self.value = value StorageClass._kinds[value] = self StorageClass._name_map = None @@ -1832,7 +1798,7 @@ class StorageClass(object): @staticmethod def from_id(id): if id >= len(StorageClass._kinds) or not StorageClass._kinds[id]: - raise ValueError('Unknown storage class %d' % id) + raise ValueError,'Unknown storage class %d' % id return StorageClass._kinds[id] def __repr__(self): @@ -1885,7 +1851,7 @@ class TypeKind(BaseEnumeration): @property def spelling(self): """Retrieve the spelling of this TypeKind.""" - return str(conf.lib.clang_getTypeKindSpelling(self.value)) + return conf.lib.clang_getTypeKindSpelling(self.value) def __repr__(self): return 'TypeKind.%s' % (self.name,) @@ -2161,7 +2127,7 @@ class Type(Structure): """ Retrieve the offset of a field in the record. """ - return conf.lib.clang_Type_getOffsetOf(self, fieldname) + return conf.lib.clang_Type_getOffsetOf(self, c_char_p(fieldname)) def get_ref_qualifier(self): """ @@ -2188,7 +2154,7 @@ class Type(Structure): @property def spelling(self): """Retrieve the spelling of this Type.""" - return str(conf.lib.clang_getTypeSpelling(self)) + return conf.lib.clang_getTypeSpelling(self) def __eq__(self, other): if type(other) != type(self): @@ -2220,7 +2186,7 @@ class ClangObject(object): class _CXUnsavedFile(Structure): """Helper for passing unsaved file arguments.""" - _fields_ = [("name", c_string_p), ("contents", c_string_p), ('length', c_ulong)] + _fields_ = [("name", c_char_p), ("contents", c_char_p), ('length', c_ulong)] # Functions calls through the python interface are rather slow. Fortunately, # for most symboles, we do not need to perform a function call. Their spelling @@ -2266,7 +2232,7 @@ class CompletionChunk: self.__kindNumberCache = -1 def __repr__(self): - return "{'" + str(self.spelling) + "', " + str(self.kind) + "}" + return "{'" + self.spelling + "', " + str(self.kind) + "}" @CachedProperty def spelling(self): @@ -2575,9 +2541,7 @@ class TranslationUnit(ClangObject): args_array = None if len(args) > 0: - args_array = (c_string_p * len(args))() - for i,a in enumerate(args): - args_array[i] = c_string_p(a) + args_array = (c_char_p * len(args))(* args) unsaved_array = None if len(unsaved_files) > 0: @@ -2586,8 +2550,8 @@ class TranslationUnit(ClangObject): if hasattr(contents, "read"): contents = contents.read() - unsaved_array[i].name = c_string_p(name) - unsaved_array[i].contents = c_string_p(contents) + unsaved_array[i].name = name + unsaved_array[i].contents = contents unsaved_array[i].length = len(contents) ptr = conf.lib.clang_parseTranslationUnit(index, filename, args_array, @@ -2642,7 +2606,7 @@ class TranslationUnit(ClangObject): @property def spelling(self): """Get the original translation unit source file name.""" - return str(conf.lib.clang_getTranslationUnitSpelling(self)) + return conf.lib.clang_getTranslationUnitSpelling(self) def get_includes(self): """ @@ -2765,9 +2729,9 @@ class TranslationUnit(ClangObject): # FIXME: It would be great to support an efficient version # of this, one day. value = value.read() - print(value) + print value if not isinstance(value, str): - raise TypeError('Unexpected unsaved file contents.') + raise TypeError,'Unexpected unsaved file contents.' unsaved_files_array[i].name = name unsaved_files_array[i].contents = value unsaved_files_array[i].length = len(value) @@ -2829,11 +2793,11 @@ class TranslationUnit(ClangObject): # FIXME: It would be great to support an efficient version # of this, one day. value = value.read() - print(value) + print value if not isinstance(value, str): - raise TypeError('Unexpected unsaved file contents.') - unsaved_files_array[i].name = c_string_p(name) - unsaved_files_array[i].contents = c_string_p(value) + raise TypeError,'Unexpected unsaved file contents.' + unsaved_files_array[i].name = name + unsaved_files_array[i].contents = value unsaved_files_array[i].length = len(value) ptr = conf.lib.clang_codeCompleteAt(self, path, line, column, unsaved_files_array, len(unsaved_files), options) @@ -2868,7 +2832,7 @@ class File(ClangObject): @property def name(self): """Return the complete file and path name of the file.""" - return str(conf.lib.clang_getCString(conf.lib.clang_getFileName(self))) + return conf.lib.clang_getCString(conf.lib.clang_getFileName(self)) @property def time(self): @@ -2876,7 +2840,7 @@ class File(ClangObject): return conf.lib.clang_getFileTime(self) def __str__(self): - return str(self.name) + return self.name def __repr__(self): return "" % (self.name) @@ -2945,12 +2909,12 @@ class CompileCommand(object): @property def directory(self): """Get the working directory for this CompileCommand""" - return str(conf.lib.clang_CompileCommand_getDirectory(self.cmd)) + return conf.lib.clang_CompileCommand_getDirectory(self.cmd) @property def filename(self): """Get the working filename for this CompileCommand""" - return str(conf.lib.clang_CompileCommand_getFilename(self.cmd)) + return conf.lib.clang_CompileCommand_getFilename(self.cmd) @property def arguments(self): @@ -2962,7 +2926,7 @@ class CompileCommand(object): """ length = conf.lib.clang_CompileCommand_getNumArgs(self.cmd) for i in xrange(length): - yield str(conf.lib.clang_CompileCommand_getArg(self.cmd, i)) + yield conf.lib.clang_CompileCommand_getArg(self.cmd, i) class CompileCommands(object): """ @@ -3056,7 +3020,7 @@ class Token(Structure): This is the textual representation of the token in source. """ - return str(conf.lib.clang_getTokenSpelling(self._tu, self)) + return conf.lib.clang_getTokenSpelling(self._tu, self) @property def kind(self): @@ -3099,7 +3063,7 @@ functionList = [ [c_object_p]), ("clang_CompilationDatabase_fromDirectory", - [c_string_p, POINTER(c_uint)], + [c_char_p, POINTER(c_uint)], c_object_p, CompilationDatabase.from_result), @@ -3109,7 +3073,7 @@ functionList = [ CompileCommands.from_result), ("clang_CompilationDatabase_getCompileCommands", - [c_object_p, c_string_p], + [c_object_p, c_char_p], c_object_p, CompileCommands.from_result), @@ -3144,7 +3108,7 @@ functionList = [ c_uint), ("clang_codeCompleteAt", - [TranslationUnit, c_string_p, c_int, c_int, c_void_p, c_int, c_int], + [TranslationUnit, c_char_p, c_int, c_int, c_void_p, c_int, c_int], POINTER(CCRStructure)), ("clang_codeCompleteGetDiagnostic", @@ -3160,7 +3124,7 @@ functionList = [ c_object_p), ("clang_createTranslationUnit", - [Index, c_string_p], + [Index, c_char_p], c_object_p), ("clang_CXXConstructor_isConvertingConstructor", @@ -3310,7 +3274,7 @@ functionList = [ ("clang_getCString", [_CXString], - c_string_p), + c_char_p), ("clang_getCursor", [TranslationUnit, SourceLocation], @@ -3457,7 +3421,7 @@ functionList = [ Type.from_result), ("clang_getFile", - [TranslationUnit, c_string_p], + [TranslationUnit, c_char_p], c_object_p), ("clang_getFileName", @@ -3586,7 +3550,7 @@ functionList = [ ("clang_getTUResourceUsageName", [c_uint], - c_string_p), + c_char_p), ("clang_getTypeDeclaration", [Type], @@ -3681,7 +3645,7 @@ functionList = [ bool), ("clang_parseTranslationUnit", - [Index, c_string_p, c_void_p, c_int, c_void_p, c_int, c_int], + [Index, c_char_p, c_void_p, c_int, c_void_p, c_int, c_int], c_object_p), ("clang_reparseTranslationUnit", @@ -3689,7 +3653,7 @@ functionList = [ c_int), ("clang_saveTranslationUnit", - [TranslationUnit, c_string_p, c_uint], + [TranslationUnit, c_char_p, c_uint], c_int), ("clang_tokenize", @@ -3761,7 +3725,7 @@ functionList = [ Type.from_result), ("clang_Type_getOffsetOf", - [Type, c_string_p], + [Type, c_char_p], c_longlong), ("clang_Type_getSizeOf", @@ -3820,8 +3784,7 @@ def register_functions(lib, ignore_error def register(item): return register_function(lib, item, ignore_errors) - for f in functionList: - register(f) + map(register, functionList) class Config: library_path = None Modified: vendor/clang/dist/bindings/python/tests/cindex/test_translation_unit.py ============================================================================== --- vendor/clang/dist/bindings/python/tests/cindex/test_translation_unit.py Sat Jan 14 15:37:58 2017 (r312174) +++ vendor/clang/dist/bindings/python/tests/cindex/test_translation_unit.py Sat Jan 14 15:38:35 2017 (r312175) @@ -59,13 +59,9 @@ int SOME_DEFINE; assert spellings[-1] == 'y' def test_unsaved_files_2(): - try: - from StringIO import StringIO - except: - from io import StringIO - + import StringIO tu = TranslationUnit.from_source('fake.c', unsaved_files = [ - ('fake.c', StringIO('int x;'))]) + ('fake.c', StringIO.StringIO('int x;'))]) spellings = [c.spelling for c in tu.cursor.get_children()] assert spellings[-1] == 'x' Modified: vendor/clang/dist/docs/AttributeReference.rst ============================================================================== --- vendor/clang/dist/docs/AttributeReference.rst Sat Jan 14 15:37:58 2017 (r312174) +++ vendor/clang/dist/docs/AttributeReference.rst Sat Jan 14 15:38:35 2017 (r312175) @@ -1,13 +1,3118 @@ .. ------------------------------------------------------------------- NOTE: This file is automatically generated by running clang-tblgen - -gen-attr-docs. Do not edit this file by hand!! The contents for - this file are automatically generated by a server-side process. - - Please do not commit this file. The file exists for local testing - purposes only. + -gen-attr-docs. Do not edit this file by hand!! ------------------------------------------------------------------- =================== Attributes in Clang -=================== \ No newline at end of file +=================== +.. contents:: + :local: + +Introduction +============ + +This page lists the attributes currently supported by Clang. + +Function Attributes +=================== + + +interrupt +--------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Clang supports the GNU style ``__attribute__((interrupt("TYPE")))`` attribute on +ARM targets. This attribute may be attached to a function definition and +instructs the backend to generate appropriate function entry/exit code so that +it can be used directly as an interrupt service routine. + +The parameter passed to the interrupt attribute is optional, but if +provided it must be a string literal with one of the following values: "IRQ", +"FIQ", "SWI", "ABORT", "UNDEF". + +The semantics are as follows: + +- If the function is AAPCS, Clang instructs the backend to realign the stack to + 8 bytes on entry. This is a general requirement of the AAPCS at public + interfaces, but may not hold when an exception is taken. Doing this allows + other AAPCS functions to be called. +- If the CPU is M-class this is all that needs to be done since the architecture + itself is designed in such a way that functions obeying the normal AAPCS ABI + constraints are valid exception handlers. +- If the CPU is not M-class, the prologue and epilogue are modified to save all + non-banked registers that are used, so that upon return the user-mode state + will not be corrupted. Note that to avoid unnecessary overhead, only + general-purpose (integer) registers are saved in this way. If VFP operations + are needed, that state must be saved manually. + + Specifically, interrupt kinds other than "FIQ" will save all core registers + except "lr" and "sp". "FIQ" interrupts will save r0-r7. +- If the CPU is not M-class, the return instruction is changed to one of the + canonical sequences permitted by the architecture for exception return. Where + possible the function itself will make the necessary "lr" adjustments so that + the "preferred return address" is selected. + + Unfortunately the compiler is unable to make this guarantee for an "UNDEF" + handler, where the offset from "lr" to the preferred return address depends on + the execution state of the code which generated the exception. In this case + a sequence equivalent to "movs pc, lr" will be used. + + +abi_tag (gnu::abi_tag) +---------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``abi_tag`` attribute can be applied to a function, variable, class or +inline namespace declaration to modify the mangled name of the entity. It gives +the ability to distinguish between different versions of the same entity but +with different ABI versions supported. For example, a newer version of a class +could have a different set of data members and thus have a different size. Using +the ``abi_tag`` attribute, it is possible to have different mangled names for +a global variable of the class type. Therefor, the old code could keep using +the old manged name and the new code will use the new mangled name with tags. + + +acquire_capability (acquire_shared_capability, clang::acquire_capability, clang::acquire_shared_capability) +----------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Marks a function as acquiring a capability. + + +alloc_size (gnu::alloc_size) +---------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``alloc_size`` attribute can be placed on functions that return pointers in +order to hint to the compiler how many bytes of memory will be available at the +returned poiner. ``alloc_size`` takes one or two arguments. + +- ``alloc_size(N)`` implies that argument number N equals the number of + available bytes at the returned pointer. +- ``alloc_size(N, M)`` implies that the product of argument number N and + argument number M equals the number of available bytes at the returned + pointer. + +Argument numbers are 1-based. + +An example of how to use ``alloc_size`` + +.. code-block:: c + + void *my_malloc(int a) __attribute__((alloc_size(1))); + void *my_calloc(int a, int b) __attribute__((alloc_size(1, 2))); + + int main() { + void *const p = my_malloc(100); + assert(__builtin_object_size(p, 0) == 100); + void *const a = my_calloc(20, 5); + assert(__builtin_object_size(a, 0) == 100); + } + +.. Note:: This attribute works differently in clang than it does in GCC. + Specifically, clang will only trace ``const`` pointers (as above); we give up + on pointers that are not marked as ``const``. In the vast majority of cases, + this is unimportant, because LLVM has support for the ``alloc_size`` + attribute. However, this may cause mildly unintuitive behavior when used with + other attributes, such as ``enable_if``. + + +interrupt +--------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Clang supports the GNU style ``__attribute__((interrupt))`` attribute on +x86/x86-64 targets.The compiler generates function entry and exit sequences +suitable for use in an interrupt handler when this attribute is present. +The 'IRET' instruction, instead of the 'RET' instruction, is used to return +from interrupt or exception handlers. All registers, except for the EFLAGS +register which is restored by the 'IRET' instruction, are preserved by the +compiler. + +Any interruptible-without-stack-switch code must be compiled with +-mno-red-zone since interrupt handlers can and will, because of the +hardware design, touch the red zone. + +1. interrupt handler must be declared with a mandatory pointer argument: + + .. code-block:: c + + struct interrupt_frame + { + uword_t ip; + uword_t cs; + uword_t flags; + uword_t sp; + uword_t ss; + }; + + __attribute__ ((interrupt)) + void f (struct interrupt_frame *frame) { + ... + } + +2. exception handler: + + The exception handler is very similar to the interrupt handler with + a different mandatory function signature: + + .. code-block:: c + + __attribute__ ((interrupt)) + void f (struct interrupt_frame *frame, uword_t error_code) { + ... + } + + and compiler pops 'ERROR_CODE' off stack before the 'IRET' instruction. + + The exception handler should only be used for exceptions which push an + error code and all other exceptions must use the interrupt handler. + The system will crash if the wrong handler is used. + + +assert_capability (assert_shared_capability, clang::assert_capability, clang::assert_shared_capability) +------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Marks a function that dynamically tests whether a capability is held, and halts +the program if it is not held. + + +assume_aligned (gnu::assume_aligned) +------------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Use ``__attribute__((assume_aligned([,]))`` on a function +declaration to specify that the return value of the function (which must be a +pointer type) has the specified offset, in bytes, from an address with the +specified alignment. The offset is taken to be zero if omitted. + +.. code-block:: c++ + + // The returned pointer value has 32-byte alignment. + void *a() __attribute__((assume_aligned (32))); + + // The returned pointer value is 4 bytes greater than an address having + // 32-byte alignment. + void *b() __attribute__((assume_aligned (32, 4))); + +Note that this attribute provides information to the compiler regarding a +condition that the code already ensures is true. It does not cause the compiler +to enforce the provided alignment assumption. + + +availability +------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +The ``availability`` attribute can be placed on declarations to describe the +lifecycle of that declaration relative to operating system versions. Consider +the function declaration for a hypothetical function ``f``: + +.. code-block:: c++ + + void f(void) __attribute__((availability(macos,introduced=10.4,deprecated=10.6,obsoleted=10.7))); + +The availability attribute states that ``f`` was introduced in Mac OS X 10.4, +deprecated in Mac OS X 10.6, and obsoleted in Mac OS X 10.7. This information +is used by Clang to determine when it is safe to use ``f``: for example, if +Clang is instructed to compile code for Mac OS X 10.5, a call to ``f()`` +succeeds. If Clang is instructed to compile code for Mac OS X 10.6, the call +succeeds but Clang emits a warning specifying that the function is deprecated. +Finally, if Clang is instructed to compile code for Mac OS X 10.7, the call +fails because ``f()`` is no longer available. + +The availability attribute is a comma-separated list starting with the +platform name and then including clauses specifying important milestones in the +declaration's lifetime (in any order) along with additional information. Those +clauses can be: + +introduced=\ *version* + The first version in which this declaration was introduced. + +deprecated=\ *version* + The first version in which this declaration was deprecated, meaning that + users should migrate away from this API. + +obsoleted=\ *version* + The first version in which this declaration was obsoleted, meaning that it + was removed completely and can no longer be used. + +unavailable + This declaration is never available on this platform. + +message=\ *string-literal* + Additional message text that Clang will provide when emitting a warning or + error about use of a deprecated or obsoleted declaration. Useful to direct + users to replacement APIs. + +replacement=\ *string-literal* + Additional message text that Clang will use to provide Fix-It when emitting + a warning about use of a deprecated declaration. The Fix-It will replace + the deprecated declaration with the new declaration specified. + +Multiple availability attributes can be placed on a declaration, which may +correspond to different platforms. Only the availability attribute with the +platform corresponding to the target platform will be used; any others will be +ignored. If no availability attribute specifies availability for the current +target platform, the availability attributes are ignored. Supported platforms +are: + +``ios`` + Apple's iOS operating system. The minimum deployment target is specified by + the ``-mios-version-min=*version*`` or ``-miphoneos-version-min=*version*`` + command-line arguments. + +``macos`` + Apple's Mac OS X operating system. The minimum deployment target is + specified by the ``-mmacosx-version-min=*version*`` command-line argument. + ``macosx`` is supported for backward-compatibility reasons, but it is + deprecated. + +``tvos`` + Apple's tvOS operating system. The minimum deployment target is specified by + the ``-mtvos-version-min=*version*`` command-line argument. + +``watchos`` + Apple's watchOS operating system. The minimum deployment target is specified by + the ``-mwatchos-version-min=*version*`` command-line argument. + +A declaration can typically be used even when deploying back to a platform +version prior to when the declaration was introduced. When this happens, the +declaration is `weakly linked +`_, +as if the ``weak_import`` attribute were added to the declaration. A +weakly-linked declaration may or may not be present a run-time, and a program +can determine whether the declaration is present by checking whether the +address of that declaration is non-NULL. + +The flag ``strict`` disallows using API when deploying back to a +platform version prior to when the declaration was introduced. An +attempt to use such API before its introduction causes a hard error. +Weakly-linking is almost always a better API choice, since it allows +users to query availability at runtime. + +If there are multiple declarations of the same entity, the availability +attributes must either match on a per-platform basis or later +declarations must not have availability attributes for that +platform. For example: + +.. code-block:: c + + void g(void) __attribute__((availability(macos,introduced=10.4))); + void g(void) __attribute__((availability(macos,introduced=10.4))); // okay, matches + void g(void) __attribute__((availability(ios,introduced=4.0))); // okay, adds a new platform + void g(void); // okay, inherits both macos and ios availability from above. + void g(void) __attribute__((availability(macos,introduced=10.5))); // error: mismatch + +When one method overrides another, the overriding method can be more widely available than the overridden method, e.g.,: + +.. code-block:: objc + + @interface A + - (id)method __attribute__((availability(macos,introduced=10.4))); + - (id)method2 __attribute__((availability(macos,introduced=10.4))); + @end + + @interface B : A + - (id)method __attribute__((availability(macos,introduced=10.3))); // okay: method moved into base class later + - (id)method __attribute__((availability(macos,introduced=10.5))); // error: this method was available via the base class in 10.4 + @end + + +_Noreturn +--------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "","","","X", "" + +A function declared as ``_Noreturn`` shall not return to its caller. The +compiler will generate a diagnostic for a function declared as ``_Noreturn`` +that appears to be capable of returning to its caller. + + +noreturn +-------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "","X","","", "" + +A function declared as ``[[noreturn]]`` shall not return to its caller. The +compiler will generate a diagnostic for a function declared as ``[[noreturn]]`` +that appears to be capable of returning to its caller. + + +carries_dependency +------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``carries_dependency`` attribute specifies dependency propagation into and +out of functions. + +When specified on a function or Objective-C method, the ``carries_dependency`` +attribute means that the return value carries a dependency out of the function, +so that the implementation need not constrain ordering upon return from that +function. Implementations of the function and its caller may choose to preserve +dependencies instead of emitting memory ordering instructions such as fences. + +Note, this attribute does not change the meaning of the program, but may result +in generation of more efficient code. + + +convergent (clang::convergent) +------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``convergent`` attribute can be placed on a function declaration. It is +translated into the LLVM ``convergent`` attribute, which indicates that the call +instructions of a function with this attribute cannot be made control-dependent +on any additional values. + +In languages designed for SPMD/SIMT programming model, e.g. OpenCL or CUDA, +the call instructions of a function with this attribute must be executed by +all work items or threads in a work group or sub group. + +This attribute is different from ``noduplicate`` because it allows duplicating +function calls if it can be proved that the duplicated function calls are +not made control-dependent on any additional values, e.g., unrolling a loop +executed by all work items. + +Sample usage: +.. code-block:: c + + void convfunc(void) __attribute__((convergent)); + // Setting it as a C++11 attribute is also valid in a C++ program. + // void convfunc(void) [[clang::convergent]]; + + +deprecated (gnu::deprecated) +---------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","X","", "" + +The ``deprecated`` attribute can be applied to a function, a variable, or a +type. This is useful when identifying functions, variables, or types that are +expected to be removed in a future version of a program. + +Consider the function declaration for a hypothetical function ``f``: + +.. code-block:: c++ + + void f(void) __attribute__((deprecated("message", "replacement"))); + +When spelled as `__attribute__((deprecated))`, the deprecated attribute can have +two optional string arguments. The first one is the message to display when +emitting the warning; the second one enables the compiler to provide a Fix-It +to replace the deprecated name with a new name. Otherwise, when spelled as +`[[gnu::deprecated]] or [[deprecated]]`, the attribute can have one optional +string argument which is the message to display when emitting the warning. + + +diagnose_if +----------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +The ``diagnose_if`` attribute can be placed on function declarations to emit +warnings or errors at compile-time if calls to the attributed function meet +certain user-defined criteria. For example: + +.. code-block:: c + void abs(int a) + __attribute__((diagnose_if(a >= 0, "Redundant abs call", "warning"))); + void must_abs(int a) + __attribute__((diagnose_if(a >= 0, "Redundant abs call", "error"))); + + int val = abs(1); // warning: Redundant abs call + int val2 = must_abs(1); // error: Redundant abs call + int val3 = abs(val); + int val4 = must_abs(val); // Because run-time checks are not emitted for + // diagnose_if attributes, this executes without + // issue. + + +``diagnose_if`` is closely related to ``enable_if``, with a few key differences: + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:38:53 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 634CDCAFB4D; Sat, 14 Jan 2017 15:38:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E91419F1; Sat, 14 Jan 2017 15:38:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFcqBP026870; Sat, 14 Jan 2017 15:38:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFcmsY026830; Sat, 14 Jan 2017 15:38:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141538.v0EFcmsY026830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312177 - in vendor/compiler-rt/dist: cmake cmake/Modules lib/asan lib/asan/tests lib/builtins/arm lib/msan/tests lib/sancov lib/sanitizer_common lib/sanitizer_common/tests lib/scudo li... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:38:53 -0000 Author: dim Date: Sat Jan 14 15:38:48 2017 New Revision: 312177 URL: https://svnweb.freebsd.org/changeset/base/312177 Log: Vendor import of compiler-rt release_40 branch r292009: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_40@292009 Added: vendor/compiler-rt/dist/lib/sancov/ vendor/compiler-rt/dist/lib/scudo/scudo_crc32.cpp (contents, props changed) vendor/compiler-rt/dist/lib/scudo/scudo_crc32.h (contents, props changed) vendor/compiler-rt/dist/test/tsan/Darwin/ignore-noninstrumented.mm Modified: vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTDarwinUtils.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake vendor/compiler-rt/dist/cmake/config-ix.cmake vendor/compiler-rt/dist/lib/asan/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/asan_activation.cc vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_flags.cc vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/builtins/arm/adddf3vfp.S vendor/compiler-rt/dist/lib/builtins/arm/addsf3vfp.S vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S vendor/compiler-rt/dist/lib/builtins/arm/divdf3vfp.S vendor/compiler-rt/dist/lib/builtins/arm/divsf3vfp.S vendor/compiler-rt/dist/lib/builtins/arm/eqdf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/eqsf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/extendsfdf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/fixdfsivfp.S vendor/compiler-rt/dist/lib/builtins/arm/fixsfsivfp.S vendor/compiler-rt/dist/lib/builtins/arm/fixunsdfsivfp.S vendor/compiler-rt/dist/lib/builtins/arm/fixunssfsivfp.S vendor/compiler-rt/dist/lib/builtins/arm/floatsidfvfp.S vendor/compiler-rt/dist/lib/builtins/arm/floatsisfvfp.S vendor/compiler-rt/dist/lib/builtins/arm/floatunssidfvfp.S vendor/compiler-rt/dist/lib/builtins/arm/floatunssisfvfp.S vendor/compiler-rt/dist/lib/builtins/arm/gedf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/gesf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/gtdf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/gtsf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/ledf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/lesf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/ltdf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/ltsf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/muldf3vfp.S vendor/compiler-rt/dist/lib/builtins/arm/mulsf3vfp.S vendor/compiler-rt/dist/lib/builtins/arm/nedf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/negdf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/negsf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/nesf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/subdf3vfp.S vendor/compiler-rt/dist/lib/builtins/arm/subsf3vfp.S vendor/compiler-rt/dist/lib/builtins/arm/truncdfsf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/unorddf2vfp.S vendor/compiler-rt/dist/lib/builtins/arm/unordsf2vfp.S vendor/compiler-rt/dist/lib/msan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libignore.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libignore.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_quarantine.h vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/scudo/CMakeLists.txt vendor/compiler-rt/dist/lib/scudo/scudo_allocator.cpp vendor/compiler-rt/dist/lib/scudo/scudo_utils.cpp vendor/compiler-rt/dist/lib/scudo/scudo_utils.h vendor/compiler-rt/dist/lib/stats/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.inc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.h vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt vendor/compiler-rt/dist/lib/xray/xray_AArch64.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/thread_local_quarantine_size_kb.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/start-deactivated.cc vendor/compiler-rt/dist/test/asan/lit.cfg vendor/compiler-rt/dist/test/profile/Linux/comdat_rename.test vendor/compiler-rt/dist/test/profile/lit.cfg vendor/compiler-rt/dist/test/xray/TestCases/Linux/patching-unpatching.cc Modified: vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Sat Jan 14 15:38:48 2017 (r312177) @@ -94,7 +94,7 @@ endfunction() # OS # SOURCES # CFLAGS -# LINKFLAGS +# LINK_FLAGS # DEFS # LINK_LIBS (only for shared library) # OBJECT_LIBS @@ -107,7 +107,7 @@ function(add_compiler_rt_runtime name ty cmake_parse_arguments(LIB "" "PARENT_TARGET" - "OS;ARCHS;SOURCES;CFLAGS;LINKFLAGS;DEFS;LINK_LIBS;OBJECT_LIBS" + "OS;ARCHS;SOURCES;CFLAGS;LINK_FLAGS;DEFS;LINK_LIBS;OBJECT_LIBS" ${ARGN}) set(libnames) if(APPLE) @@ -116,7 +116,7 @@ function(add_compiler_rt_runtime name ty set(libname "${name}_${os}") else() set(libname "${name}_${os}_dynamic") - set(extra_linkflags_${libname} ${DARWIN_${os}_LINKFLAGS} ${LIB_LINKFLAGS}) + set(extra_link_flags_${libname} ${DARWIN_${os}_LINK_FLAGS} ${LIB_LINK_FLAGS}) endif() list_intersect(LIB_ARCHS_${libname} DARWIN_${os}_ARCHS LIB_ARCHS) if(LIB_ARCHS_${libname}) @@ -139,7 +139,7 @@ function(add_compiler_rt_runtime name ty else() set(libname "${name}-dynamic-${arch}") set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) - set(extra_linkflags_${libname} ${TARGET_${arch}_LINKFLAGS} ${LIB_LINKFLAGS}) + set(extra_link_flags_${libname} ${TARGET_${arch}_LINK_FLAGS} ${LIB_LINK_FLAGS}) if(WIN32) set(output_name_${libname} ${name}_dynamic-${arch}${COMPILER_RT_OS_SUFFIX}) else() @@ -188,7 +188,7 @@ function(add_compiler_rt_runtime name ty add_library(${libname} ${type} ${sources_${libname}}) set_target_compile_flags(${libname} ${extra_cflags_${libname}}) - set_target_link_flags(${libname} ${extra_linkflags_${libname}}) + set_target_link_flags(${libname} ${extra_link_flags_${libname}}) set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) set_target_output_directories(${libname} ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) @@ -243,7 +243,7 @@ endfunction() # when cross compiling, COMPILER_RT_TEST_COMPILER_CFLAGS help # in compilation and linking of unittests. string(REPLACE " " ";" COMPILER_RT_UNITTEST_CFLAGS "${COMPILER_RT_TEST_COMPILER_CFLAGS}") -set(COMPILER_RT_UNITTEST_LINKFLAGS ${COMPILER_RT_UNITTEST_CFLAGS}) +set(COMPILER_RT_UNITTEST_LINK_FLAGS ${COMPILER_RT_UNITTEST_CFLAGS}) # Unittests support. set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest) Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTDarwinUtils.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/CompilerRTDarwinUtils.cmake Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTDarwinUtils.cmake Sat Jan 14 15:38:48 2017 (r312177) @@ -66,7 +66,7 @@ function(darwin_test_archs os valid_arch file(WRITE ${SIMPLE_C} "#include \nint main() { printf(__FILE__); return 0; }\n") set(os_linker_flags) - foreach(flag ${DARWIN_${os}_LINKFLAGS}) + foreach(flag ${DARWIN_${os}_LINK_FLAGS}) set(os_linker_flags "${os_linker_flags} ${flag}") endforeach() endif() Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake Sat Jan 14 15:38:48 2017 (r312177) @@ -1,16 +1,16 @@ # Link a shared library with COMPILER_RT_TEST_COMPILER. # clang_link_shared( # OBJECTS -# LINKFLAGS +# LINK_FLAGS # DEPS ) macro(clang_link_shared so_file) - cmake_parse_arguments(SOURCE "" "" "OBJECTS;LINKFLAGS;DEPS" ${ARGN}) + cmake_parse_arguments(SOURCE "" "" "OBJECTS;LINK_FLAGS;DEPS" ${ARGN}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND SOURCE_DEPS clang) endif() add_custom_command( OUTPUT ${so_file} COMMAND ${COMPILER_RT_TEST_COMPILER} -o "${so_file}" -shared - ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS} + ${SOURCE_LINK_FLAGS} ${SOURCE_OBJECTS} DEPENDS ${SOURCE_DEPS}) endmacro() Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake Sat Jan 14 15:38:48 2017 (r312177) @@ -126,7 +126,7 @@ endfunction() # If successful, saves target flags for this architecture. macro(test_target_arch arch def) set(TARGET_${arch}_CFLAGS ${ARGN}) - set(TARGET_${arch}_LINKFLAGS ${ARGN}) + set(TARGET_${arch}_LINK_FLAGS ${ARGN}) set(argstring "") foreach(arg ${ARGN}) set(argstring "${argstring} ${arg}") @@ -219,8 +219,18 @@ macro(load_llvm_config) set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") # Make use of LLVM CMake modules. - file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE) - set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") + # --cmakedir is supported since llvm r291218 (4.0 release) + execute_process( + COMMAND ${LLVM_CONFIG_PATH} --cmakedir + RESULT_VARIABLE HAD_ERROR + OUTPUT_VARIABLE CONFIG_OUTPUT) + if(NOT HAD_ERROR) + string(STRIP "${CONFIG_OUTPUT}" LLVM_CMAKE_PATH) + else() + file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE) + set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") + endif() + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") # Get some LLVM variables from LLVMConfig. include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") Modified: vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake Sat Jan 14 15:38:48 2017 (r312177) @@ -48,13 +48,13 @@ endmacro() # This function is only used on Darwin, where undefined symbols must be specified # in the linker invocation. -function(add_weak_symbols libname linkflags) +function(add_weak_symbols libname link_flags) file(STRINGS "${COMPILER_RT_SOURCE_DIR}/lib/${libname}/weak_symbols.txt" WEAK_SYMBOLS) - set(local_linkflags ${${linkflags}}) + set(local_link_flags ${${link_flags}}) foreach(SYMBOL ${WEAK_SYMBOLS}) - set(local_linkflags ${local_linkflags} -Wl,-U,${SYMBOL}) + set(local_link_flags ${local_link_flags} -Wl,-U,${SYMBOL}) endforeach() - set(${linkflags} ${local_linkflags} PARENT_SCOPE) + set(${link_flags} ${local_link_flags} PARENT_SCOPE) endfunction() macro(add_sanitizer_rt_version_list name) Modified: vendor/compiler-rt/dist/cmake/config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/config-ix.cmake Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/cmake/config-ix.cmake Sat Jan 14 15:38:48 2017 (r312177) @@ -29,6 +29,7 @@ check_cxx_compiler_flag(-std=c++11 check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC) check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG) check_cxx_compiler_flag("-Werror -msse3" COMPILER_RT_HAS_MSSE3_FLAG) +check_cxx_compiler_flag("-Werror -msse4.2" COMPILER_RT_HAS_MSSE4_2_FLAG) check_cxx_compiler_flag(--sysroot=. COMPILER_RT_HAS_SYSROOT_FLAG) if(NOT WIN32 AND NOT CYGWIN) @@ -241,26 +242,26 @@ if(APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET "") set(DARWIN_COMMON_CFLAGS -stdlib=libc++) - set(DARWIN_COMMON_LINKFLAGS + set(DARWIN_COMMON_LINK_FLAGS -stdlib=libc++ -lc++ -lc++abi) check_linker_flag("-fapplication-extension" COMPILER_RT_HAS_APP_EXTENSION) if(COMPILER_RT_HAS_APP_EXTENSION) - list(APPEND DARWIN_COMMON_LINKFLAGS "-fapplication-extension") + list(APPEND DARWIN_COMMON_LINK_FLAGS "-fapplication-extension") endif() set(DARWIN_osx_CFLAGS ${DARWIN_COMMON_CFLAGS} -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}) - set(DARWIN_osx_LINKFLAGS - ${DARWIN_COMMON_LINKFLAGS} + set(DARWIN_osx_LINK_FLAGS + ${DARWIN_COMMON_LINK_FLAGS} -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}) if(DARWIN_osx_SYSROOT) list(APPEND DARWIN_osx_CFLAGS -isysroot ${DARWIN_osx_SYSROOT}) - list(APPEND DARWIN_osx_LINKFLAGS -isysroot ${DARWIN_osx_SYSROOT}) + list(APPEND DARWIN_osx_LINK_FLAGS -isysroot ${DARWIN_osx_SYSROOT}) endif() # Figure out which arches to use for each OS @@ -283,8 +284,8 @@ if(APPLE) ${DARWIN_COMMON_CFLAGS} ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG} -isysroot ${DARWIN_${platform}sim_SYSROOT}) - set(DARWIN_${platform}sim_LINKFLAGS - ${DARWIN_COMMON_LINKFLAGS} + set(DARWIN_${platform}sim_LINK_FLAGS + ${DARWIN_COMMON_LINK_FLAGS} ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG} -isysroot ${DARWIN_${platform}sim_SYSROOT}) @@ -311,8 +312,8 @@ if(APPLE) ${DARWIN_COMMON_CFLAGS} ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG} -isysroot ${DARWIN_${platform}_SYSROOT}) - set(DARWIN_${platform}_LINKFLAGS - ${DARWIN_COMMON_LINKFLAGS} + set(DARWIN_${platform}_LINK_FLAGS + ${DARWIN_COMMON_LINK_FLAGS} ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG} -isysroot ${DARWIN_${platform}_SYSROOT}) Modified: vendor/compiler-rt/dist/lib/asan/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/asan/CMakeLists.txt Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/asan/CMakeLists.txt Sat Jan 14 15:38:48 2017 (r312177) @@ -106,9 +106,9 @@ endif() add_compiler_rt_component(asan) if(APPLE) - add_weak_symbols("asan" WEAK_SYMBOL_LINKFLAGS) - add_weak_symbols("ubsan" WEAK_SYMBOL_LINKFLAGS) - add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINKFLAGS) + add_weak_symbols("asan" WEAK_SYMBOL_LINK_FLAGS) + add_weak_symbols("ubsan" WEAK_SYMBOL_LINK_FLAGS) + add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINK_FLAGS) add_compiler_rt_runtime(clang_rt.asan SHARED @@ -121,7 +121,7 @@ if(APPLE) RTLSanCommon RTUbsan CFLAGS ${ASAN_DYNAMIC_CFLAGS} - LINKFLAGS ${WEAK_SYMBOL_LINKFLAGS} + LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS} DEFS ${ASAN_DYNAMIC_DEFINITIONS} PARENT_TARGET asan) else() @@ -188,7 +188,7 @@ else() RTAsan_dynamic_version_script_dummy RTUbsan_cxx CFLAGS ${ASAN_DYNAMIC_CFLAGS} - LINKFLAGS ${ASAN_DYNAMIC_LINK_FLAGS} + LINK_FLAGS ${ASAN_DYNAMIC_LINK_FLAGS} ${VERSION_SCRIPT_FLAG} LINK_LIBS ${ASAN_DYNAMIC_LIBS} DEFS ${ASAN_DYNAMIC_DEFINITIONS} Modified: vendor/compiler-rt/dist/lib/asan/asan_activation.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_activation.cc Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/asan/asan_activation.cc Sat Jan 14 15:38:48 2017 (r312177) @@ -77,12 +77,13 @@ static struct AsanDeactivatedFlags { void Print() { Report( - "quarantine_size_mb %d, max_redzone %d, poison_heap %d, " - "malloc_context_size %d, alloc_dealloc_mismatch %d, " - "allocator_may_return_null %d, coverage %d, coverage_dir %s, " - "allocator_release_to_os_interval_ms %d\n", - allocator_options.quarantine_size_mb, allocator_options.max_redzone, - poison_heap, malloc_context_size, + "quarantine_size_mb %d, thread_local_quarantine_size_kb %d, " + "max_redzone %d, poison_heap %d, malloc_context_size %d, " + "alloc_dealloc_mismatch %d, allocator_may_return_null %d, coverage %d, " + "coverage_dir %s, allocator_release_to_os_interval_ms %d\n", + allocator_options.quarantine_size_mb, + allocator_options.thread_local_quarantine_size_kb, + allocator_options.max_redzone, poison_heap, malloc_context_size, allocator_options.alloc_dealloc_mismatch, allocator_options.may_return_null, coverage, coverage_dir, allocator_options.release_to_os_interval_ms); @@ -109,6 +110,7 @@ void AsanDeactivate() { AllocatorOptions disabled = asan_deactivated_flags.allocator_options; disabled.quarantine_size_mb = 0; + disabled.thread_local_quarantine_size_kb = 0; disabled.min_redzone = 16; // Redzone must be at least 16 bytes long. disabled.max_redzone = 16; disabled.alloc_dealloc_mismatch = false; Modified: vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/asan/asan_activation_flags.inc Sat Jan 14 15:38:48 2017 (r312177) @@ -24,6 +24,7 @@ ASAN_ACTIVATION_FLAG(int, redzone) ASAN_ACTIVATION_FLAG(int, max_redzone) ASAN_ACTIVATION_FLAG(int, quarantine_size_mb) +ASAN_ACTIVATION_FLAG(int, thread_local_quarantine_size_kb) ASAN_ACTIVATION_FLAG(bool, alloc_dealloc_mismatch) ASAN_ACTIVATION_FLAG(bool, poison_heap) Modified: vendor/compiler-rt/dist/lib/asan/asan_allocator.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/asan/asan_allocator.cc Sat Jan 14 15:38:48 2017 (r312177) @@ -269,24 +269,24 @@ struct Allocator { } void RePoisonChunk(uptr chunk) { - // This could a user-facing chunk (with redzones), or some internal + // This could be a user-facing chunk (with redzones), or some internal // housekeeping chunk, like TransferBatch. Start by assuming the former. AsanChunk *ac = GetAsanChunk((void *)chunk); uptr allocated_size = allocator.GetActuallyAllocatedSize((void *)ac); uptr beg = ac->Beg(); uptr end = ac->Beg() + ac->UsedSize(true); uptr chunk_end = chunk + allocated_size; - if (chunk < beg && beg < end && end <= chunk_end) { - // Looks like a valid AsanChunk. Or maybe not. Be conservative and only - // poison the redzones. + if (chunk < beg && beg < end && end <= chunk_end && + ac->chunk_state == CHUNK_ALLOCATED) { + // Looks like a valid AsanChunk in use, poison redzones only. PoisonShadow(chunk, beg - chunk, kAsanHeapLeftRedzoneMagic); uptr end_aligned_down = RoundDownTo(end, SHADOW_GRANULARITY); FastPoisonShadowPartialRightRedzone( end_aligned_down, end - end_aligned_down, chunk_end - end_aligned_down, kAsanHeapLeftRedzoneMagic); } else { - // This can not be an AsanChunk. Poison everything. It may be reused as - // AsanChunk later. + // This is either not an AsanChunk or freed or quarantined AsanChunk. + // In either case, poison everything. PoisonShadow(chunk, allocated_size, kAsanHeapLeftRedzoneMagic); } } Modified: vendor/compiler-rt/dist/lib/asan/asan_flags.cc ============================================================================== --- vendor/compiler-rt/dist/lib/asan/asan_flags.cc Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/asan/asan_flags.cc Sat Jan 14 15:38:48 2017 (r312177) @@ -169,6 +169,11 @@ void InitializeFlags() { (ASAN_LOW_MEMORY) ? 1 << 6 : FIRST_32_SECOND_64(1 << 8, 1 << 10); f->thread_local_quarantine_size_kb = kDefaultThreadLocalQuarantineSizeKb; } + if (f->thread_local_quarantine_size_kb == 0 && f->quarantine_size_mb > 0) { + Report("%s: thread_local_quarantine_size_kb can be set to 0 only when " + "quarantine_size_mb is set to 0\n", SanitizerToolName); + Die(); + } if (!f->replace_str && common_flags()->intercept_strlen) { Report("WARNING: strlen interceptor is enabled even though replace_str=0. " "Use intercept_strlen=0 to disable it."); Modified: vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt Sat Jan 14 15:38:48 2017 (r312177) @@ -36,8 +36,8 @@ append_list_if(COMPILER_RT_HAS_WVARIADIC # This will ensure the target linker is used # during cross compilation -set(ASAN_UNITTEST_COMMON_LINKFLAGS - ${COMPILER_RT_UNITTEST_LINKFLAGS}) +set(ASAN_UNITTEST_COMMON_LINK_FLAGS + ${COMPILER_RT_UNITTEST_LINK_FLAGS}) # -gline-tables-only must be enough for ASan, so use it if possible. if(COMPILER_RT_TEST_COMPILER_ID MATCHES "Clang") @@ -48,7 +48,7 @@ endif() if(MSVC) list(APPEND ASAN_UNITTEST_COMMON_CFLAGS -gcodeview) endif() -list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS -g) +list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS -g) # Use -D instead of definitions to please custom compile command. list(APPEND ASAN_UNITTEST_COMMON_CFLAGS @@ -58,12 +58,12 @@ list(APPEND ASAN_UNITTEST_COMMON_CFLAGS if(APPLE) list(APPEND ASAN_UNITTEST_COMMON_CFLAGS ${DARWIN_osx_CFLAGS}) - list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS ${DARWIN_osx_LINKFLAGS}) + list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS ${DARWIN_osx_LINK_FLAGS}) - add_weak_symbols("asan" WEAK_SYMBOL_LINKFLAGS) - add_weak_symbols("ubsan" WEAK_SYMBOL_LINKFLAGS) - add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINKFLAGS) - list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS ${WEAK_SYMBOL_LINKFLAGS}) + add_weak_symbols("asan" WEAK_SYMBOL_LINK_FLAGS) + add_weak_symbols("ubsan" WEAK_SYMBOL_LINK_FLAGS) + add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINK_FLAGS) + list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}) endif() if(MSVC) @@ -82,41 +82,41 @@ if(CAN_TARGET_x86_64 OR CAN_TARGET_i386) endif() if(NOT MSVC) - list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS --driver-mode=g++) + list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS --driver-mode=g++) endif() # x86_64 FreeBSD 9.2 additionally requires libc++ to build the tests. if(CMAKE_SYSTEM MATCHES "FreeBSD-9.2-RELEASE") - list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS "-lc++") + list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS "-lc++") endif() # Unit tests on Mac depend on Foundation. if(APPLE) - list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS -framework Foundation) + list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS -framework Foundation) endif() if(ANDROID) - list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS -pie) + list(APPEND ASAN_UNITTEST_COMMON_LINK_FLAGS -pie) endif() -set(ASAN_UNITTEST_INSTRUMENTED_LINKFLAGS - ${ASAN_UNITTEST_COMMON_LINKFLAGS}) -list(APPEND ASAN_UNITTEST_INSTRUMENTED_LINKFLAGS -fsanitize=address) +set(ASAN_UNITTEST_INSTRUMENTED_LINK_FLAGS + ${ASAN_UNITTEST_COMMON_LINK_FLAGS}) +list(APPEND ASAN_UNITTEST_INSTRUMENTED_LINK_FLAGS -fsanitize=address) -set(ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINKFLAGS - ${ASAN_UNITTEST_INSTRUMENTED_LINKFLAGS} +set(ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINK_FLAGS + ${ASAN_UNITTEST_INSTRUMENTED_LINK_FLAGS} -shared-libasan) set(ASAN_UNITTEST_INSTRUMENTED_LIBS) # NDK r10 requires -latomic almost always. append_list_if(ANDROID atomic ASAN_UNITTEST_INSTRUMENTED_LIBS) -set(ASAN_UNITTEST_NOINST_LINKFLAGS ${ASAN_UNITTEST_COMMON_LINKFLAGS}) +set(ASAN_UNITTEST_NOINST_LINK_FLAGS ${ASAN_UNITTEST_COMMON_LINK_FLAGS}) if(NOT APPLE) - append_list_if(COMPILER_RT_HAS_LIBM -lm ASAN_UNITTEST_NOINST_LINKFLAGS) - append_list_if(COMPILER_RT_HAS_LIBDL -ldl ASAN_UNITTEST_NOINST_LINKFLAGS) - append_list_if(COMPILER_RT_HAS_LIBRT -lrt ASAN_UNITTEST_NOINST_LINKFLAGS) - append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread ASAN_UNITTEST_NOINST_LINKFLAGS) - append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINKFLAGS) + append_list_if(COMPILER_RT_HAS_LIBM -lm ASAN_UNITTEST_NOINST_LINK_FLAGS) + append_list_if(COMPILER_RT_HAS_LIBDL -ldl ASAN_UNITTEST_NOINST_LINK_FLAGS) + append_list_if(COMPILER_RT_HAS_LIBRT -lrt ASAN_UNITTEST_NOINST_LINK_FLAGS) + append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread ASAN_UNITTEST_NOINST_LINK_FLAGS) + append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINK_FLAGS) endif() # TODO(eugenis): move all -l flags above to _LIBS? @@ -148,7 +148,7 @@ endmacro() # Link ASan unit test for a given architecture from a set # of objects in with given linker flags. macro(add_asan_test test_suite test_name arch kind) - cmake_parse_arguments(TEST "WITH_TEST_RUNTIME" "" "OBJECTS;LINKFLAGS;SUBDIR" ${ARGN}) + cmake_parse_arguments(TEST "WITH_TEST_RUNTIME" "" "OBJECTS;LINK_FLAGS;SUBDIR" ${ARGN}) get_target_flags_for_arch(${arch} TARGET_LINK_FLAGS) set(TEST_DEPS ${TEST_OBJECTS}) if(NOT COMPILER_RT_STANDALONE_BUILD) @@ -172,7 +172,7 @@ macro(add_asan_test test_suite test_name SUBDIR ${TEST_SUBDIR} OBJECTS ${TEST_OBJECTS} DEPS ${TEST_DEPS} - LINK_FLAGS ${TEST_LINKFLAGS} + LINK_FLAGS ${TEST_LINK_FLAGS} ${TARGET_LINK_FLAGS}) endmacro() @@ -237,8 +237,8 @@ macro(add_asan_tests_for_arch_and_kind a endforeach() # Clang links the static CRT by default. Override that to use the dynamic # CRT. - set(ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINKFLAGS - ${ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINKFLAGS} + set(ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINK_FLAGS + ${ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINK_FLAGS} -Wl,-nodefaultlib:libcmt,-defaultlib:msvcrt,-defaultlib:oldnames) else() set(ASAN_INST_DYNAMIC_TEST_OBJECTS ${ASAN_INST_TEST_OBJECTS}) @@ -256,7 +256,7 @@ macro(add_asan_tests_for_arch_and_kind a add_asan_test(AsanUnitTests "Asan-${arch}${kind}-Test" ${arch} ${kind} SUBDIR "default" OBJECTS ${ASAN_INST_TEST_OBJECTS} - LINKFLAGS ${ASAN_UNITTEST_INSTRUMENTED_LINKFLAGS}) + LINK_FLAGS ${ASAN_UNITTEST_INSTRUMENTED_LINK_FLAGS}) if(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME) # Create the 'dynamic' folder where ASAN tests are produced. if(CMAKE_CONFIGURATION_TYPES) @@ -270,7 +270,7 @@ macro(add_asan_tests_for_arch_and_kind a add_asan_test(AsanDynamicUnitTests "Asan-${arch}${kind}-Dynamic-Test" ${arch} ${kind} SUBDIR "dynamic" OBJECTS ${ASAN_INST_DYNAMIC_TEST_OBJECTS} - LINKFLAGS ${ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINKFLAGS}) + LINK_FLAGS ${ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINK_FLAGS}) endif() # Add static ASan runtime that will be linked with uninstrumented tests. @@ -307,7 +307,7 @@ macro(add_asan_tests_for_arch_and_kind a add_asan_test(AsanUnitTests "Asan-${arch}${kind}-Noinst-Test" ${arch} ${kind} SUBDIR "default" OBJECTS ${ASAN_NOINST_TEST_OBJECTS} - LINKFLAGS ${ASAN_UNITTEST_NOINST_LINKFLAGS} + LINK_FLAGS ${ASAN_UNITTEST_NOINST_LINK_FLAGS} WITH_TEST_RUNTIME) # Benchmarks. @@ -319,7 +319,7 @@ macro(add_asan_tests_for_arch_and_kind a add_asan_test(AsanBenchmarks "Asan-${arch}${kind}-Benchmark" ${arch} ${kind} SUBDIR "default" OBJECTS ${ASAN_BENCHMARKS_OBJECTS} - LINKFLAGS ${ASAN_UNITTEST_INSTRUMENTED_LINKFLAGS}) + LINK_FLAGS ${ASAN_UNITTEST_INSTRUMENTED_LINK_FLAGS}) endmacro() if(COMPILER_RT_CAN_EXECUTE_TESTS AND NOT ANDROID) @@ -347,7 +347,7 @@ if(ANDROID) ${COMPILER_RT_GTEST_SOURCE} ${ASAN_NOINST_TEST_SOURCES}) set_target_compile_flags(AsanNoinstTest ${ASAN_UNITTEST_COMMON_CFLAGS}) - set_target_link_flags(AsanNoinstTest ${ASAN_UNITTEST_NOINST_LINKFLAGS}) + set_target_link_flags(AsanNoinstTest ${ASAN_UNITTEST_NOINST_LINK_FLAGS}) target_link_libraries(AsanNoinstTest ${ASAN_UNITTEST_NOINST_LIBS}) # Test with ASan instrumentation. Link with ASan dynamic runtime. @@ -355,7 +355,7 @@ if(ANDROID) ${COMPILER_RT_GTEST_SOURCE} ${ASAN_INST_TEST_SOURCES}) set_target_compile_flags(AsanTest ${ASAN_UNITTEST_INSTRUMENTED_CFLAGS}) - set_target_link_flags(AsanTest ${ASAN_UNITTEST_INSTRUMENTED_LINKFLAGS}) + set_target_link_flags(AsanTest ${ASAN_UNITTEST_INSTRUMENTED_LINK_FLAGS}) target_link_libraries(AsanTest ${ASAN_UNITTEST_INSTRUMENTED_LIBS}) # Setup correct output directory and link flags. Modified: vendor/compiler-rt/dist/lib/builtins/arm/adddf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/adddf3vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/adddf3vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -18,10 +18,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__adddf3vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vadd.f64 d0, d0, d1 +#else vmov d6, r0, r1 // move first param from r0/r1 pair into d6 vmov d7, r2, r3 // move second param from r2/r3 pair into d7 vadd.f64 d6, d6, d7 vmov r0, r1, d6 // move result back to r0/r1 pair +#endif bx lr END_COMPILERRT_FUNCTION(__adddf3vfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/addsf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/addsf3vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/addsf3vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -18,10 +18,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__addsf3vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vadd.f32 s0, s0, s1 +#else vmov s14, r0 // move first param from r0 into float register vmov s15, r1 // move second param from r1 into float register vadd.f32 s14, s14, s15 vmov r0, s14 // move result back to r0 +#endif bx lr END_COMPILERRT_FUNCTION(__addsf3vfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S Sat Jan 14 15:38:48 2017 (r312177) @@ -43,8 +43,14 @@ .thumb #endif -.p2align 2 +@ int __eqsf2(float a, float b) + + .p2align 2 DEFINE_COMPILERRT_FUNCTION(__eqsf2) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmov r0, s0 + vmov r1, s1 +#endif // Make copies of a and b with the sign bit shifted off the top. These will // be used to detect zeros and NaNs. #if __ARM_ARCH_ISA_THUMB == 1 @@ -166,16 +172,23 @@ LOCAL_LABEL(CHECK_NAN): JMP(lr) #endif END_COMPILERRT_FUNCTION(__eqsf2) + DEFINE_COMPILERRT_FUNCTION_ALIAS(__lesf2, __eqsf2) DEFINE_COMPILERRT_FUNCTION_ALIAS(__ltsf2, __eqsf2) DEFINE_COMPILERRT_FUNCTION_ALIAS(__nesf2, __eqsf2) -.p2align 2 +@ int __gtsf2(float a, float b) + + .p2align 2 DEFINE_COMPILERRT_FUNCTION(__gtsf2) // Identical to the preceding except in that we return -1 for NaN values. // Given that the two paths share so much code, one might be tempted to // unify them; however, the extra code needed to do so makes the code size // to performance tradeoff very hard to justify for such small functions. +#if defined(COMPILER_RT_ARMHF_TARGET) + vmov r0, s0 + vmov r1, s1 +#endif #if __ARM_ARCH_ISA_THUMB == 1 push {r6, lr} lsls r2, r0, #1 @@ -215,6 +228,8 @@ LOCAL_LABEL(CHECK_NAN_2): 6: pop {r6, pc} #else + mov r2, r0, lsl #1 + mov r3, r1, lsl #1 orrs r12, r2, r3, lsr #1 it ne eorsne r12, r0, r1 @@ -233,10 +248,17 @@ LOCAL_LABEL(CHECK_NAN_2): JMP(lr) #endif END_COMPILERRT_FUNCTION(__gtsf2) + DEFINE_COMPILERRT_FUNCTION_ALIAS(__gesf2, __gtsf2) -.p2align 2 +@ int __unordsf2(float a, float b) + + .p2align 2 DEFINE_COMPILERRT_FUNCTION(__unordsf2) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmov r0, s0 + vmov r1, s1 +#endif // Return 1 for NaN values, 0 otherwise. lsls r2, r0, #1 lsls r3, r1, #1 @@ -260,7 +282,15 @@ DEFINE_COMPILERRT_FUNCTION(__unordsf2) JMP(lr) END_COMPILERRT_FUNCTION(__unordsf2) +#if defined(COMPILER_RT_ARMHF_TARGET) +DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmpum): + vmov s0, r0 + vmov s1, r1 + b SYMBOL_NAME(__unordsf2) +END_COMPILERRT_FUNCTION(__aeabi_fcmpum) +#else DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_fcmpun, __unordsf2) +#endif NO_EXEC_STACK_DIRECTIVE Modified: vendor/compiler-rt/dist/lib/builtins/arm/divdf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/divdf3vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/divdf3vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -18,10 +18,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__divdf3vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vdiv.f64 d0, d0, d1 +#else vmov d6, r0, r1 // move first param from r0/r1 pair into d6 vmov d7, r2, r3 // move second param from r2/r3 pair into d7 - vdiv.f64 d5, d6, d7 + vdiv.f64 d5, d6, d7 vmov r0, r1, d5 // move result back to r0/r1 pair +#endif bx lr END_COMPILERRT_FUNCTION(__divdf3vfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/divsf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/divsf3vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/divsf3vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -18,10 +18,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__divsf3vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vdiv.f32 s0, s0, s1 +#else vmov s14, r0 // move first param from r0 into float register vmov s15, r1 // move second param from r1 into float register vdiv.f32 s13, s14, s15 vmov r0, s13 // move result back to r0 +#endif bx lr END_COMPILERRT_FUNCTION(__divsf3vfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/eqdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/eqdf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/eqdf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__eqdf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f64 d0, d1 +#else vmov d6, r0, r1 // load r0/r1 pair in double register vmov d7, r2, r3 // load r2/r3 pair in double register vcmp.f64 d6, d7 +#endif vmrs apsr_nzcv, fpscr moveq r0, #1 // set result register to 1 if equal movne r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/eqsf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/eqsf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/eqsf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__eqsf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f32 s0, s1 +#else vmov s14, r0 // move from GPR 0 to float register vmov s15, r1 // move from GPR 1 to float register vcmp.f32 s14, s15 +#endif vmrs apsr_nzcv, fpscr moveq r0, #1 // set result register to 1 if equal movne r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/extendsfdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/extendsfdf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/extendsfdf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__extendsfdf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcvt.f64.f32 d0, s0 +#else vmov s15, r0 // load float register from R0 vcvt.f64.f32 d7, s15 // convert single to double vmov r0, r1, d7 // return result in r0/r1 pair +#endif bx lr END_COMPILERRT_FUNCTION(__extendsfdf2vfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/fixdfsivfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/fixdfsivfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/fixdfsivfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__fixdfsivfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcvt.s32.f64 s0, d0 + vmov r0, s0 +#else vmov d7, r0, r1 // load double register from R0/R1 vcvt.s32.f64 s15, d7 // convert double to 32-bit int into s15 vmov r0, s15 // move s15 to result register +#endif bx lr END_COMPILERRT_FUNCTION(__fixdfsivfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/fixsfsivfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/fixsfsivfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/fixsfsivfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__fixsfsivfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcvt.s32.f32 s0, s0 + vmov r0, s0 +#else vmov s15, r0 // load float register from R0 vcvt.s32.f32 s15, s15 // convert single to 32-bit int into s15 vmov r0, s15 // move s15 to result register +#endif bx lr END_COMPILERRT_FUNCTION(__fixsfsivfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/fixunsdfsivfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/fixunsdfsivfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/fixunsdfsivfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -20,9 +20,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__fixunsdfsivfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcvt.u32.f64 s0, d0 + vmov r0, s0 +#else vmov d7, r0, r1 // load double register from R0/R1 vcvt.u32.f64 s15, d7 // convert double to 32-bit int into s15 vmov r0, s15 // move s15 to result register +#endif bx lr END_COMPILERRT_FUNCTION(__fixunsdfsivfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/fixunssfsivfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/fixunssfsivfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/fixunssfsivfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -20,9 +20,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__fixunssfsivfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcvt.u32.f32 s0, s0 + vmov r0, s0 +#else vmov s15, r0 // load float register from R0 vcvt.u32.f32 s15, s15 // convert single to 32-bit unsigned into s15 vmov r0, s15 // move s15 to result register +#endif bx lr END_COMPILERRT_FUNCTION(__fixunssfsivfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/floatsidfvfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/floatsidfvfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/floatsidfvfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__floatsidfvfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmov s0, r0 + vcvt.f64.s32 d0, s0 +#else vmov s15, r0 // move int to float register s15 vcvt.f64.s32 d7, s15 // convert 32-bit int in s15 to double in d7 vmov r0, r1, d7 // move d7 to result register pair r0/r1 +#endif bx lr END_COMPILERRT_FUNCTION(__floatsidfvfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/floatsisfvfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/floatsisfvfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/floatsisfvfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__floatsisfvfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmov s0, r0 + vcvt.f32.s32 s0, s0 +#else vmov s15, r0 // move int to float register s15 vcvt.f32.s32 s15, s15 // convert 32-bit int in s15 to float in s15 vmov r0, s15 // move s15 to result register +#endif bx lr END_COMPILERRT_FUNCTION(__floatsisfvfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/floatunssidfvfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/floatunssidfvfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/floatunssidfvfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__floatunssidfvfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmov s0, r0 + vcvt.f64.u32 d0, s0 +#else vmov s15, r0 // move int to float register s15 vcvt.f64.u32 d7, s15 // convert 32-bit int in s15 to double in d7 vmov r0, r1, d7 // move d7 to result register pair r0/r1 +#endif bx lr END_COMPILERRT_FUNCTION(__floatunssidfvfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/floatunssisfvfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/floatunssisfvfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/floatunssisfvfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__floatunssisfvfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmov s0, r0 + vcvt.f32.u32 s0, s0 +#else vmov s15, r0 // move int to float register s15 vcvt.f32.u32 s15, s15 // convert 32-bit int in s15 to float in s15 vmov r0, s15 // move s15 to result register +#endif bx lr END_COMPILERRT_FUNCTION(__floatunssisfvfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/gedf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/gedf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/gedf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__gedf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f64 d0, d1 +#else vmov d6, r0, r1 // load r0/r1 pair in double register vmov d7, r2, r3 // load r2/r3 pair in double register vcmp.f64 d6, d7 +#endif vmrs apsr_nzcv, fpscr movge r0, #1 // set result register to 1 if greater than or equal movlt r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/gesf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/gesf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/gesf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__gesf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f32 s0, s1 +#else vmov s14, r0 // move from GPR 0 to float register vmov s15, r1 // move from GPR 1 to float register vcmp.f32 s14, s15 +#endif vmrs apsr_nzcv, fpscr movge r0, #1 // set result register to 1 if greater than or equal movlt r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/gtdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/gtdf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/gtdf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__gtdf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f64 d0, d1 +#else vmov d6, r0, r1 // load r0/r1 pair in double register vmov d7, r2, r3 // load r2/r3 pair in double register vcmp.f64 d6, d7 +#endif vmrs apsr_nzcv, fpscr movgt r0, #1 // set result register to 1 if equal movle r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/gtsf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/gtsf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/gtsf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__gtsf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f32 s0, s1 +#else vmov s14, r0 // move from GPR 0 to float register vmov s15, r1 // move from GPR 1 to float register vcmp.f32 s14, s15 +#endif vmrs apsr_nzcv, fpscr movgt r0, #1 // set result register to 1 if equal movle r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/ledf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/ledf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/ledf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__ledf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f64 d0, d1 +#else vmov d6, r0, r1 // load r0/r1 pair in double register vmov d7, r2, r3 // load r2/r3 pair in double register vcmp.f64 d6, d7 +#endif vmrs apsr_nzcv, fpscr movls r0, #1 // set result register to 1 if equal movhi r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/lesf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/lesf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/lesf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__lesf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f32 s0, s1 +#else vmov s14, r0 // move from GPR 0 to float register vmov s15, r1 // move from GPR 1 to float register vcmp.f32 s14, s15 +#endif vmrs apsr_nzcv, fpscr movls r0, #1 // set result register to 1 if equal movhi r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/ltdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/ltdf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/ltdf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__ltdf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f64 d0, d1 +#else vmov d6, r0, r1 // load r0/r1 pair in double register vmov d7, r2, r3 // load r2/r3 pair in double register vcmp.f64 d6, d7 +#endif vmrs apsr_nzcv, fpscr movmi r0, #1 // set result register to 1 if equal movpl r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/ltsf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/ltsf2vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/ltsf2vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -19,9 +19,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__ltsf2vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vcmp.f32 s0, s1 +#else vmov s14, r0 // move from GPR 0 to float register vmov s15, r1 // move from GPR 1 to float register vcmp.f32 s14, s15 +#endif vmrs apsr_nzcv, fpscr movmi r0, #1 // set result register to 1 if equal movpl r0, #0 Modified: vendor/compiler-rt/dist/lib/builtins/arm/muldf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/muldf3vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/muldf3vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -18,10 +18,14 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__muldf3vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmul.f64 d0, d0, d1 +#else vmov d6, r0, r1 // move first param from r0/r1 pair into d6 vmov d7, r2, r3 // move second param from r2/r3 pair into d7 - vmul.f64 d6, d6, d7 + vmul.f64 d6, d6, d7 vmov r0, r1, d6 // move result back to r0/r1 pair +#endif bx lr END_COMPILERRT_FUNCTION(__muldf3vfp) Modified: vendor/compiler-rt/dist/lib/builtins/arm/mulsf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/mulsf3vfp.S Sat Jan 14 15:38:39 2017 (r312176) +++ vendor/compiler-rt/dist/lib/builtins/arm/mulsf3vfp.S Sat Jan 14 15:38:48 2017 (r312177) @@ -18,9 +18,13 @@ .syntax unified .p2align 2 DEFINE_COMPILERRT_FUNCTION(__mulsf3vfp) +#if defined(COMPILER_RT_ARMHF_TARGET) + vmul.f32 s0, s0, s1 +#else *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:38:57 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4976CAFB66; Sat, 14 Jan 2017 15:38:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58C861A49; Sat, 14 Jan 2017 15:38:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFcuwu026920; Sat, 14 Jan 2017 15:38:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFcujj026919; Sat, 14 Jan 2017 15:38:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141538.v0EFcujj026919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312178 - vendor/compiler-rt/compiler-rt-release_40-r292009 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:38:57 -0000 Author: dim Date: Sat Jan 14 15:38:56 2017 New Revision: 312178 URL: https://svnweb.freebsd.org/changeset/base/312178 Log: Tag compiler-rt release_40 branch r292009. Added: vendor/compiler-rt/compiler-rt-release_40-r292009/ - copied from r312177, vendor/compiler-rt/dist/ From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:39:17 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F422CAFC07; Sat, 14 Jan 2017 15:39:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0ADB81C68; Sat, 14 Jan 2017 15:39:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFdG5H027107; Sat, 14 Jan 2017 15:39:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFdEKU026985; Sat, 14 Jan 2017 15:39:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141539.v0EFdEKU026985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312179 - in vendor/libc++/dist: . cmake/Modules include include/experimental src test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char test/std/stri... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:39:17 -0000 Author: dim Date: Sat Jan 14 15:39:13 2017 New Revision: 312179 URL: https://svnweb.freebsd.org/changeset/base/312179 Log: Vendor import of libc++ release_40 branch r292009: https://llvm.org/svn/llvm-project/libcxx/branches/release_40@292009 Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/cmake/Modules/HandleOutOfTreeLLVM.cmake vendor/libc++/dist/include/__config vendor/libc++/dist/include/__mutex_base vendor/libc++/dist/include/__string vendor/libc++/dist/include/__threading_support vendor/libc++/dist/include/experimental/string_view vendor/libc++/dist/include/ios vendor/libc++/dist/include/memory vendor/libc++/dist/include/mutex vendor/libc++/dist/src/chrono.cpp vendor/libc++/dist/src/new.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/find.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/length.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/find.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/find.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/length.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/assign2.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/compare.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/find.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/length.pass.cpp vendor/libc++/dist/test/std/thread/futures/futures.shared_future/dtor.pass.cpp vendor/libc++/dist/test/std/thread/futures/futures.unique_future/dtor.pass.cpp Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/CMakeLists.txt Sat Jan 14 15:39:13 2017 (r312179) @@ -24,7 +24,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR project(libcxx CXX C) set(PACKAGE_NAME libcxx) - set(PACKAGE_VERSION 4.0.0svn) + set(PACKAGE_VERSION 4.0.0) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") Modified: vendor/libc++/dist/cmake/Modules/HandleOutOfTreeLLVM.cmake ============================================================================== --- vendor/libc++/dist/cmake/Modules/HandleOutOfTreeLLVM.cmake Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/cmake/Modules/HandleOutOfTreeLLVM.cmake Sat Jan 14 15:39:13 2017 (r312179) @@ -38,7 +38,18 @@ macro(find_llvm_parts) set(LLVM_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include") set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") - set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") + + # --cmakedir is supported since llvm r291218 (4.0 release) + execute_process( + COMMAND ${LLVM_CONFIG_PATH} --cmakedir + RESULT_VARIABLE HAD_ERROR + OUTPUT_VARIABLE CONFIG_OUTPUT) + if(NOT HAD_ERROR) + string(STRIP "${CONFIG_OUTPUT}" LLVM_CMAKE_PATH) + else() + set(LLVM_CMAKE_PATH + "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") + endif() else() set(LLVM_FOUND OFF) message(WARNING "UNSUPPORTED LIBCXX CONFIGURATION DETECTED: " Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/include/__config Sat Jan 14 15:39:13 2017 (r312179) @@ -396,6 +396,15 @@ namespace std { #define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow"))) #endif +// A constexpr version of __builtin_memcmp was added in clang 4.0 +#if __has_builtin(__builtin_memcmp) +# ifdef __apple_build_version__ +// No shipping version of Apple's clang has constexpr __builtin_memcmp +# elif __clang_major__ > 3 +# define _LIBCPP_BUILTIN_MEMCMP_ISCONSTEXPR +# endif +#endif + #elif defined(_LIBCPP_COMPILER_GCC) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -763,7 +772,7 @@ template struct __static_asse #define _NOALIAS #endif -#if __has_extension(cxx_explicit_conversions) || defined(__IBMCPP__) || \ +#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) || \ (!defined(_LIBCPP_CXX03_LANG) && defined(__GNUC__)) // All supported GCC versions # define _LIBCPP_EXPLICIT explicit #else Modified: vendor/libc++/dist/include/__mutex_base ============================================================================== --- vendor/libc++/dist/include/__mutex_base Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/include/__mutex_base Sat Jan 14 15:39:13 2017 (r312179) @@ -410,8 +410,8 @@ condition_variable::wait_for(unique_lock typedef time_point > __sys_tpf; typedef time_point __sys_tpi; __sys_tpf _Max = __sys_tpi::max(); - system_clock::time_point __s_now = system_clock::now(); steady_clock::time_point __c_now = steady_clock::now(); + system_clock::time_point __s_now = system_clock::now(); if (_Max - __d > __s_now) __do_timed_wait(__lk, __s_now + __ceil(__d)); else Modified: vendor/libc++/dist/include/__string ============================================================================== --- vendor/libc++/dist/include/__string Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/include/__string Sat Jan 14 15:39:13 2017 (r312179) @@ -26,13 +26,14 @@ struct char_traits typedef streampos pos_type; typedef mbstate_t state_type; - static void assign(char_type& c1, const char_type& c2) noexcept; + static constexpr void assign(char_type& c1, const char_type& c2) noexcept; static constexpr bool eq(char_type c1, char_type c2) noexcept; static constexpr bool lt(char_type c1, char_type c2) noexcept; - static int compare(const char_type* s1, const char_type* s2, size_t n); - static size_t length(const char_type* s); - static const char_type* find(const char_type* s, size_t n, const char_type& a); + static constexpr int compare(const char_type* s1, const char_type* s2, size_t n); + static constexpr size_t length(const char_type* s); + static constexpr const char_type* + find(const char_type* s, size_t n, const char_type& a); static char_type* move(char_type* s1, const char_type* s2, size_t n); static char_type* copy(char_type* s1, const char_type* s2, size_t n); static char_type* assign(char_type* s, size_t n, char_type a); @@ -77,18 +78,19 @@ struct _LIBCPP_TEMPLATE_VIS char_traits typedef streampos pos_type; typedef mbstate_t state_type; - static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT - {__c1 = __c2;} + static inline void _LIBCPP_CONSTEXPR_AFTER_CXX14 + assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;} static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 == __c2;} static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 < __c2;} - static int compare(const char_type* __s1, const char_type* __s2, size_t __n); - _LIBCPP_INLINE_VISIBILITY - static size_t length(const char_type* __s); - _LIBCPP_INLINE_VISIBILITY - static const char_type* find(const char_type* __s, size_t __n, const char_type& __a); + static _LIBCPP_CONSTEXPR_AFTER_CXX14 + int compare(const char_type* __s1, const char_type* __s2, size_t __n); + _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14 + size_t length(const char_type* __s); + _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14 + const char_type* find(const char_type* __s, size_t __n, const char_type& __a); static char_type* move(char_type* __s1, const char_type* __s2, size_t __n); _LIBCPP_INLINE_VISIBILITY static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n); @@ -108,7 +110,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits }; template -int +_LIBCPP_CONSTEXPR_AFTER_CXX14 int char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (; __n; --__n, ++__s1, ++__s2) @@ -123,7 +125,7 @@ char_traits<_CharT>::compare(const char_ template inline -size_t +_LIBCPP_CONSTEXPR_AFTER_CXX14 size_t char_traits<_CharT>::length(const char_type* __s) { size_t __len = 0; @@ -134,7 +136,7 @@ char_traits<_CharT>::length(const char_t template inline -const _CharT* +_LIBCPP_CONSTEXPR_AFTER_CXX14 const _CharT* char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a) { for (; __n; --__n) @@ -200,18 +202,19 @@ struct _LIBCPP_TEMPLATE_VIS char_traits< typedef streampos pos_type; typedef mbstate_t state_type; - static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT - {__c1 = __c2;} + static inline _LIBCPP_CONSTEXPR_AFTER_CXX14 + void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;} static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 == __c2;} static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT {return (unsigned char)__c1 < (unsigned char)__c2;} - static inline int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT - {return __n == 0 ? 0 : memcmp(__s1, __s2, __n);} - static inline size_t length(const char_type* __s) _NOEXCEPT {return strlen(__s);} - static inline const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT - {return __n == 0 ? NULL : (const char_type*) memchr(__s, to_int_type(__a), __n);} + static _LIBCPP_CONSTEXPR_AFTER_CXX14 + int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; + static inline size_t _LIBCPP_CONSTEXPR_AFTER_CXX14 + length(const char_type* __s) _NOEXCEPT {return __builtin_strlen(__s);} + static _LIBCPP_CONSTEXPR_AFTER_CXX14 + const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; static inline char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {return __n == 0 ? __s1 : (char_type*) memmove(__s1, __s2, __n);} static inline char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT @@ -234,6 +237,48 @@ struct _LIBCPP_TEMPLATE_VIS char_traits< {return int_type(EOF);} }; +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 +int +char_traits::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT +{ + if (__n == 0) + return 0; +#ifdef _LIBCPP_BUILTIN_MEMCMP_ISCONSTEXPR + return __builtin_memcmp(__s1, __s2, __n); +#elif _LIBCPP_STD_VER <= 14 + return memcmp(__s1, __s2, __n); +#else + for (; __n; --__n, ++__s1, ++__s2) + { + if (lt(*__s1, *__s2)) + return -1; + if (lt(*__s2, *__s1)) + return 1; + } + return 0; +#endif +} + +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 +const char* +char_traits::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT +{ + if (__n == 0) + return NULL; +#if _LIBCPP_STD_VER <= 14 + return (const char_type*) memchr(__s, to_int_type(__a), __n); +#else + for (; __n; --__n) + { + if (eq(*__s, __a)) + return __s; + ++__s; + } + return NULL; +#endif +} + + // char_traits template <> @@ -245,19 +290,19 @@ struct _LIBCPP_TEMPLATE_VIS char_traits< typedef streampos pos_type; typedef mbstate_t state_type; - static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT - {__c1 = __c2;} + static inline _LIBCPP_CONSTEXPR_AFTER_CXX14 + void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;} static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 == __c2;} static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 < __c2;} - static inline int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT - {return __n == 0 ? 0 : wmemcmp(__s1, __s2, __n);} - static inline size_t length(const char_type* __s) _NOEXCEPT - {return wcslen(__s);} - static inline const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT - {return __n == 0 ? NULL : (const char_type*)wmemchr(__s, __a, __n);} + static _LIBCPP_CONSTEXPR_AFTER_CXX14 + int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; + static _LIBCPP_CONSTEXPR_AFTER_CXX14 + size_t length(const char_type* __s) _NOEXCEPT; + static _LIBCPP_CONSTEXPR_AFTER_CXX14 + const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; static inline char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {return __n == 0 ? __s1 : (char_type*)wmemmove(__s1, __s2, __n);} static inline char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT @@ -280,6 +325,66 @@ struct _LIBCPP_TEMPLATE_VIS char_traits< {return int_type(WEOF);} }; +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 +int +char_traits::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT +{ + if (__n == 0) + return 0; +#if __has_builtin(__builtin_wmemcmp) + return __builtin_wmemcmp(__s1, __s2, __n); +#elif _LIBCPP_STD_VER <= 14 + return wmemcmp(__s1, __s2, __n); +#else + for (; __n; --__n, ++__s1, ++__s2) + { + if (lt(*__s1, *__s2)) + return -1; + if (lt(*__s2, *__s1)) + return 1; + } + return 0; +#endif +} + +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 +size_t +char_traits::length(const char_type* __s) _NOEXCEPT +{ +#if __has_builtin(__builtin_wcslen) + return __builtin_wcslen(__s); +#elif _LIBCPP_STD_VER <= 14 + return wcslen(__s); +#else + size_t __len = 0; + for (; !eq(*__s, char_type(0)); ++__s) + ++__len; + return __len; +#endif +} + +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 +const wchar_t* +char_traits::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT +{ + if (__n == 0) + return NULL; +#if __has_builtin(__builtin_wmemchr) + return __builtin_wmemchr(__s, __a, __n); +#elif _LIBCPP_STD_VER <= 14 + return wmemchr(__s, __a, __n); +#else + for (; __n; --__n) + { + if (eq(*__s, __a)) + return __s; + ++__s; + } + return NULL; +#endif +} + + #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS template <> @@ -291,19 +396,19 @@ struct _LIBCPP_TEMPLATE_VIS char_traits< typedef u16streampos pos_type; typedef mbstate_t state_type; - static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT - {__c1 = __c2;} + static inline _LIBCPP_CONSTEXPR_AFTER_CXX14 + void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;} static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 == __c2;} static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 < __c2;} - _LIBCPP_INLINE_VISIBILITY - static int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY - static size_t length(const char_type* __s) _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY - static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; + _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14 + int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; + _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14 + size_t length(const char_type* __s) _NOEXCEPT; + _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14 + const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY @@ -323,7 +428,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits< {return int_type(0xFFFF);} }; -inline +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 int char_traits::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT { @@ -337,7 +442,7 @@ char_traits::compare(const cha return 0; } -inline +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 size_t char_traits::length(const char_type* __s) _NOEXCEPT { @@ -347,7 +452,7 @@ char_traits::length(const char return __len; } -inline +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 const char16_t* char_traits::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT { @@ -410,19 +515,19 @@ struct _LIBCPP_TEMPLATE_VIS char_traits< typedef u32streampos pos_type; typedef mbstate_t state_type; - static inline void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT - {__c1 = __c2;} + static inline _LIBCPP_CONSTEXPR_AFTER_CXX14 + void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;} static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 == __c2;} static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT {return __c1 < __c2;} - _LIBCPP_INLINE_VISIBILITY - static int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY - static size_t length(const char_type* __s) _NOEXCEPT; - _LIBCPP_INLINE_VISIBILITY - static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; + _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14 + int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; + _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14 + size_t length(const char_type* __s) _NOEXCEPT; + _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14 + const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY @@ -442,7 +547,7 @@ struct _LIBCPP_TEMPLATE_VIS char_traits< {return int_type(0xFFFFFFFF);} }; -inline +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 int char_traits::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT { @@ -456,7 +561,7 @@ char_traits::compare(const cha return 0; } -inline +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 size_t char_traits::length(const char_type* __s) _NOEXCEPT { @@ -466,7 +571,7 @@ char_traits::length(const char return __len; } -inline +inline _LIBCPP_CONSTEXPR_AFTER_CXX14 const char32_t* char_traits::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT { Modified: vendor/libc++/dist/include/__threading_support ============================================================================== --- vendor/libc++/dist/include/__threading_support Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/include/__threading_support Sat Jan 14 15:39:13 2017 (r312179) @@ -385,7 +385,7 @@ int __libcpp_recursive_mutex_unlock(__li int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m) { - static_cast(__m); + DeleteCriticalSection(__m); return 0; } Modified: vendor/libc++/dist/include/experimental/string_view ============================================================================== --- vendor/libc++/dist/include/experimental/string_view Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/include/experimental/string_view Sat Jan 14 15:39:13 2017 (r312179) @@ -340,12 +340,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS // [string.view.ops], string operations: template _LIBCPP_INLINE_VISIBILITY - // Clang's extended C++11 explict conversions don't work with - // string_view in C++03. -#ifndef _LIBCPP_CXX03_LANG - _LIBCPP_EXPLICIT -#endif - operator basic_string<_CharT, _Traits, _Allocator>() const + _LIBCPP_EXPLICIT operator basic_string<_CharT, _Traits, _Allocator>() const { return basic_string<_CharT, _Traits, _Allocator>( begin(), end()); } template > Modified: vendor/libc++/dist/include/ios ============================================================================== --- vendor/libc++/dist/include/ios Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/include/ios Sat Jan 14 15:39:13 2017 (r312179) @@ -572,6 +572,13 @@ ios_base::exceptions(iostate __iostate) clear(__rdstate_); } +#if defined(_LIBCPP_CXX03_LANG) +struct _LIBCPP_TYPE_VIS __cxx03_bool { + typedef void (__cxx03_bool::*__bool_type)(); + void __true_value() {} +}; +#endif + template class _LIBCPP_TEMPLATE_VIS basic_ios : public ios_base @@ -585,8 +592,15 @@ public: typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; +#if defined(_LIBCPP_CXX03_LANG) + _LIBCPP_ALWAYS_INLINE + operator __cxx03_bool::__bool_type() const { + return !fail() ? &__cxx03_bool::__true_value : nullptr; + } +#else _LIBCPP_ALWAYS_INLINE _LIBCPP_EXPLICIT operator bool() const {return !fail();} +#endif _LIBCPP_ALWAYS_INLINE bool operator!() const {return fail();} _LIBCPP_ALWAYS_INLINE iostate rdstate() const {return ios_base::rdstate();} Modified: vendor/libc++/dist/include/memory ============================================================================== --- vendor/libc++/dist/include/memory Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/include/memory Sat Jan 14 15:39:13 2017 (r312179) @@ -3884,6 +3884,7 @@ class _LIBCPP_TEMPLATE_VIS shared_ptr { public: typedef _Tp element_type; + #if _LIBCPP_STD_VER > 14 typedef weak_ptr<_Tp> weak_type; #endif @@ -3914,17 +3915,17 @@ public: template _LIBCPP_INLINE_VISIBILITY shared_ptr(const shared_ptr<_Yp>& __r, - typename enable_if::value, __nat>::type = __nat()) + typename enable_if::value, __nat>::type = __nat()) _NOEXCEPT; #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY shared_ptr(shared_ptr&& __r) _NOEXCEPT; template _LIBCPP_INLINE_VISIBILITY shared_ptr(shared_ptr<_Yp>&& __r, - typename enable_if::value, __nat>::type = __nat()) + typename enable_if::value, __nat>::type = __nat()) _NOEXCEPT; #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES template explicit shared_ptr(const weak_ptr<_Yp>& __r, - typename enable_if::value, __nat>::type= __nat()); + typename enable_if::value, __nat>::type= __nat()); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template shared_ptr(auto_ptr<_Yp>&& __r, @@ -4316,7 +4317,7 @@ template template inline shared_ptr<_Tp>::shared_ptr(const shared_ptr<_Yp>& __r, - typename enable_if::value, __nat>::type) + typename enable_if::value, __nat>::type) _NOEXCEPT : __ptr_(__r.__ptr_), __cntrl_(__r.__cntrl_) @@ -4341,7 +4342,7 @@ template template inline shared_ptr<_Tp>::shared_ptr(shared_ptr<_Yp>&& __r, - typename enable_if::value, __nat>::type) + typename enable_if::value, __nat>::type) _NOEXCEPT : __ptr_(__r.__ptr_), __cntrl_(__r.__cntrl_) @@ -4639,7 +4640,7 @@ template inline typename enable_if < - is_convertible<_Yp*, _Tp*>::value, + is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value, shared_ptr<_Tp>& >::type shared_ptr<_Tp>::operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT @@ -4664,7 +4665,7 @@ template inline typename enable_if < - is_convertible<_Yp*, _Tp*>::value, + is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value, shared_ptr<_Tp>& >::type shared_ptr<_Tp>::operator=(shared_ptr<_Yp>&& __r) @@ -4679,7 +4680,7 @@ inline typename enable_if < !is_array<_Yp>::value && - is_convertible<_Yp*, _Tp*>::value, + is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value, shared_ptr<_Tp> >::type& shared_ptr<_Tp>::operator=(auto_ptr<_Yp>&& __r) @@ -4694,7 +4695,8 @@ inline typename enable_if < !is_array<_Yp>::value && - is_convertible::pointer, _Tp*>::value, + is_convertible::pointer, + typename shared_ptr<_Tp>::element_type*>::value, shared_ptr<_Tp>& >::type shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp>&& __r) @@ -4711,7 +4713,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if < !is_array<_Yp>::value && - is_convertible<_Yp*, _Tp*>::value, + is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value, shared_ptr<_Tp>& >::type shared_ptr<_Tp>::operator=(auto_ptr<_Yp> __r) @@ -4726,7 +4728,8 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if < !is_array<_Yp>::value && - is_convertible::pointer, _Tp*>::value, + is_convertible::pointer, + typename shared_ptr<_Tp>::element_type*>::value, shared_ptr<_Tp>& >::type shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp> __r) @@ -4759,7 +4762,7 @@ template inline typename enable_if < - is_convertible<_Yp*, _Tp*>::value, + is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value, void >::type shared_ptr<_Tp>::reset(_Yp* __p) @@ -4772,7 +4775,7 @@ template inline typename enable_if < - is_convertible<_Yp*, _Tp*>::value, + is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value, void >::type shared_ptr<_Tp>::reset(_Yp* __p, _Dp __d) @@ -4785,7 +4788,7 @@ template::value, + is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value, void >::type shared_ptr<_Tp>::reset(_Yp* __p, _Dp __d, _Alloc __a) @@ -5350,7 +5353,7 @@ weak_ptr<_Tp>::reset() _NOEXCEPT template template shared_ptr<_Tp>::shared_ptr(const weak_ptr<_Yp>& __r, - typename enable_if::value, __nat>::type) + typename enable_if::value, __nat>::type) : __ptr_(__r.__ptr_), __cntrl_(__r.__cntrl_ ? __r.__cntrl_->lock() : __r.__cntrl_) { Modified: vendor/libc++/dist/include/mutex ============================================================================== --- vendor/libc++/dist/include/mutex Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/include/mutex Sat Jan 14 15:39:13 2017 (r312179) @@ -559,6 +559,7 @@ public: #endif template +inline _LIBCPP_INLINE_VISIBILITY void __call_once_proxy(void* __vp) { Modified: vendor/libc++/dist/src/chrono.cpp ============================================================================== --- vendor/libc++/dist/src/chrono.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/src/chrono.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -42,7 +42,7 @@ #include #endif #else -#if !defined(CLOCK_REALTIME) +#if !defined(CLOCK_REALTIME) || !defined(_LIBCXX_USE_CLOCK_GETTIME) #include // for gettimeofday and timeval #endif // !defined(CLOCK_REALTIME) #endif // defined(_LIBCPP_WIN32API) Modified: vendor/libc++/dist/src/new.cpp ============================================================================== --- vendor/libc++/dist/src/new.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/src/new.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -198,7 +198,11 @@ void operator delete(void* ptr, std::align_val_t) _NOEXCEPT { if (ptr) +#if defined(_LIBCPP_MSVCRT) + ::_aligned_free(ptr); +#else ::free(ptr); +#endif } _LIBCPP_WEAK Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/assign2.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -11,14 +11,30 @@ // template<> struct char_traits -// static void assign(char_type& c1, const char_type& c2); +// static constexpr void assign(char_type& c1, const char_type& c2); // constexpr in C++17 +// constexpr in C++17 #include #include +#include "test_macros.h" + +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + char c = '1'; + std::char_traits::assign(c, 'a'); + return c == 'a'; +} +#endif + int main() { char c = '\0'; std::char_traits::assign(c, 'a'); assert(c == 'a'); + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/compare.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,10 +12,22 @@ // template<> struct char_traits // static int compare(const char_type* s1, const char_type* s2, size_t n); +// constexpr in C++17 #include #include +#include "test_macros.h" + +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + return std::char_traits::compare("123", "223", 3) < 0 + && std::char_traits::compare("223", "123", 3) > 0 + && std::char_traits::compare("123", "123", 3) == 0; +} +#endif + int main() { assert(std::char_traits::compare("", "", 0) == 0); @@ -38,4 +50,8 @@ int main() assert(std::char_traits::compare("223", "123", 3) > 0); assert(std::char_traits::compare("133", "123", 3) > 0); assert(std::char_traits::compare("124", "123", 3) > 0); + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/find.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/find.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/find.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,10 +12,24 @@ // template<> struct char_traits // static const char_type* find(const char_type* s, size_t n, const char_type& a); +// constexpr in C++17 #include #include +#include "test_macros.h" + +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + constexpr const char *p = "123"; + return std::char_traits::find(p, 3, '1') == p + && std::char_traits::find(p, 3, '2') == p + 1 + && std::char_traits::find(p, 3, '3') == p + 2 + && std::char_traits::find(p, 3, '4') == nullptr; +} +#endif + int main() { char s1[] = {1, 2, 3}; @@ -25,4 +39,8 @@ int main() assert(std::char_traits::find(s1, 3, char(4)) == 0); assert(std::char_traits::find(s1, 3, char(0)) == 0); assert(std::char_traits::find(NULL, 0, char(0)) == 0); + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/length.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/length.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/length.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,10 +12,22 @@ // template<> struct char_traits // static size_t length(const char_type* s); +// constexpr in C++17 #include #include +#include "test_macros.h" + +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + return std::char_traits::length("") == 0 + && std::char_traits::length("abcd") == 4; +} +#endif + + int main() { assert(std::char_traits::length("") == 0); @@ -23,4 +35,8 @@ int main() assert(std::char_traits::length("aa") == 2); assert(std::char_traits::length("aaa") == 3); assert(std::char_traits::length("aaaa") == 4); + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/assign2.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,12 +12,22 @@ // template<> struct char_traits // static void assign(char_type& c1, const char_type& c2); +// constexpr in C++17 #include #include #include "test_macros.h" +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + char16_t c = u'1'; + std::char_traits::assign(c, u'a'); + return c == u'a'; +} +#endif + int main() { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS @@ -26,5 +36,9 @@ int main() std::char_traits::assign(c, u'a'); assert(c == u'a'); #endif + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/compare.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,12 +12,23 @@ // template<> struct char_traits // static int compare(const char_type* s1, const char_type* s2, size_t n); +// constexpr in C++17 #include #include #include "test_macros.h" +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + return std::char_traits::compare(u"123", u"223", 3) < 0 + && std::char_traits::compare(u"223", u"123", 3) > 0 + && std::char_traits::compare(u"123", u"123", 3) == 0; +} +#endif + + int main() { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS @@ -43,5 +54,9 @@ int main() assert(std::char_traits::compare(u"133", u"123", 3) > 0); assert(std::char_traits::compare(u"124", u"123", 3) > 0); #endif + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/find.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/find.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/find.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,10 +12,24 @@ // template<> struct char_traits // static const char_type* find(const char_type* s, size_t n, const char_type& a); +// constexpr in C++17 #include #include +#include "test_macros.h" + +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + constexpr const char16_t *p = u"123"; + return std::char_traits::find(p, 3, u'1') == p + && std::char_traits::find(p, 3, u'2') == p + 1 + && std::char_traits::find(p, 3, u'3') == p + 2 + && std::char_traits::find(p, 3, u'4') == nullptr; +} +#endif + int main() { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS @@ -26,5 +40,9 @@ int main() assert(std::char_traits::find(s1, 3, char16_t(4)) == 0); assert(std::char_traits::find(s1, 3, char16_t(0)) == 0); assert(std::char_traits::find(NULL, 0, char16_t(0)) == 0); + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/length.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,12 +12,21 @@ // template<> struct char_traits // static size_t length(const char_type* s); +// constexpr in C++17 #include #include #include "test_macros.h" +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + return std::char_traits::length(u"") == 0 + && std::char_traits::length(u"abcd") == 4; +} +#endif + int main() { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS @@ -28,5 +37,9 @@ int main() assert(std::char_traits::length(u"aaa") == 3); assert(std::char_traits::length(u"aaaa") == 4); #endif + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/assign2.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,12 +12,22 @@ // template<> struct char_traits // static void assign(char_type& c1, const char_type& c2); +// constexpr in C++17 #include #include #include "test_macros.h" +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + char32_t c = U'1'; + std::char_traits::assign(c, U'a'); + return c == U'a'; +} +#endif + int main() { #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS @@ -26,5 +36,9 @@ int main() std::char_traits::assign(c, U'a'); assert(c == U'a'); #endif + +#if TEST_STD_VER > 14 + static_assert(test_constexpr(), "" ); +#endif #endif // _LIBCPP_HAS_NO_UNICODE_CHARS } Modified: vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp Sat Jan 14 15:38:56 2017 (r312178) +++ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/compare.pass.cpp Sat Jan 14 15:39:13 2017 (r312179) @@ -12,12 +12,22 @@ // template<> struct char_traits // static int compare(const char_type* s1, const char_type* s2, size_t n); +// constexpr in C++17 #include #include #include "test_macros.h" +#if TEST_STD_VER > 14 +constexpr bool test_constexpr() +{ + return std::char_traits::compare(U"123", U"223", 3) < 0 + && std::char_traits::compare(U"223", U"123", 3) > 0 + && std::char_traits::compare(U"123", U"123", 3) == 0; +} +#endif + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:39:20 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48472CAFC2C; Sat, 14 Jan 2017 15:39:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFA191CC1; Sat, 14 Jan 2017 15:39:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFdJAD027226; Sat, 14 Jan 2017 15:39:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFdJEN027225; Sat, 14 Jan 2017 15:39:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141539.v0EFdJEN027225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312180 - vendor/libc++/libc++-release_40-r292009 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:39:20 -0000 Author: dim Date: Sat Jan 14 15:39:18 2017 New Revision: 312180 URL: https://svnweb.freebsd.org/changeset/base/312180 Log: Tag libc++ release_40 branch r292009. Added: vendor/libc++/libc++-release_40-r292009/ - copied from r312179, vendor/libc++/dist/ From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:39:29 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A765CAFCB9; Sat, 14 Jan 2017 15:39:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBD001DCB; Sat, 14 Jan 2017 15:39:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFdRXG027295; Sat, 14 Jan 2017 15:39:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFdPdV027274; Sat, 14 Jan 2017 15:39:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141539.v0EFdPdV027274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312181 - in vendor/lld/dist: . COFF ELF test/COFF test/COFF/Inputs test/ELF test/ELF/Inputs test/ELF/invalid test/ELF/linkerscript test/ELF/lto X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:39:29 -0000 Author: dim Date: Sat Jan 14 15:39:25 2017 New Revision: 312181 URL: https://svnweb.freebsd.org/changeset/base/312181 Log: Vendor import of lld release_40 branch r292009: https://llvm.org/svn/llvm-project/lld/branches/release_40@292009 Added: vendor/lld/dist/test/COFF/Inputs/pdb1.yaml vendor/lld/dist/test/COFF/Inputs/pdb2.yaml vendor/lld/dist/test/ELF/Inputs/relocation-copy-relro.s (contents, props changed) vendor/lld/dist/test/ELF/Inputs/unknown-reloc.s (contents, props changed) vendor/lld/dist/test/ELF/incompatible-section-types2.s (contents, props changed) vendor/lld/dist/test/ELF/merge-section-types.s (contents, props changed) vendor/lld/dist/test/ELF/relocation-copy-relro.s (contents, props changed) vendor/lld/dist/test/ELF/relocation-none-i686.test vendor/lld/dist/test/ELF/unknown-reloc.s (contents, props changed) vendor/lld/dist/test/ELF/version-script-anonymous-local.s (contents, props changed) Deleted: vendor/lld/dist/test/COFF/dumppdb.test Modified: vendor/lld/dist/CMakeLists.txt vendor/lld/dist/COFF/PDB.cpp vendor/lld/dist/ELF/Driver.cpp vendor/lld/dist/ELF/Error.cpp vendor/lld/dist/ELF/Error.h vendor/lld/dist/ELF/InputFiles.cpp vendor/lld/dist/ELF/InputSection.cpp vendor/lld/dist/ELF/InputSection.h vendor/lld/dist/ELF/LinkerScript.cpp vendor/lld/dist/ELF/OutputSections.cpp vendor/lld/dist/ELF/OutputSections.h vendor/lld/dist/ELF/Relocations.cpp vendor/lld/dist/ELF/SymbolTable.cpp vendor/lld/dist/ELF/Symbols.cpp vendor/lld/dist/ELF/Symbols.h vendor/lld/dist/ELF/SyntheticSections.cpp vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/ELF/Writer.cpp vendor/lld/dist/test/COFF/pdb.test vendor/lld/dist/test/ELF/Inputs/copy-rel-pie.s vendor/lld/dist/test/ELF/aarch64-condb-reloc.s vendor/lld/dist/test/ELF/aarch64-gnu-ifunc-plt.s vendor/lld/dist/test/ELF/aarch64-tstbr14-reloc.s vendor/lld/dist/test/ELF/amdgpu-relocs.s vendor/lld/dist/test/ELF/arm-abs32-dyn.s vendor/lld/dist/test/ELF/arm-exidx-shared.s vendor/lld/dist/test/ELF/arm-fpic-got.s vendor/lld/dist/test/ELF/arm-gnu-ifunc-plt.s vendor/lld/dist/test/ELF/arm-pie-relative.s vendor/lld/dist/test/ELF/arm-plt-reloc.s vendor/lld/dist/test/ELF/arm-thumb-interwork-shared.s vendor/lld/dist/test/ELF/arm-thumb-plt-reloc.s vendor/lld/dist/test/ELF/arm-tls-norelax-gd-ie.s vendor/lld/dist/test/ELF/arm-tls-norelax-gd-le.s vendor/lld/dist/test/ELF/arm-tls-norelax-ie-le.s vendor/lld/dist/test/ELF/arm-tls-norelax-ld-le.s vendor/lld/dist/test/ELF/basic-mips.s vendor/lld/dist/test/ELF/basic.s vendor/lld/dist/test/ELF/basic64be.s vendor/lld/dist/test/ELF/combrelocs.s vendor/lld/dist/test/ELF/copy-rel-pie.s vendor/lld/dist/test/ELF/dynamic-reloc-index.s vendor/lld/dist/test/ELF/dynamic-reloc.s vendor/lld/dist/test/ELF/format-binary.test vendor/lld/dist/test/ELF/gnu-ifunc-plt-i386.s vendor/lld/dist/test/ELF/gnu-ifunc-plt.s vendor/lld/dist/test/ELF/gnu-ifunc-shared.s vendor/lld/dist/test/ELF/got-aarch64.s vendor/lld/dist/test/ELF/got-plt-header.s vendor/lld/dist/test/ELF/gotpc-relax-nopic.s vendor/lld/dist/test/ELF/i386-merge.s vendor/lld/dist/test/ELF/incompatible-section-types.s vendor/lld/dist/test/ELF/invalid/invalid-relocation-x64.s vendor/lld/dist/test/ELF/linkerscript/orphan.s vendor/lld/dist/test/ELF/linkerscript/repsection-symbol.s vendor/lld/dist/test/ELF/linkerscript/sort-non-script.s vendor/lld/dist/test/ELF/lto/undefined-puts.ll vendor/lld/dist/test/ELF/lto/visibility.ll vendor/lld/dist/test/ELF/mips-26.s vendor/lld/dist/test/ELF/mips-32.s vendor/lld/dist/test/ELF/mips-64-disp.s vendor/lld/dist/test/ELF/mips-64-got.s vendor/lld/dist/test/ELF/mips-64.s vendor/lld/dist/test/ELF/mips-dynamic.s vendor/lld/dist/test/ELF/mips-got-and-copy.s vendor/lld/dist/test/ELF/mips-got-extsym.s vendor/lld/dist/test/ELF/mips-got-hilo.s vendor/lld/dist/test/ELF/mips-got-redundant.s vendor/lld/dist/test/ELF/mips-got-relocs.s vendor/lld/dist/test/ELF/mips-got-weak.s vendor/lld/dist/test/ELF/mips-got16.s vendor/lld/dist/test/ELF/mips-gp-ext.s vendor/lld/dist/test/ELF/mips-gp-lowest.s vendor/lld/dist/test/ELF/mips-hilo-gp-disp.s vendor/lld/dist/test/ELF/mips-hilo.s vendor/lld/dist/test/ELF/mips-options.s vendor/lld/dist/test/ELF/mips-pc-relocs.s vendor/lld/dist/test/ELF/mips-plt-r6.s vendor/lld/dist/test/ELF/mips-tls-64.s vendor/lld/dist/test/ELF/mips-tls-static-64.s vendor/lld/dist/test/ELF/mips-tls-static.s vendor/lld/dist/test/ELF/mips-tls.s vendor/lld/dist/test/ELF/mips-xgot-order.s vendor/lld/dist/test/ELF/plt-aarch64.s vendor/lld/dist/test/ELF/plt-i686.s vendor/lld/dist/test/ELF/plt.s vendor/lld/dist/test/ELF/ppc64-relocs.s vendor/lld/dist/test/ELF/ppc64-shared-rel-toc.s vendor/lld/dist/test/ELF/ppc64-toc-restore.s vendor/lld/dist/test/ELF/rel-offset.s vendor/lld/dist/test/ELF/relative-dynamic-reloc-pie.s vendor/lld/dist/test/ELF/relative-dynamic-reloc-ppc64.s vendor/lld/dist/test/ELF/relative-dynamic-reloc.s vendor/lld/dist/test/ELF/relocation-copy-flags.s vendor/lld/dist/test/ELF/relocation-i686.s vendor/lld/dist/test/ELF/relocation-non-alloc.s vendor/lld/dist/test/ELF/relocation.s vendor/lld/dist/test/ELF/section-layout.s vendor/lld/dist/test/ELF/section-name.s vendor/lld/dist/test/ELF/sort-norosegment.s vendor/lld/dist/test/ELF/startstop.s vendor/lld/dist/test/ELF/synthetic-got.s vendor/lld/dist/test/ELF/tls-dynamic-i686.s vendor/lld/dist/test/ELF/tls-dynamic.s vendor/lld/dist/test/ELF/tls-offset.s vendor/lld/dist/test/ELF/undef-with-plt-addr.s vendor/lld/dist/test/ELF/undefined-versioned-symbol.s vendor/lld/dist/test/ELF/x86-64-tls-gd-local.s Modified: vendor/lld/dist/CMakeLists.txt ============================================================================== --- vendor/lld/dist/CMakeLists.txt Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/CMakeLists.txt Sat Jan 14 15:39:25 2017 (r312181) @@ -12,6 +12,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRE endif() execute_process(COMMAND "${LLVM_CONFIG_PATH}" "--obj-root" "--includedir" + "--cmakedir" RESULT_VARIABLE HAD_ERROR OUTPUT_VARIABLE LLVM_CONFIG_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE) @@ -23,12 +24,12 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRE list(GET LLVM_CONFIG_OUTPUT 0 OBJ_ROOT) list(GET LLVM_CONFIG_OUTPUT 1 MAIN_INCLUDE_DIR) + list(GET LLVM_CONFIG_OUTPUT 2 LLVM_CMAKE_PATH) set(LLVM_OBJ_ROOT ${OBJ_ROOT} CACHE PATH "path to LLVM build tree") set(LLVM_MAIN_INCLUDE_DIR ${MAIN_INCLUDE_DIR} CACHE PATH "path to llvm/include") file(TO_CMAKE_PATH ${LLVM_OBJ_ROOT} LLVM_BINARY_DIR) - set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") if(NOT EXISTS "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") message(FATAL_ERROR "LLVMConfig.cmake not found") Modified: vendor/lld/dist/COFF/PDB.cpp ============================================================================== --- vendor/lld/dist/COFF/PDB.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/COFF/PDB.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -14,8 +14,12 @@ #include "SymbolTable.h" #include "Symbols.h" #include "llvm/DebugInfo/CodeView/CVDebugRecord.h" +#include "llvm/DebugInfo/CodeView/CVTypeDumper.h" #include "llvm/DebugInfo/CodeView/SymbolDumper.h" -#include "llvm/DebugInfo/CodeView/TypeDumper.h" +#include "llvm/DebugInfo/CodeView/TypeDatabase.h" +#include "llvm/DebugInfo/CodeView/TypeDumpVisitor.h" +#include "llvm/DebugInfo/CodeView/TypeStreamMerger.h" +#include "llvm/DebugInfo/CodeView/TypeTableBuilder.h" #include "llvm/DebugInfo/MSF/ByteStream.h" #include "llvm/DebugInfo/MSF/MSFBuilder.h" #include "llvm/DebugInfo/MSF/MSFCommon.h" @@ -61,44 +65,75 @@ static SectionChunk *findByName(std::vec return nullptr; } -static ArrayRef getDebugT(ObjectFile *File) { - SectionChunk *Sec = findByName(File->getDebugChunks(), ".debug$T"); +static ArrayRef getDebugSection(ObjectFile *File, StringRef SecName) { + SectionChunk *Sec = findByName(File->getDebugChunks(), SecName); if (!Sec) return {}; // First 4 bytes are section magic. ArrayRef Data = Sec->getContents(); if (Data.size() < 4) - fatal(".debug$T too short"); + fatal(SecName + " too short"); if (read32le(Data.data()) != COFF::DEBUG_SECTION_MAGIC) - fatal(".debug$T has an invalid magic"); + fatal(SecName + " has an invalid magic"); return Data.slice(4); } +// Merge .debug$T sections and returns it. +static std::vector mergeDebugT(SymbolTable *Symtab) { + ScopedPrinter W(outs()); + + // Visit all .debug$T sections to add them to Builder. + codeview::TypeTableBuilder Builder(BAlloc); + for (ObjectFile *File : Symtab->ObjectFiles) { + ArrayRef Data = getDebugSection(File, ".debug$T"); + if (Data.empty()) + continue; + + msf::ByteStream Stream(Data); + codeview::CVTypeArray Types; + msf::StreamReader Reader(Stream); + if (auto EC = Reader.readArray(Types, Reader.getLength())) + fatal(EC, "Reader::readArray failed"); + if (!codeview::mergeTypeStreams(Builder, Types)) + fatal("codeview::mergeTypeStreams failed"); + } + + // Construct section contents. + std::vector V; + Builder.ForEachRecord([&](TypeIndex TI, ArrayRef Rec) { + V.insert(V.end(), Rec.begin(), Rec.end()); + }); + return V; +} + static void dumpDebugT(ScopedPrinter &W, ObjectFile *File) { - ArrayRef Data = getDebugT(File); + ListScope LS(W, "DebugT"); + ArrayRef Data = getDebugSection(File, ".debug$T"); if (Data.empty()) return; - msf::ByteStream Stream(Data); - CVTypeDumper TypeDumper(&W, false); - if (auto EC = TypeDumper.dump(Data)) + TypeDatabase TDB; + TypeDumpVisitor TDV(TDB, &W, false); + CVTypeDumper TypeDumper(TDB); + if (auto EC = TypeDumper.dump(Data, TDV)) fatal(EC, "CVTypeDumper::dump failed"); } static void dumpDebugS(ScopedPrinter &W, ObjectFile *File) { - SectionChunk *Sec = findByName(File->getDebugChunks(), ".debug$S"); - if (!Sec) + ListScope LS(W, "DebugS"); + ArrayRef Data = getDebugSection(File, ".debug$S"); + if (Data.empty()) return; - msf::ByteStream Stream(Sec->getContents()); + msf::ByteStream Stream(Data); CVSymbolArray Symbols; msf::StreamReader Reader(Stream); if (auto EC = Reader.readArray(Symbols, Reader.getLength())) fatal(EC, "StreamReader.readArray failed"); - CVTypeDumper TypeDumper(&W, false); - CVSymbolDumper SymbolDumper(W, TypeDumper, nullptr, false); + TypeDatabase TDB; + CVSymbolDumper SymbolDumper(W, TDB, nullptr, false); if (auto EC = SymbolDumper.dump(Symbols)) fatal(EC, "CVSymbolDumper::dump failed"); } @@ -113,21 +148,15 @@ static void dumpCodeView(SymbolTable *Sy } } -static void addTypeInfo(SymbolTable *Symtab, - pdb::TpiStreamBuilder &TpiBuilder) { - for (ObjectFile *File : Symtab->ObjectFiles) { - ArrayRef Data = getDebugT(File); - if (Data.empty()) - continue; - - msf::ByteStream Stream(Data); - codeview::CVTypeArray Records; - msf::StreamReader Reader(Stream); - if (auto EC = Reader.readArray(Records, Reader.getLength())) - fatal(EC, "Reader.readArray failed"); - for (const codeview::CVType &Rec : Records) - TpiBuilder.addTypeRecord(Rec); - } +static void addTypeInfo(pdb::TpiStreamBuilder &TpiBuilder, + ArrayRef Data) { + msf::ByteStream Stream(Data); + codeview::CVTypeArray Records; + msf::StreamReader Reader(Stream); + if (auto EC = Reader.readArray(Records, Reader.getLength())) + fatal(EC, "Reader.readArray failed"); + for (const codeview::CVType &Rec : Records) + TpiBuilder.addTypeRecord(Rec); } // Creates a PDB file. @@ -162,8 +191,11 @@ void coff::createPDB(StringRef Path, Sym // Add an empty TPI stream. auto &TpiBuilder = Builder.getTpiBuilder(); TpiBuilder.setVersionHeader(pdb::PdbTpiV80); - if (Config->DebugPdb) - addTypeInfo(Symtab, TpiBuilder); + std::vector TpiData; + if (Config->DebugPdb) { + TpiData = mergeDebugT(Symtab); + addTypeInfo(TpiBuilder, TpiData); + } // Add an empty IPI stream. auto &IpiBuilder = Builder.getIpiBuilder(); Modified: vendor/lld/dist/ELF/Driver.cpp ============================================================================== --- vendor/lld/dist/ELF/Driver.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/Driver.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -24,6 +24,7 @@ #include "lld/Driver/Driver.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/Object/Decompressor.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Path.h" #include "llvm/Support/TarWriter.h" @@ -815,7 +816,7 @@ template void LinkerDriver: [](InputSectionBase *S) { if (!S->Live) return; - if (S->isCompressed()) + if (Decompressor::isCompressedELFSection(S->Flags, S->Name)) S->uncompress(); if (auto *MS = dyn_cast>(S)) MS->splitIntoPieces(); Modified: vendor/lld/dist/ELF/Error.cpp ============================================================================== --- vendor/lld/dist/ELF/Error.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/Error.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -103,4 +103,8 @@ void elf::fatal(std::error_code EC, cons fatal(Prefix + ": " + EC.message()); } +void elf::fatal(Error &E, const Twine &Prefix) { + fatal(Prefix + ": " + llvm::toString(std::move(E))); +} + } // namespace lld Modified: vendor/lld/dist/ELF/Error.h ============================================================================== --- vendor/lld/dist/ELF/Error.h Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/Error.h Sat Jan 14 15:39:25 2017 (r312181) @@ -44,6 +44,7 @@ void error(std::error_code EC, const Twi LLVM_ATTRIBUTE_NORETURN void exitLld(int Val); LLVM_ATTRIBUTE_NORETURN void fatal(const Twine &Msg); LLVM_ATTRIBUTE_NORETURN void fatal(std::error_code EC, const Twine &Prefix); +LLVM_ATTRIBUTE_NORETURN void fatal(Error &E, const Twine &Prefix); // check() functions are convenient functions to strip errors // from error-or-value objects. @@ -55,11 +56,7 @@ template T check(ErrorOr E) template T check(Expected E) { if (!E) - handleAllErrors(std::move(E.takeError()), - [](llvm::ErrorInfoBase &EIB) -> Error { - fatal(EIB.message()); - return Error::success(); - }); + fatal(llvm::toString(E.takeError())); return std::move(*E); } Modified: vendor/lld/dist/ELF/InputFiles.cpp ============================================================================== --- vendor/lld/dist/ELF/InputFiles.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/InputFiles.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -857,8 +857,8 @@ template void BinaryFile::p StringRef EndName = Saver.save(Twine(Filename) + "_end"); StringRef SizeName = Saver.save(Twine(Filename) + "_size"); - auto *Section = - make>(SHF_ALLOC, SHT_PROGBITS, 8, Data, ".data"); + auto *Section = make>(SHF_ALLOC | SHF_WRITE, SHT_PROGBITS, + 8, Data, ".data"); Sections.push_back(Section); elf::Symtab::X->addRegular(StartName, STV_DEFAULT, STT_OBJECT, 0, 0, Modified: vendor/lld/dist/ELF/InputSection.cpp ============================================================================== --- vendor/lld/dist/ELF/InputSection.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/InputSection.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -19,6 +19,7 @@ #include "SyntheticSections.h" #include "Target.h" #include "Thunks.h" +#include "llvm/Object/Decompressor.h" #include "llvm/Support/Compression.h" #include "llvm/Support/Endian.h" #include @@ -35,7 +36,10 @@ using namespace lld::elf; // Returns a string to construct an error message. template std::string lld::toString(const InputSectionBase *Sec) { - return (Sec->getFile()->getName() + ":(" + Sec->Name + ")").str(); + // File can be absent if section is synthetic. + std::string FileName = + Sec->getFile() ? Sec->getFile()->getName() : ""; + return (FileName + ":(" + Sec->Name + ")").str(); } template @@ -102,11 +106,6 @@ template size_t InputSectio return Data.size(); } -// Returns a string for an error message. -template static std::string getName(SectionT *Sec) { - return (Sec->getFile()->getName() + ":(" + Sec->Name + ")").str(); -} - template typename ELFT::uint InputSectionBase::getOffset(uintX_t Offset) const { switch (kind()) { @@ -128,71 +127,23 @@ typename ELFT::uint InputSectionBase bool InputSectionBase::isCompressed() const { - return (Flags & SHF_COMPRESSED) || Name.startswith(".zdebug"); -} - -// Returns compressed data and its size when uncompressed. -template -std::pair, uint64_t> -InputSectionBase::getElfCompressedData(ArrayRef Data) { - // Compressed section with Elf_Chdr is the ELF standard. - if (Data.size() < sizeof(Elf_Chdr)) - fatal(toString(this) + ": corrupted compressed section"); - auto *Hdr = reinterpret_cast(Data.data()); - if (Hdr->ch_type != ELFCOMPRESS_ZLIB) - fatal(toString(this) + ": unsupported compression type"); - return {Data.slice(sizeof(*Hdr)), Hdr->ch_size}; -} - -// Returns compressed data and its size when uncompressed. -template -std::pair, uint64_t> -InputSectionBase::getRawCompressedData(ArrayRef Data) { - // Compressed sections without Elf_Chdr header contain this header - // instead. This is a GNU extension. - struct ZlibHeader { - char Magic[4]; // Should be "ZLIB" - char Size[8]; // Uncompressed size in big-endian - }; - - if (Data.size() < sizeof(ZlibHeader)) - fatal(toString(this) + ": corrupted compressed section"); - auto *Hdr = reinterpret_cast(Data.data()); - if (memcmp(Hdr->Magic, "ZLIB", 4)) - fatal(toString(this) + ": broken ZLIB-compressed section"); - return {Data.slice(sizeof(*Hdr)), read64be(Hdr->Size)}; -} - // Uncompress section contents. Note that this function is called // from parallel_for_each, so it must be thread-safe. template void InputSectionBase::uncompress() { - if (!zlib::isAvailable()) - fatal(toString(this) + - ": build lld with zlib to enable compressed sections support"); - - // This section is compressed. Here we decompress it. Ideally, all - // compressed sections have SHF_COMPRESSED bit and their contents - // start with headers of Elf_Chdr type. However, sections whose - // names start with ".zdebug_" don't have the bit and contains a raw - // ZLIB-compressed data (which is a bad thing because section names - // shouldn't be significant in ELF.) We need to be able to read both. - ArrayRef Buf; // Compressed data - size_t Size; // Uncompressed size - if (Flags & SHF_COMPRESSED) - std::tie(Buf, Size) = getElfCompressedData(Data); - else - std::tie(Buf, Size) = getRawCompressedData(Data); + Decompressor Decompressor = check(Decompressor::create( + Name, toStringRef(Data), ELFT::TargetEndianness == llvm::support::little, + ELFT::Is64Bits)); - // Uncompress Buf. + size_t Size = Decompressor.getDecompressedSize(); char *OutputBuf; { static std::mutex Mu; std::lock_guard Lock(Mu); OutputBuf = BAlloc.Allocate(Size); } - if (zlib::uncompress(toStringRef(Buf), OutputBuf, Size) != zlib::StatusOK) - fatal(toString(this) + ": error while uncompressing section"); + + if (Error E = Decompressor.decompress({OutputBuf, Size})) + fatal(E, toString(this)); Data = ArrayRef((uint8_t *)OutputBuf, Size); } Modified: vendor/lld/dist/ELF/InputSection.h ============================================================================== --- vendor/lld/dist/ELF/InputSection.h Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/InputSection.h Sat Jan 14 15:39:25 2017 (r312181) @@ -138,22 +138,12 @@ public: // section. uintX_t getOffset(uintX_t Offset) const; - // ELF supports ZLIB-compressed section. - // Returns true if the section is compressed. - bool isCompressed() const; void uncompress(); // Returns a source location string. Used to construct an error message. std::string getLocation(uintX_t Offset); void relocate(uint8_t *Buf, uint8_t *BufEnd); - -private: - std::pair, uint64_t> - getElfCompressedData(ArrayRef Data); - - std::pair, uint64_t> - getRawCompressedData(ArrayRef Data); }; // SectionPiece represents a piece of splittable section contents. Modified: vendor/lld/dist/ELF/LinkerScript.cpp ============================================================================== --- vendor/lld/dist/ELF/LinkerScript.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/LinkerScript.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -1014,6 +1014,7 @@ private: void readAnonymousDeclaration(); void readVersionDeclaration(StringRef VerStr); std::vector readSymbols(); + void readLocals(); ScriptConfiguration &Opt = *ScriptConfig; bool IsUnderSysroot; @@ -1861,17 +1862,22 @@ void ScriptParser::readAnonymousDeclarat if (consume("global:") || peek() != "local:") Config->VersionScriptGlobals = readSymbols(); - // Next, read local symbols. - if (consume("local:")) { - if (consume("*")) { + readLocals(); + expect("}"); + expect(";"); +} + +void ScriptParser::readLocals() { + if (!consume("local:")) + return; + std::vector Locals = readSymbols(); + for (SymbolVersion V : Locals) { + if (V.Name == "*") { Config->DefaultSymbolVersion = VER_NDX_LOCAL; - expect(";"); - } else { - setError("local symbol list for anonymous version is not supported"); + continue; } + Config->VersionScriptLocals.push_back(V); } - expect("}"); - expect(";"); } // Reads a list of symbols, e.g. "VerStr { global: foo; bar; local: *; };". @@ -1885,16 +1891,7 @@ void ScriptParser::readVersionDeclaratio if (consume("global:") || peek() != "local:") Config->VersionDefinitions.back().Globals = readSymbols(); - // Read local symbols. - if (consume("local:")) { - if (consume("*")) { - Config->DefaultSymbolVersion = VER_NDX_LOCAL; - expect(";"); - } else { - for (SymbolVersion V : readSymbols()) - Config->VersionScriptLocals.push_back(V); - } - } + readLocals(); expect("}"); // Each version may have a parent version. For example, "Ver2" Modified: vendor/lld/dist/ELF/OutputSections.cpp ============================================================================== --- vendor/lld/dist/ELF/OutputSections.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/OutputSections.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -636,7 +636,12 @@ OutputSectionFactory::create(const if (getIncompatibleFlags(Sec->Flags) != getIncompatibleFlags(C->Flags)) error("Section has flags incompatible with others with the same name " + toString(C)); - if (Sec->Type != C->Type) + // Convert notbits to progbits if they are mixed. This happens is some + // linker scripts. + if (Sec->Type == SHT_NOBITS && C->Type == SHT_PROGBITS) + Sec->Type = SHT_PROGBITS; + if (Sec->Type != C->Type && + !(Sec->Type == SHT_PROGBITS && C->Type == SHT_NOBITS)) error("Section has different type from others with the same name " + toString(C)); Sec->Flags |= Flags; Modified: vendor/lld/dist/ELF/OutputSections.h ============================================================================== --- vendor/lld/dist/ELF/OutputSections.h Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/OutputSections.h Sat Jan 14 15:39:25 2017 (r312181) @@ -206,6 +206,7 @@ template struct Out { static uint8_t First; static EhOutputSection *EhFrame; static OutputSection *Bss; + static OutputSection *BssRelRo; static OutputSectionBase *Opd; static uint8_t *OpdBuf; static PhdrEntry *TlsPhdr; @@ -252,6 +253,7 @@ template uint64_t getHeader template uint8_t Out::First; template EhOutputSection *Out::EhFrame; template OutputSection *Out::Bss; +template OutputSection *Out::BssRelRo; template OutputSectionBase *Out::Opd; template uint8_t *Out::OpdBuf; template PhdrEntry *Out::TlsPhdr; Modified: vendor/lld/dist/ELF/Relocations.cpp ============================================================================== --- vendor/lld/dist/ELF/Relocations.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/Relocations.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -399,7 +399,21 @@ template static uint32_t ge return 1 << TrailingZeros; } -// Reserve space in .bss for copy relocation. +template static bool isReadOnly(SharedSymbol *SS) { + typedef typename ELFT::uint uintX_t; + typedef typename ELFT::Phdr Elf_Phdr; + + // Determine if the symbol is read-only by scanning the DSO's program headers. + uintX_t Value = SS->Sym.st_value; + for (const Elf_Phdr &Phdr : check(SS->file()->getObj().program_headers())) + if ((Phdr.p_type == ELF::PT_LOAD || Phdr.p_type == ELF::PT_GNU_RELRO) && + !(Phdr.p_flags & ELF::PF_W) && Value >= Phdr.p_vaddr && + Value < Phdr.p_vaddr + Phdr.p_memsz) + return true; + return false; +} + +// Reserve space in .bss or .bss.rel.ro for copy relocation. template static void addCopyRelSymbol(SharedSymbol *SS) { typedef typename ELFT::uint uintX_t; typedef typename ELFT::Sym Elf_Sym; @@ -409,10 +423,16 @@ template static void addCop if (SymSize == 0) fatal("cannot create a copy relocation for symbol " + toString(*SS)); + // See if this symbol is in a read-only segment. If so, preserve the symbol's + // memory protection by reserving space in the .bss.rel.ro section. + bool IsReadOnly = isReadOnly(SS); + OutputSection *CopySec = + IsReadOnly ? Out::BssRelRo : Out::Bss; + uintX_t Alignment = getAlignment(SS); - uintX_t Off = alignTo(Out::Bss->Size, Alignment); - Out::Bss->Size = Off + SymSize; - Out::Bss->updateAlignment(Alignment); + uintX_t Off = alignTo(CopySec->Size, Alignment); + CopySec->Size = Off + SymSize; + CopySec->updateAlignment(Alignment); uintX_t Shndx = SS->Sym.st_shndx; uintX_t Value = SS->Sym.st_value; // Look through the DSO's dynamic symbol table for aliases and create a @@ -425,12 +445,12 @@ template static void addCop Symtab::X->find(check(S.getName(SS->file()->getStringTable())))); if (!Alias) continue; - Alias->OffsetInBss = Off; + Alias->CopyIsInBssRelRo = IsReadOnly; + Alias->CopyOffset = Off; Alias->NeedsCopyOrPltAddr = true; Alias->symbol()->IsUsedInRegularObj = true; } - In::RelaDyn->addReloc( - {Target->CopyRel, Out::Bss, SS->OffsetInBss, false, SS, 0}); + In::RelaDyn->addReloc({Target->CopyRel, CopySec, Off, false, SS, 0}); } template Modified: vendor/lld/dist/ELF/SymbolTable.cpp ============================================================================== --- vendor/lld/dist/ELF/SymbolTable.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/SymbolTable.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -605,19 +605,16 @@ SymbolTable::findAllByVersion(Symb // If there's only one anonymous version definition in a version // script file, the script does not actually define any symbol version, -// but just specifies symbols visibilities. We assume that the script was -// in the form of { global: foo; bar; local *; }. So, local is default. -// In this function, we make specified symbols global. +// but just specifies symbols visibilities. template void SymbolTable::handleAnonymousVersion() { - for (SymbolVersion &Ver : Config->VersionScriptGlobals) { - if (Ver.HasWildcard) { - for (SymbolBody *B : findAllByVersion(Ver)) - B->symbol()->VersionId = VER_NDX_GLOBAL; - continue; - } - for (SymbolBody *B : findByVersion(Ver)) - B->symbol()->VersionId = VER_NDX_GLOBAL; - } + for (SymbolVersion &Ver : Config->VersionScriptGlobals) + assignExactVersion(Ver, VER_NDX_GLOBAL, "global"); + for (SymbolVersion &Ver : Config->VersionScriptGlobals) + assignWildcardVersion(Ver, VER_NDX_GLOBAL); + for (SymbolVersion &Ver : Config->VersionScriptLocals) + assignExactVersion(Ver, VER_NDX_LOCAL, "local"); + for (SymbolVersion &Ver : Config->VersionScriptLocals) + assignWildcardVersion(Ver, VER_NDX_LOCAL); } // Set symbol versions to symbols. This function handles patterns @@ -673,10 +670,7 @@ template void SymbolTablebody()->parseSymbolVersion(); // Handle edge cases first. - if (!Config->VersionScriptGlobals.empty()) { - handleAnonymousVersion(); - return; - } + handleAnonymousVersion(); if (Config->VersionDefinitions.empty()) return; @@ -687,8 +681,6 @@ template void SymbolTableVersionScriptLocals) - assignExactVersion(Ver, VER_NDX_LOCAL, "local"); for (VersionDefinition &V : Config->VersionDefinitions) for (SymbolVersion &Ver : V.Globals) assignExactVersion(Ver, V.Id, V.Name); @@ -697,8 +689,6 @@ template void SymbolTableVersionScriptLocals) - assignWildcardVersion(Ver, VER_NDX_LOCAL); for (VersionDefinition &V : llvm::reverse(Config->VersionDefinitions)) for (SymbolVersion &Ver : V.Globals) assignWildcardVersion(Ver, V.Id); Modified: vendor/lld/dist/ELF/Symbols.cpp ============================================================================== --- vendor/lld/dist/ELF/Symbols.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/Symbols.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -81,7 +81,7 @@ static typename ELFT::uint getSymVA(cons return 0; if (SS.isFunc()) return Body.getPltVA(); - return Out::Bss->Addr + SS.OffsetInBss; + return SS.getBssSectionForCopy()->Addr + SS.CopyOffset; } case SymbolBody::UndefinedKind: return 0; @@ -97,7 +97,8 @@ SymbolBody::SymbolBody(Kind K, StringRef uint8_t Type) : SymbolKind(K), NeedsCopyOrPltAddr(false), IsLocal(IsLocal), IsInGlobalMipsGot(false), Is32BitMipsGot(false), IsInIplt(false), - IsInIgot(false), Type(Type), StOther(StOther), Name(Name) {} + IsInIgot(false), CopyIsInBssRelRo(false), Type(Type), StOther(StOther), + Name(Name) {} // Returns true if a symbol can be replaced at load-time by a symbol // with the same name defined in other ELF executable or DSO. @@ -245,6 +246,12 @@ Undefined::Undefined(StringRefZ Na this->File = File; } +template +OutputSection *SharedSymbol::getBssSectionForCopy() const { + assert(needsCopy()); + return CopyIsInBssRelRo ? Out::BssRelRo : Out::Bss; +} + DefinedCommon::DefinedCommon(StringRef Name, uint64_t Size, uint64_t Alignment, uint8_t StOther, uint8_t Type, InputFile *File) : Defined(SymbolBody::DefinedCommonKind, Name, /*IsLocal=*/false, StOther, @@ -287,10 +294,22 @@ InputFile *LazyObject::fetch() { return createObjectFile(MBRef); } -bool Symbol::includeInDynsym() const { +uint8_t Symbol::computeBinding() const { + if (Config->Relocatable) + return Binding; if (Visibility != STV_DEFAULT && Visibility != STV_PROTECTED) + return STB_LOCAL; + if (VersionId == VER_NDX_LOCAL && !body()->isUndefined()) + return STB_LOCAL; + if (Config->NoGnuUnique && Binding == STB_GNU_UNIQUE) + return STB_GLOBAL; + return Binding; +} + +bool Symbol::includeInDynsym() const { + if (computeBinding() == STB_LOCAL) return false; - return (ExportDynamic && VersionId != VER_NDX_LOCAL) || body()->isShared() || + return ExportDynamic || body()->isShared() || (body()->isUndefined() && Config->Shared); } @@ -366,6 +385,11 @@ template class elf::Undefined; template class elf::Undefined; template class elf::Undefined; +template class elf::SharedSymbol; +template class elf::SharedSymbol; +template class elf::SharedSymbol; +template class elf::SharedSymbol; + template class elf::DefinedRegular; template class elf::DefinedRegular; template class elf::DefinedRegular; Modified: vendor/lld/dist/ELF/Symbols.h ============================================================================== --- vendor/lld/dist/ELF/Symbols.h Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/Symbols.h Sat Jan 14 15:39:25 2017 (r312181) @@ -123,6 +123,11 @@ public: // True if this symbol is in the Igot sub-section of the .got.plt or .got. unsigned IsInIgot : 1; + // True if this is a shared symbol in a read-only segment which requires a + // copy relocation. This causes space for the symbol to be allocated in the + // .bss.rel.ro section. + unsigned CopyIsInBssRelRo : 1; + // The following fields have the same meaning as the ELF symbol attributes. uint8_t Type; // symbol type uint8_t StOther; // st_other field value @@ -282,13 +287,15 @@ public: // This field is a pointer to the symbol's version definition. const Elf_Verdef *Verdef; - // OffsetInBss is significant only when needsCopy() is true. - uintX_t OffsetInBss = 0; + // CopyOffset is significant only when needsCopy() is true. + uintX_t CopyOffset = 0; // If non-null the symbol has a Thunk that may be used as an alternative // destination for callers of this Symbol. Thunk *ThunkData = nullptr; bool needsCopy() const { return this->NeedsCopyOrPltAddr && !this->isFunc(); } + + OutputSection *getBssSectionForCopy() const; }; // This class represents a symbol defined in an archive file. It is @@ -413,6 +420,7 @@ struct Symbol { unsigned InVersionScript : 1; bool includeInDynsym() const; + uint8_t computeBinding() const; bool isWeak() const { return Binding == llvm::ELF::STB_WEAK; } // This field is used to store the Symbol's SymbolBody. This instantiation of Modified: vendor/lld/dist/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist/ELF/SyntheticSections.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/SyntheticSections.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -1060,18 +1060,6 @@ static bool sortMipsSymbols(const Symbol return L->GotIndex < R->GotIndex; } -static uint8_t getSymbolBinding(SymbolBody *Body) { - Symbol *S = Body->symbol(); - if (Config->Relocatable) - return S->Binding; - uint8_t Visibility = S->Visibility; - if (Visibility != STV_DEFAULT && Visibility != STV_PROTECTED) - return STB_LOCAL; - if (Config->NoGnuUnique && S->Binding == STB_GNU_UNIQUE) - return STB_GLOBAL; - return S->Binding; -} - template void SymbolTableSection::finalize() { this->OutSec->Link = this->Link = StrTabSec.OutSec->SectionIndex; this->OutSec->Info = this->Info = NumLocals + 1; @@ -1085,11 +1073,12 @@ template void SymbolTableSe } if (!StrTabSec.isDynamic()) { - std::stable_sort(Symbols.begin(), Symbols.end(), - [](const SymbolTableEntry &L, const SymbolTableEntry &R) { - return getSymbolBinding(L.Symbol) == STB_LOCAL && - getSymbolBinding(R.Symbol) != STB_LOCAL; - }); + std::stable_sort( + Symbols.begin(), Symbols.end(), + [](const SymbolTableEntry &L, const SymbolTableEntry &R) { + return L.Symbol->symbol()->computeBinding() == STB_LOCAL && + R.Symbol->symbol()->computeBinding() != STB_LOCAL; + }); return; } if (In::GnuHashTab) @@ -1159,7 +1148,7 @@ void SymbolTableSection::writeGlob uint8_t Type = Body->Type; uintX_t Size = Body->getSize(); - ESym->setBindingAndType(getSymbolBinding(Body), Type); + ESym->setBindingAndType(Body->symbol()->computeBinding(), Type); ESym->st_size = Size; ESym->st_name = StrOff; ESym->setVisibility(Body->symbol()->Visibility); @@ -1201,10 +1190,12 @@ SymbolTableSection::getOutputSecti } case SymbolBody::DefinedCommonKind: return In::Common->OutSec; - case SymbolBody::SharedKind: - if (cast>(Sym)->needsCopy()) - return Out::Bss; + case SymbolBody::SharedKind: { + auto &SS = cast>(*Sym); + if (SS.needsCopy()) + return SS.getBssSectionForCopy(); break; + } case SymbolBody::UndefinedKind: case SymbolBody::LazyArchiveKind: case SymbolBody::LazyObjectKind: Modified: vendor/lld/dist/ELF/Target.cpp ============================================================================== --- vendor/lld/dist/ELF/Target.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/Target.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -356,7 +356,9 @@ X86TargetInfo::X86TargetInfo() { RelExpr X86TargetInfo::getRelExpr(uint32_t Type, const SymbolBody &S) const { switch (Type) { - default: + case R_386_16: + case R_386_32: + case R_386_TLS_LDO_32: return R_ABS; case R_386_TLS_GD: return R_TLSGD; @@ -381,6 +383,12 @@ RelExpr X86TargetInfo::getRelExpr(uint32 return R_TLS; case R_386_TLS_LE_32: return R_NEG_TLS; + case R_386_NONE: + return R_HINT; + default: + error("do not know how to handle relocation '" + toString(Type) + "' (" + + Twine(Type) + ")"); + return R_HINT; } } @@ -623,7 +631,11 @@ template RelExpr X86_64TargetInfo::getRelExpr(uint32_t Type, const SymbolBody &S) const { switch (Type) { - default: + case R_X86_64_32: + case R_X86_64_32S: + case R_X86_64_64: + case R_X86_64_DTPOFF32: + case R_X86_64_DTPOFF64: return R_ABS; case R_X86_64_TPOFF32: return R_TLS; @@ -649,6 +661,10 @@ RelExpr X86_64TargetInfo::getRelEx return R_GOT_PC; case R_X86_64_NONE: return R_HINT; + default: + error("do not know how to handle relocation '" + toString(Type) + "' (" + + Twine(Type) + ")"); + return R_HINT; } } @@ -870,7 +886,7 @@ void X86_64TargetInfo::relocateOne write64le(Loc, Val); break; default: - error(getErrorLocation(Loc) + "unrecognized reloc " + Twine(Type)); + llvm_unreachable("unexpected relocation"); } } Modified: vendor/lld/dist/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist/ELF/Writer.cpp Sat Jan 14 15:39:18 2017 (r312180) +++ vendor/lld/dist/ELF/Writer.cpp Sat Jan 14 15:39:25 2017 (r312181) @@ -250,6 +250,8 @@ template void Writer: // Create singleton output sections. Out::Bss = make>(".bss", SHT_NOBITS, SHF_ALLOC | SHF_WRITE); + Out::BssRelRo = make>(".bss.rel.ro", SHT_NOBITS, + SHF_ALLOC | SHF_WRITE); In::DynStrTab = make>(".dynstr", true); In::Dynamic = make>(); Out::EhFrame = make>(); @@ -498,6 +500,8 @@ template bool elf::isRelroS return true; if (In::MipsGot && Sec == In::MipsGot->OutSec) return true; + if (Sec == Out::BssRelRo) + return true; StringRef S = Sec->getName(); return S == ".data.rel.ro" || S == ".ctors" || S == ".dtors" || S == ".jcr" || S == ".eh_frame" || S == ".openbsd.randomdata"; @@ -557,30 +561,38 @@ static bool compareSectionsNonScript(con // If we got here we know that both A and B are in the same PT_LOAD. - // The TLS initialization block needs to be a single contiguous block in a R/W - // PT_LOAD, so stick TLS sections directly before R/W sections. The TLS NOBITS - // sections are placed here as they don't take up virtual address space in the - // PT_LOAD. bool AIsTls = A->Flags & SHF_TLS; bool BIsTls = B->Flags & SHF_TLS; - if (AIsTls != BIsTls) - return AIsTls; - - // The next requirement we have is to put nobits sections last. The - // reason is that the only thing the dynamic linker will see about - // them is a p_memsz that is larger than p_filesz. Seeing that it - // zeros the end of the PT_LOAD, so that has to correspond to the - // nobits sections. bool AIsNoBits = A->Type == SHT_NOBITS; bool BIsNoBits = B->Type == SHT_NOBITS; - if (AIsNoBits != BIsNoBits) - return BIsNoBits; - // We place RelRo section before plain r/w ones. + // The first requirement we have is to put (non-TLS) nobits sections last. The + // reason is that the only thing the dynamic linker will see about them is a + // p_memsz that is larger than p_filesz. Seeing that it zeros the end of the + // PT_LOAD, so that has to correspond to the nobits sections. + bool AIsNonTlsNoBits = AIsNoBits && !AIsTls; + bool BIsNonTlsNoBits = BIsNoBits && !BIsTls; + if (AIsNonTlsNoBits != BIsNonTlsNoBits) + return BIsNonTlsNoBits; + + // We place nobits RelRo sections before plain r/w ones, and non-nobits RelRo + // sections after r/w ones, so that the RelRo sections are contiguous. bool AIsRelRo = isRelroSection(A); bool BIsRelRo = isRelroSection(B); if (AIsRelRo != BIsRelRo) - return AIsRelRo; + return AIsNonTlsNoBits ? AIsRelRo : BIsRelRo; + + // The TLS initialization block needs to be a single contiguous block in a R/W + // PT_LOAD, so stick TLS sections directly before the other RelRo R/W + // sections. The TLS NOBITS sections are placed here as they don't take up + // virtual address space in the PT_LOAD. + if (AIsTls != BIsTls) + return AIsTls; + + // Within the TLS initialization block, the non-nobits sections need to appear + // first. + if (AIsNoBits != BIsNoBits) + return BIsNoBits; // Some architectures have additional ordering restrictions for sections // within the same PT_LOAD. @@ -1071,6 +1083,8 @@ template void Writer: template void Writer::addPredefinedSections() { if (Out::Bss->Size > 0) OutputSections.push_back(Out::Bss); + if (Out::BssRelRo->Size > 0) + OutputSections.push_back(Out::BssRelRo); auto OS = dyn_cast_or_null>(findSection(".ARM.exidx")); if (OS && !OS->Sections.empty() && !Config->Relocatable) @@ -1272,8 +1286,9 @@ void Writer::addPtArmExid(std::vec Phdrs.push_back(ARMExidx); } -// The first section of each PT_LOAD and the first section after PT_GNU_RELRO -// have to be page aligned so that the dynamic linker can set the permissions. +// The first section of each PT_LOAD, the first section in PT_GNU_RELRO and the +// first section after PT_GNU_RELRO have to be page aligned so that the dynamic +// linker can set the permissions. template void Writer::fixSectionAlignments() { for (const PhdrEntry &P : Phdrs) if (P.p_type == PT_LOAD && P.First) @@ -1282,6 +1297,8 @@ template void Writer: for (const PhdrEntry &P : Phdrs) { if (P.p_type != PT_GNU_RELRO) continue; + if (P.First) + P.First->PageAlign = true; // Find the first section after PT_GNU_RELRO. If it is in a PT_LOAD we // have to align it to a page. auto End = OutputSections.end(); @@ -1635,10 +1652,12 @@ static void unlinkAsync(StringRef Path) // Path as a new file. If we do that in a different thread, the new // thread can remove the new file. SmallString<128> TempPath; - if (auto EC = sys::fs::createUniqueFile(Path + "tmp%%%%%%%%", TempPath)) - fatal(EC, "createUniqueFile failed"); - if (auto EC = sys::fs::rename(Path, TempPath)) - fatal(EC, "rename failed"); + if (sys::fs::createUniqueFile(Path + "tmp%%%%%%%%", TempPath)) + return; + if (sys::fs::rename(Path, TempPath)) { + sys::fs::remove(TempPath); + return; + } // Remove TempPath in background. std::thread([=] { ::remove(TempPath.str().str().c_str()); }).detach(); Added: vendor/lld/dist/test/COFF/Inputs/pdb1.yaml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/test/COFF/Inputs/pdb1.yaml Sat Jan 14 15:39:25 2017 (r312181) @@ -0,0 +1,172 @@ +--- !COFF +header: + Machine: IMAGE_FILE_MACHINE_AMD64 + Characteristics: [ ] +sections: + - Name: .drectve + Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ] + Alignment: 1 + SectionData: 2020202F44454641554C544C49423A224C4942434D5422202F44454641554C544C49423A224F4C444E414D45532220 + - Name: '.debug$S' + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ] + Alignment: 1 + SectionData: 04000000F1000000580000001A00011100000000443A5C625C72657434322D6D61696E2E6F626A003A003C1100600000D00013000000F259000013000000F25900004D6963726F736F667420285229204F7074696D697A696E6720436F6D70696C657200F10000004E0000002A0047110000000000000000000000000E000000040000000900000005100000000000000000006D61696E001C001210280000000000000000000000000000000000000000000042110002004F110000F20000002000000000000000000000000E0000000000000001000000140000000000000002000080F400000018000000010000001001C538722F63570DF6705DDE06FE96E5D10000F30000001300000000643A5C625C72657434322D6D61696E2E630000F10000000800000006004C110E100000 + Relocations: + - VirtualAddress: 140 + SymbolName: main + Type: IMAGE_REL_AMD64_SECREL + - VirtualAddress: 144 + SymbolName: main + Type: IMAGE_REL_AMD64_SECTION + - VirtualAddress: 196 + SymbolName: main + Type: IMAGE_REL_AMD64_SECREL + - VirtualAddress: 200 + SymbolName: main + Type: IMAGE_REL_AMD64_SECTION + - Name: '.debug$T' + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ] + Alignment: 1 + SectionData: 0400000006000112000000000E0008107400000000000000001000000A000210011000000C0001000A00011201000000000000000E0008107400000000000000031000001200011600000000041000006D61696E00F3F2F10E0001160000000001100000666F6F000E00051600000000443A5C6200F3F2F12200051600000000433A5C767331345C56435C42494E5C616D6436345C636C2E6578650002010516000000002D5A37202D63202D4D54202D49433A5C767331345C56435C494E434C554445202D49433A5C767331345C56435C41544C4D46435C494E434C554445202D4922433A5C50726F6772616D2046696C65732028783836295C57696E646F7773204B6974735C31305C696E636C7564655C31302E302E31303135302E305C7563727422202D4922433A5C50726F6772616D2046696C65732028783836295C57696E646F7773204B6974735C4E4554465853444B5C342E365C696E636C7564655C756D22202D4922433A5C50726F6772616D2046696C65732028783836295C57696E646F7773204B6974735C382E315C696E636C7564655C73686172656422000A0004160100000009100000820005160A100000202D4922433A5C50726F6772616D2046696C65732028783836295C57696E646F7773204B6974735C382E315C696E636C7564655C 756D22202D4922433A5C50726F6772616D2046696C65732028783836295C57696E646F7773204B6974735C382E315C696E636C7564655C77696E727422202D5443202D5800F3F2F1160005160000000072657434322D6D61696E2E6300F3F2F11600051600000000443A5C625C76633134302E70646200F11A000316050007100000081000000C1000000D1000000B100000F2F1 + - Name: '.text$mn' + Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ] + Alignment: 16 + SectionData: 4883EC28E8000000004883C428C3 + Relocations: + - VirtualAddress: 5 + SymbolName: foo + Type: IMAGE_REL_AMD64_REL32 + - Name: .xdata + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] + Alignment: 4 + SectionData: '0104010004420000' + - Name: .pdata + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] + Alignment: 4 + SectionData: '000000000E00000000000000' + Relocations: + - VirtualAddress: 0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:39:31 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA54ECAFCD7; Sat, 14 Jan 2017 15:39:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92B4D1E1C; Sat, 14 Jan 2017 15:39:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFdUTr027343; Sat, 14 Jan 2017 15:39:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFdU08027342; Sat, 14 Jan 2017 15:39:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141539.v0EFdU08027342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312182 - vendor/lld/lld-release_40-r292009 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:39:32 -0000 Author: dim Date: Sat Jan 14 15:39:30 2017 New Revision: 312182 URL: https://svnweb.freebsd.org/changeset/base/312182 Log: Tag lld release_40 branch r292009. Added: vendor/lld/lld-release_40-r292009/ - copied from r312181, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:39:49 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AAA7CAFD86; Sat, 14 Jan 2017 15:39:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 531D5100B; Sat, 14 Jan 2017 15:39:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFdmSR027415; Sat, 14 Jan 2017 15:39:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFdkRh027395; Sat, 14 Jan 2017 15:39:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141539.v0EFdkRh027395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312183 - in vendor/lldb/dist: . cmake/modules include/lldb/Core include/lldb/Symbol packages/Python/lldbsuite/test packages/Python/lldbsuite/test/lang/c/register_variables packages/Pyt... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:39:49 -0000 Author: dim Date: Sat Jan 14 15:39:46 2017 New Revision: 312183 URL: https://svnweb.freebsd.org/changeset/base/312183 Log: Vendor import of lldb release_40 branch r292009: https://llvm.org/svn/llvm-project/lldb/branches/release_40@292009 Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lldbdwarf.py (contents, props changed) vendor/lldb/dist/unittests/Core/ErrorTest.cpp (contents, props changed) vendor/lldb/dist/unittests/Symbol/TestType.cpp (contents, props changed) Modified: vendor/lldb/dist/CMakeLists.txt vendor/lldb/dist/cmake/modules/LLDBStandalone.cmake vendor/lldb/dist/include/lldb/Core/Error.h vendor/lldb/dist/include/lldb/Symbol/Type.h vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py vendor/lldb/dist/scripts/Xcode/build-llvm.py vendor/lldb/dist/source/Core/Module.cpp vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp vendor/lldb/dist/source/Symbol/ClangASTContext.cpp vendor/lldb/dist/source/Symbol/Type.cpp vendor/lldb/dist/source/Symbol/TypeList.cpp vendor/lldb/dist/source/Symbol/TypeMap.cpp vendor/lldb/dist/tools/lldb-server/CMakeLists.txt vendor/lldb/dist/unittests/Core/CMakeLists.txt vendor/lldb/dist/unittests/Symbol/CMakeLists.txt Modified: vendor/lldb/dist/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/CMakeLists.txt Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/CMakeLists.txt Sat Jan 14 15:39:46 2017 (r312183) @@ -28,7 +28,7 @@ if (NOT LLDB_DISABLE_PYTHON) # Don't set -m when building the framework. set(FINISH_EXTRA_ARGS "-m") endif() - set(LLDB_WRAP_PYTHON ${LLDB_PYTHON_TARGET_DIR}/LLDBWrapPython.cpp) + set(LLDB_WRAP_PYTHON ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp) add_subdirectory(scripts) endif () Modified: vendor/lldb/dist/cmake/modules/LLDBStandalone.cmake ============================================================================== --- vendor/lldb/dist/cmake/modules/LLDBStandalone.cmake Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/cmake/modules/LLDBStandalone.cmake Sat Jan 14 15:39:46 2017 (r312183) @@ -21,7 +21,8 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR "--libdir" "--includedir" "--prefix" - "--src-root") + "--src-root" + "--cmakedir") execute_process( COMMAND ${CONFIG_COMMAND} RESULT_VARIABLE HAD_ERROR @@ -47,6 +48,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR list(GET CONFIG_OUTPUT 3 INCLUDE_DIR) list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT) list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR) + list(GET CONFIG_OUTPUT 6 LLVM_CMAKE_PATH) if(NOT MSVC_IDE) set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS} @@ -65,7 +67,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) - set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") if(EXISTS ${LLVMCONFIG_FILE}) list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") Modified: vendor/lldb/dist/include/lldb/Core/Error.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Error.h Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/include/lldb/Core/Error.h Sat Jan 14 15:39:46 2017 (r312183) @@ -12,6 +12,7 @@ #if defined(__cplusplus) #include "llvm/Support/DataTypes.h" +#include "llvm/Support/FormatVariadic.h" #include #include @@ -300,5 +301,15 @@ protected: } // namespace lldb_private +namespace llvm { +template <> struct format_provider { + static void format(const lldb_private::Error &error, llvm::raw_ostream &OS, + llvm::StringRef Options) { + llvm::format_provider::format(error.AsCString(), OS, + Options); + } +}; +} + #endif // #if defined(__cplusplus) #endif // #ifndef __DCError_h__ Modified: vendor/lldb/dist/include/lldb/Symbol/Type.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/Type.h Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/include/lldb/Symbol/Type.h Sat Jan 14 15:39:46 2017 (r312183) @@ -201,8 +201,9 @@ public: // From a fully qualified typename, split the type into the type basename // and the remaining type scope (namespaces/classes). - static bool GetTypeScopeAndBasename(const char *&name_cstr, - std::string &scope, std::string &basename, + static bool GetTypeScopeAndBasename(const llvm::StringRef& name, + llvm::StringRef &scope, + llvm::StringRef &basename, lldb::TypeClass &type_class); void SetEncodingType(Type *encoding_type) { m_encoding_type = encoding_type; } Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py Sat Jan 14 15:39:46 2017 (r312183) @@ -101,6 +101,8 @@ class RegisterVariableTestCase(TestBase) @expectedFailureAll(compiler="clang", compiler_version=['<', '3.5']) @expectedFailureAll(compiler="gcc", compiler_version=[ '>=', '4.8.2'], archs=["i386"]) + @expectedFailureAll(compiler="gcc", compiler_version=[ + '<', '4.9'], archs=["x86_64"]) def test_and_run_command(self): """Test expressions on register values.""" Added: vendor/lldb/dist/packages/Python/lldbsuite/test/lldbdwarf.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/lldbdwarf.py Sat Jan 14 15:39:46 2017 (r312183) @@ -0,0 +1,256 @@ +""" This module implement Dwarf expression opcode parser. """ + +import lldb + +# DWARF Expression operators. +DW_OP_addr = 0x03 +DW_OP_deref = 0x06 +DW_OP_const1u = 0x08 +DW_OP_const1s = 0x09 +DW_OP_const2u = 0x0A +DW_OP_const2s = 0x0B +DW_OP_const4u = 0x0C +DW_OP_const4s = 0x0D +DW_OP_const8u = 0x0E +DW_OP_const8s = 0x0F +DW_OP_constu = 0x10 +DW_OP_consts = 0x11 +DW_OP_dup = 0x12 +DW_OP_drop = 0x13 +DW_OP_over = 0x14 +DW_OP_pick = 0x15 +DW_OP_swap = 0x16 +DW_OP_rot = 0x17 +DW_OP_xderef = 0x18 +DW_OP_abs = 0x19 +DW_OP_and = 0x1A +DW_OP_div = 0x1B +DW_OP_minus = 0x1C +DW_OP_mod = 0x1D +DW_OP_mul = 0x1E +DW_OP_neg = 0x1F +DW_OP_not = 0x20 +DW_OP_or = 0x21 +DW_OP_plus = 0x22 +DW_OP_plus_uconst = 0x23 +DW_OP_shl = 0x24 +DW_OP_shr = 0x25 +DW_OP_shra = 0x26 +DW_OP_xor = 0x27 +DW_OP_skip = 0x2F +DW_OP_bra = 0x28 +DW_OP_eq = 0x29 +DW_OP_ge = 0x2A +DW_OP_gt = 0x2B +DW_OP_le = 0x2C +DW_OP_lt = 0x2D +DW_OP_ne = 0x2E +DW_OP_lit0 = 0x30 +DW_OP_lit1 = 0x31 +DW_OP_lit2 = 0x32 +DW_OP_lit3 = 0x33 +DW_OP_lit4 = 0x34 +DW_OP_lit5 = 0x35 +DW_OP_lit6 = 0x36 +DW_OP_lit7 = 0x37 +DW_OP_lit8 = 0x38 +DW_OP_lit9 = 0x39 +DW_OP_lit10 = 0x3A +DW_OP_lit11 = 0x3B +DW_OP_lit12 = 0x3C +DW_OP_lit13 = 0x3D +DW_OP_lit14 = 0x3E +DW_OP_lit15 = 0x3F +DW_OP_lit16 = 0x40 +DW_OP_lit17 = 0x41 +DW_OP_lit18 = 0x42 +DW_OP_lit19 = 0x43 +DW_OP_lit20 = 0x44 +DW_OP_lit21 = 0x45 +DW_OP_lit22 = 0x46 +DW_OP_lit23 = 0x47 +DW_OP_lit24 = 0x48 +DW_OP_lit25 = 0x49 +DW_OP_lit26 = 0x4A +DW_OP_lit27 = 0x4B +DW_OP_lit28 = 0x4C +DW_OP_lit29 = 0x4D +DW_OP_lit30 = 0x4E +DW_OP_lit31 = 0x4F +DW_OP_reg0 = 0x50 +DW_OP_reg1 = 0x51 +DW_OP_reg2 = 0x52 +DW_OP_reg3 = 0x53 +DW_OP_reg4 = 0x54 +DW_OP_reg5 = 0x55 +DW_OP_reg6 = 0x56 +DW_OP_reg7 = 0x57 +DW_OP_reg8 = 0x58 +DW_OP_reg9 = 0x59 +DW_OP_reg10 = 0x5A +DW_OP_reg11 = 0x5B +DW_OP_reg12 = 0x5C +DW_OP_reg13 = 0x5D +DW_OP_reg14 = 0x5E +DW_OP_reg15 = 0x5F +DW_OP_reg16 = 0x60 +DW_OP_reg17 = 0x61 +DW_OP_reg18 = 0x62 +DW_OP_reg19 = 0x63 +DW_OP_reg20 = 0x64 +DW_OP_reg21 = 0x65 +DW_OP_reg22 = 0x66 +DW_OP_reg23 = 0x67 +DW_OP_reg24 = 0x68 +DW_OP_reg25 = 0x69 +DW_OP_reg26 = 0x6A +DW_OP_reg27 = 0x6B +DW_OP_reg28 = 0x6C +DW_OP_reg29 = 0x6D +DW_OP_reg30 = 0x6E +DW_OP_reg31 = 0x6F +DW_OP_breg0 = 0x70 +DW_OP_breg1 = 0x71 +DW_OP_breg2 = 0x72 +DW_OP_breg3 = 0x73 +DW_OP_breg4 = 0x74 +DW_OP_breg5 = 0x75 +DW_OP_breg6 = 0x76 +DW_OP_breg7 = 0x77 +DW_OP_breg8 = 0x78 +DW_OP_breg9 = 0x79 +DW_OP_breg10 = 0x7A +DW_OP_breg11 = 0x7B +DW_OP_breg12 = 0x7C +DW_OP_breg13 = 0x7D +DW_OP_breg14 = 0x7E +DW_OP_breg15 = 0x7F +DW_OP_breg16 = 0x80 +DW_OP_breg17 = 0x81 +DW_OP_breg18 = 0x82 +DW_OP_breg19 = 0x83 +DW_OP_breg20 = 0x84 +DW_OP_breg21 = 0x85 +DW_OP_breg22 = 0x86 +DW_OP_breg23 = 0x87 +DW_OP_breg24 = 0x88 +DW_OP_breg25 = 0x89 +DW_OP_breg26 = 0x8A +DW_OP_breg27 = 0x8B +DW_OP_breg28 = 0x8C +DW_OP_breg29 = 0x8D +DW_OP_breg30 = 0x8E +DW_OP_breg31 = 0x8F +DW_OP_regx = 0x90 +DW_OP_fbreg = 0x91 +DW_OP_bregx = 0x92 +DW_OP_piece = 0x93 +DW_OP_deref_size = 0x94 +DW_OP_xderef_size = 0x95 +DW_OP_nop = 0x96 +DW_OP_push_object_address = 0x97 +DW_OP_call2 = 0x98 +DW_OP_call4 = 0x99 +DW_OP_call_ref = 0x9A +DW_OP_form_tls_address = 0x9B +DW_OP_call_frame_cfa = 0x9C +DW_OP_bit_piece = 0x9D +DW_OP_implicit_value = 0x9E +DW_OP_stack_value = 0x9F +DW_OP_lo_user = 0xE0 +DW_OP_GNU_push_tls_address = 0xE0 +DW_OP_APPLE_uninit = 0xF0 +DW_OP_hi_user = 0xFF + + +class DwarfOpcodeParser(object): + + def updateRegInfoBitsize(self, reg_info, byte_order): + """ Update the regInfo bit size. """ + + # Evaluate Dwarf Expression + expr_result = self.evaluateDwarfExpression(reg_info["dynamic_size_dwarf_expr_bytes"], + byte_order) + + if expr_result == 0: + reg_info["bitsize"] = 32 + elif expr_result == 1: + reg_info["bitsize"] = 64 + + + def evaluateDwarfExpression(self, dwarf_opcode, byte_order): + """Evaluate Dwarf Expression. """ + + dwarf_opcode = [dwarf_opcode[i:i+2] for i in range(0,len(dwarf_opcode),2)] + dwarf_data = [] + for index in range(len(dwarf_opcode)): + + if index < len(dwarf_opcode): + val = int(dwarf_opcode[index], 16) + else: + break + + if val == DW_OP_regx: + # Read register number + self.assertTrue(len(dwarf_opcode) > (index + 1)) + reg_no = int(dwarf_opcode.pop(index + 1), 16) + + self.reset_test_sequence() + # Read register value + self.test_sequence.add_log_lines( + ["read packet: $p{0:x}#00".format(reg_no), + {"direction": "send", "regex": r"^\$([0-9a-fA-F]+)#", + "capture": {1: "p_response"}}],True) + + Context = self.expect_gdbremote_sequence() + self.assertIsNotNone(Context) + p_response = Context.get("p_response") + self.assertIsNotNone(p_response) + + if byte_order == lldb.eByteOrderLittle: + # In case of little endian + # first decode the HEX ASCII bytes and then reverse it + # to get actual value of SR register + p_response = "".join(reversed([p_response[i:i+2] for i in range(0, + len(p_response),2)])) + # Push register value + dwarf_data.append(int(p_response,16)) + + elif val == DW_OP_lit1: + # Push literal 1 + dwarf_data.append(1) + + elif val == DW_OP_lit26: + # Push literal 26 + dwarf_data.append(26) + + elif val == DW_OP_shl: + # left shift and push the result back + self.assertTrue(len(dwarf_data) > 1) + shift_amount = dwarf_data.pop() + val_to_shift = dwarf_data.pop() + result = val_to_shift << shift_amount + dwarf_data.append(result) + + elif val == DW_OP_shr: + # Right shift and push the result back + self.assertTrue(len(dwarf_data) > 1) + shift_amount = dwarf_data.pop() + val_to_shift = dwarf_data.pop() + result = val_to_shift >> shift_amount + dwarf_data.append(result) + + elif val == DW_OP_and: + # And of topmost 2 elements and push the result back + first_ele = dwarf_data.pop() + second_ele = dwarf_data.pop() + result = first_ele & second_ele + dwarf_data.append(result) + + else: + self.assertTrue(False and "Unprocess Dwarf Opcode") + + self.assertTrue(len(dwarf_data) == 1) + expr_result = dwarf_data.pop() + return expr_result + Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py ============================================================================== --- vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py Sat Jan 14 15:39:46 2017 (r312183) @@ -20,10 +20,11 @@ import platform import signal from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * +from lldbsuite.test.lldbdwarf import * from lldbsuite.test import lldbutil -class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): +class LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcodeParser): mydir = TestBase.compute_mydir(__file__) @@ -541,6 +542,10 @@ class LldbGdbServerTestCase(gdbremote_te self.assertIsNotNone(reg_infos) self.assertTrue(len(reg_infos) > 0) + inferior_exe_path = os.path.abspath("a.out") + Target = self.dbg.CreateTarget(inferior_exe_path) + byte_order = Target.GetByteOrder() + # Read value for each register. reg_index = 0 for reg_info in reg_infos: @@ -565,6 +570,9 @@ class LldbGdbServerTestCase(gdbremote_te # Verify the response length. p_response = context.get("p_response") self.assertIsNotNone(p_response) + + if "dynamic_size_dwarf_expr_bytes" in reg_info: + self.updateRegInfoBitsize(reg_info, byte_order) self.assertEqual(len(p_response), 2 * int(reg_info["bitsize"]) / 8) # Increment loop Modified: vendor/lldb/dist/scripts/Xcode/build-llvm.py ============================================================================== --- vendor/lldb/dist/scripts/Xcode/build-llvm.py Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/scripts/Xcode/build-llvm.py Sat Jan 14 15:39:46 2017 (r312183) @@ -22,12 +22,12 @@ def LLVM_HASH_INCLUDES_DIFFS(): def LLVM_REF(): - llvm_ref = "master" + llvm_ref = "release_40" return llvm_ref def CLANG_REF(): - clang_ref = "master" + clang_ref = "release_40" return clang_ref # For use with Xcode-style builds Modified: vendor/lldb/dist/source/Core/Module.cpp ============================================================================== --- vendor/lldb/dist/source/Core/Module.cpp Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/source/Core/Module.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -995,8 +995,8 @@ size_t Module::FindTypes( TypeList &types) { size_t num_matches = 0; const char *type_name_cstr = name.GetCString(); - std::string type_scope; - std::string type_basename; + llvm::StringRef type_scope; + llvm::StringRef type_basename; const bool append = true; TypeClass type_class = eTypeClassAny; TypeMap typesmap; @@ -1006,13 +1006,9 @@ size_t Module::FindTypes( // from the root namespace and implies and exact match. The typenames we // get back from clang do not start with "::" so we need to strip this off // in order to get the qualified names to match + exact_match = type_scope.consume_front("::"); - if (type_scope.size() >= 2 && type_scope[0] == ':' && - type_scope[1] == ':') { - type_scope.erase(0, 2); - exact_match = true; - } - ConstString type_basename_const_str(type_basename.c_str()); + ConstString type_basename_const_str(type_basename); if (FindTypes_Impl(sc, type_basename_const_str, nullptr, append, max_matches, searched_symbol_files, typesmap)) { typesmap.RemoveMismatchedTypes(type_scope, type_basename, type_class, Modified: vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -346,8 +346,7 @@ bool ASTResultSynthesizer::SynthesizeBod ExprResult address_of_expr = m_sema->CreateBuiltinUnaryOp(SourceLocation(), UO_AddrOf, last_expr); if (address_of_expr.get()) - m_sema->AddInitializerToDecl(result_decl, address_of_expr.get(), true, - false); + m_sema->AddInitializerToDecl(result_decl, address_of_expr.get(), true); else return false; } else { @@ -359,7 +358,7 @@ bool ASTResultSynthesizer::SynthesizeBod if (!result_decl) return false; - m_sema->AddInitializerToDecl(result_decl, last_expr, true, false); + m_sema->AddInitializerToDecl(result_decl, last_expr, true); } DC->addDecl(result_decl); Modified: vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -206,7 +206,8 @@ CreateStackTrace(ValueObjectSP o, StructuredData::Array *trace = new StructuredData::Array(); ValueObjectSP trace_value_object = o->GetValueForExpressionPath(trace_item_name.c_str()); - for (int j = 0; j < 8; j++) { + size_t count = trace_value_object->GetNumChildren(); + for (size_t j = 0; j < count; j++) { addr_t trace_addr = trace_value_object->GetChildAtIndex(j, true)->GetValueAsUnsigned(0); if (trace_addr == 0) Modified: vendor/lldb/dist/source/Symbol/ClangASTContext.cpp ============================================================================== --- vendor/lldb/dist/source/Symbol/ClangASTContext.cpp Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/source/Symbol/ClangASTContext.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -1528,8 +1528,7 @@ ClassTemplateDecl *ClangASTContext::Crea *ast, decl_ctx, // What decl context do we use here? TU? The actual decl // context? - SourceLocation(), decl_name, template_param_list, template_cxx_decl, - nullptr); + SourceLocation(), decl_name, template_param_list, template_cxx_decl); if (class_template_decl) { if (access_type != eAccessNone) Modified: vendor/lldb/dist/source/Symbol/Type.cpp ============================================================================== --- vendor/lldb/dist/source/Symbol/Type.cpp Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/source/Symbol/Type.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -620,50 +620,59 @@ ConstString Type::GetQualifiedName() { return GetForwardCompilerType().GetConstTypeName(); } -bool Type::GetTypeScopeAndBasename(const char *&name_cstr, std::string &scope, - std::string &basename, +bool Type::GetTypeScopeAndBasename(const llvm::StringRef& name, + llvm::StringRef &scope, + llvm::StringRef &basename, TypeClass &type_class) { - // Protect against null c string. - type_class = eTypeClassAny; - if (name_cstr && name_cstr[0]) { - llvm::StringRef name_strref(name_cstr); - if (name_strref.startswith("struct ")) { - name_cstr += 7; - type_class = eTypeClassStruct; - } else if (name_strref.startswith("class ")) { - name_cstr += 6; - type_class = eTypeClassClass; - } else if (name_strref.startswith("union ")) { - name_cstr += 6; - type_class = eTypeClassUnion; - } else if (name_strref.startswith("enum ")) { - name_cstr += 5; - type_class = eTypeClassEnumeration; - } else if (name_strref.startswith("typedef ")) { - name_cstr += 8; - type_class = eTypeClassTypedef; - } - const char *basename_cstr = name_cstr; - const char *namespace_separator = ::strstr(basename_cstr, "::"); - if (namespace_separator) { - const char *template_arg_char = ::strchr(basename_cstr, '<'); - while (namespace_separator != nullptr) { - if (template_arg_char && - namespace_separator > template_arg_char) // but namespace'd template - // arguments are still good - // to go - break; - basename_cstr = namespace_separator + 2; - namespace_separator = strstr(basename_cstr, "::"); - } - if (basename_cstr > name_cstr) { - scope.assign(name_cstr, basename_cstr - name_cstr); - basename.assign(basename_cstr); - return true; + if (name.empty()) + return false; + + basename = name; + if (basename.consume_front("struct ")) + type_class = eTypeClassStruct; + else if (basename.consume_front("class ")) + type_class = eTypeClassClass; + else if (basename.consume_front("union ")) + type_class = eTypeClassUnion; + else if (basename.consume_front("enum ")) + type_class = eTypeClassEnumeration; + else if (basename.consume_front("typedef ")) + type_class = eTypeClassTypedef; + + size_t namespace_separator = basename.find("::"); + if (namespace_separator == llvm::StringRef::npos) + return false; + + size_t template_begin = basename.find('<'); + while (namespace_separator != llvm::StringRef::npos) { + if (template_begin != llvm::StringRef::npos && + namespace_separator > template_begin) { + size_t template_depth = 1; + llvm::StringRef template_arg = + basename.drop_front(template_begin + 1); + while (template_depth > 0 && !template_arg.empty()) { + if (template_arg.front() == '<') + template_depth++; + else if (template_arg.front() == '>') + template_depth--; + template_arg = template_arg.drop_front(1); } + if (template_depth != 0) + return false; // We have an invalid type name. Bail out. + if (template_arg.empty()) + break; // The template ends at the end of the full name. + basename = template_arg; + } else { + basename = basename.drop_front(namespace_separator + 2); } + template_begin = basename.find('<'); + namespace_separator = basename.find("::"); + } + if (basename.size() < name.size()) { + scope = name.take_front(name.size() - basename.size()); + return true; } return false; } Modified: vendor/lldb/dist/source/Symbol/TypeList.cpp ============================================================================== --- vendor/lldb/dist/source/Symbol/TypeList.cpp Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/source/Symbol/TypeList.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -108,13 +108,13 @@ void TypeList::Dump(Stream *s, bool show void TypeList::RemoveMismatchedTypes(const char *qualified_typename, bool exact_match) { - std::string type_scope; - std::string type_basename; + llvm::StringRef type_scope; + llvm::StringRef type_basename; TypeClass type_class = eTypeClassAny; if (!Type::GetTypeScopeAndBasename(qualified_typename, type_scope, type_basename, type_class)) { type_basename = qualified_typename; - type_scope.clear(); + type_scope = ""; } return RemoveMismatchedTypes(type_scope, type_basename, type_class, exact_match); @@ -145,8 +145,8 @@ void TypeList::RemoveMismatchedTypes(con ConstString match_type_name_const_str(the_type->GetQualifiedName()); if (match_type_name_const_str) { const char *match_type_name = match_type_name_const_str.GetCString(); - std::string match_type_scope; - std::string match_type_basename; + llvm::StringRef match_type_scope; + llvm::StringRef match_type_basename; if (Type::GetTypeScopeAndBasename(match_type_name, match_type_scope, match_type_basename, match_type_class)) { Modified: vendor/lldb/dist/source/Symbol/TypeMap.cpp ============================================================================== --- vendor/lldb/dist/source/Symbol/TypeMap.cpp Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/source/Symbol/TypeMap.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -152,13 +152,13 @@ void TypeMap::Dump(Stream *s, bool show_ void TypeMap::RemoveMismatchedTypes(const char *qualified_typename, bool exact_match) { - std::string type_scope; - std::string type_basename; + llvm::StringRef type_scope; + llvm::StringRef type_basename; TypeClass type_class = eTypeClassAny; if (!Type::GetTypeScopeAndBasename(qualified_typename, type_scope, type_basename, type_class)) { type_basename = qualified_typename; - type_scope.clear(); + type_scope = ""; } return RemoveMismatchedTypes(type_scope, type_basename, type_class, exact_match); @@ -189,8 +189,8 @@ void TypeMap::RemoveMismatchedTypes(cons ConstString match_type_name_const_str(the_type->GetQualifiedName()); if (match_type_name_const_str) { const char *match_type_name = match_type_name_const_str.GetCString(); - std::string match_type_scope; - std::string match_type_basename; + llvm::StringRef match_type_scope; + llvm::StringRef match_type_basename; if (Type::GetTypeScopeAndBasename(match_type_name, match_type_scope, match_type_basename, match_type_class)) { Modified: vendor/lldb/dist/tools/lldb-server/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/tools/lldb-server/CMakeLists.txt Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/tools/lldb-server/CMakeLists.txt Sat Jan 14 15:39:46 2017 (r312183) @@ -183,7 +183,13 @@ else() target_link_libraries(lldb-server ${LLDB_USED_LIBS}) target_link_libraries(lldb-server ${CLANG_USED_LIBS}) endif() -llvm_config(lldb-server ${LLVM_LINK_COMPONENTS}) +if(NOT LLVM_LINK_LLVM_DYLIB) + # This is necessary in !LLVM_LINK_LLVM_DYLIB as LLDB's libs do not track their + # dependencies properly. It is conditional because in a LLVM_LINK_LLVM_DYLIB + # build it would introduce duplicate symbols (add_lldb_tool links to libLLVM, + # and this would add the individual .a files as well). + llvm_config(lldb-server ${LLVM_LINK_COMPONENTS}) +endif() target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS}) Modified: vendor/lldb/dist/unittests/Core/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/unittests/Core/CMakeLists.txt Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/unittests/Core/CMakeLists.txt Sat Jan 14 15:39:46 2017 (r312183) @@ -2,6 +2,7 @@ add_lldb_unittest(LLDBCoreTests ArchSpecTest.cpp BroadcasterTest.cpp DataExtractorTest.cpp + ErrorTest.cpp ListenerTest.cpp ScalarTest.cpp StructuredDataTest.cpp Added: vendor/lldb/dist/unittests/Core/ErrorTest.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/unittests/Core/ErrorTest.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -0,0 +1,19 @@ +//===-- ErrorTest.cpp -------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "gtest/gtest.h" +#include "lldb/Core/Error.h" + +using namespace lldb_private; + +TEST(ErrorTest, Formatv) { + EXPECT_EQ("", llvm::formatv("{0}", Error()).str()); + EXPECT_EQ("Hello Error", llvm::formatv("{0}", Error("Hello Error")).str()); + EXPECT_EQ("Hello", llvm::formatv("{0:5}", Error("Hello Error")).str()); +} Modified: vendor/lldb/dist/unittests/Symbol/CMakeLists.txt ============================================================================== --- vendor/lldb/dist/unittests/Symbol/CMakeLists.txt Sat Jan 14 15:39:30 2017 (r312182) +++ vendor/lldb/dist/unittests/Symbol/CMakeLists.txt Sat Jan 14 15:39:46 2017 (r312183) @@ -1,3 +1,4 @@ add_lldb_unittest(SymbolTests TestClangASTContext.cpp + TestType.cpp ) Added: vendor/lldb/dist/unittests/Symbol/TestType.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/unittests/Symbol/TestType.cpp Sat Jan 14 15:39:46 2017 (r312183) @@ -0,0 +1,51 @@ +//===-- TestType.cpp --------------------------------------------*- C++ -*-===// +// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "gtest/gtest.h" + +#include "lldb/Symbol/Type.h" + +using namespace lldb; +using namespace lldb_private; + +namespace { +void TestGetTypeScopeAndBasenameHelper(const char *full_type, + bool expected_is_scoped, + const char *expected_scope, + const char *expected_name) { + llvm::StringRef scope, name; + lldb::TypeClass type_class; + bool is_scoped = + Type::GetTypeScopeAndBasename(full_type, scope, name, type_class); + EXPECT_EQ(is_scoped, expected_is_scoped); + if (expected_is_scoped) { + EXPECT_EQ(scope, expected_scope); + EXPECT_EQ(name, expected_name); + } +} +}; + +TEST(Type, GetTypeScopeAndBasename) { + TestGetTypeScopeAndBasenameHelper("int", false, "", ""); + TestGetTypeScopeAndBasenameHelper("std::string", true, "std::", "string"); + TestGetTypeScopeAndBasenameHelper("std::set", true, "std::", "set"); + TestGetTypeScopeAndBasenameHelper("std::set>", true, + "std::", "set>"); + TestGetTypeScopeAndBasenameHelper("std::string::iterator", true, + "std::string::", "iterator"); + TestGetTypeScopeAndBasenameHelper("std::set::iterator", true, + "std::set::", "iterator"); + TestGetTypeScopeAndBasenameHelper( + "std::set>::iterator", true, + "std::set>::", "iterator"); + TestGetTypeScopeAndBasenameHelper( + "std::set>::iterator", true, + "std::set>::", "iterator"); +} From owner-svn-src-vendor@freebsd.org Sat Jan 14 15:39:52 2017 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B81DCAFDA1; Sat, 14 Jan 2017 15:39:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14FB8104E; Sat, 14 Jan 2017 15:39:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0EFdpss027462; Sat, 14 Jan 2017 15:39:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0EFdpqR027461; Sat, 14 Jan 2017 15:39:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701141539.v0EFdpqR027461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Jan 2017 15:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312184 - vendor/lldb/lldb-release_40-r292009 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 15:39:52 -0000 Author: dim Date: Sat Jan 14 15:39:51 2017 New Revision: 312184 URL: https://svnweb.freebsd.org/changeset/base/312184 Log: Tag lldb release_40 branch r292009. Added: vendor/lldb/lldb-release_40-r292009/ - copied from r312183, vendor/lldb/dist/