From owner-svn-src-vendor@freebsd.org Mon Jun 22 22:42:21 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF38633EAC4; Mon, 22 Jun 2020 22:42:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rPYT5M7Yz4X71; Mon, 22 Jun 2020 22:42:21 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2B6C1597A; Mon, 22 Jun 2020 22:42:21 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MMgLZx096950; Mon, 22 Jun 2020 22:42:21 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MMgKLg096944; Mon, 22 Jun 2020 22:42:20 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202006222242.05MMgKLg096944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 22 Jun 2020 22:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362513 - in vendor/byacc/dist: . package package/debian package/pkgsrc test test/btyacc test/yacc X-SVN-Group: vendor X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor/byacc/dist: . package package/debian package/pkgsrc test test/btyacc test/yacc X-SVN-Commit-Revision: 362513 X-SVN-Commit-Repository: base 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.33 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, 22 Jun 2020 22:42:21 -0000 Author: jkim Date: Mon Jun 22 22:42:20 2020 New Revision: 362513 URL: https://svnweb.freebsd.org/changeset/base/362513 Log: Import byacc 20200330. Added: vendor/byacc/dist/test/btyacc/calc_code_all.error vendor/byacc/dist/test/btyacc/calc_code_all.output vendor/byacc/dist/test/btyacc/calc_code_all.tab.c vendor/byacc/dist/test/btyacc/calc_code_all.tab.h vendor/byacc/dist/test/btyacc/calc_code_default.error vendor/byacc/dist/test/btyacc/calc_code_default.output vendor/byacc/dist/test/btyacc/calc_code_default.tab.c vendor/byacc/dist/test/btyacc/calc_code_default.tab.h vendor/byacc/dist/test/btyacc/calc_code_imports.error vendor/byacc/dist/test/btyacc/calc_code_imports.output vendor/byacc/dist/test/btyacc/calc_code_imports.tab.c vendor/byacc/dist/test/btyacc/calc_code_imports.tab.h vendor/byacc/dist/test/btyacc/calc_code_provides.error vendor/byacc/dist/test/btyacc/calc_code_provides.output vendor/byacc/dist/test/btyacc/calc_code_provides.tab.c vendor/byacc/dist/test/btyacc/calc_code_provides.tab.h vendor/byacc/dist/test/btyacc/calc_code_requires.error vendor/byacc/dist/test/btyacc/calc_code_requires.output vendor/byacc/dist/test/btyacc/calc_code_requires.tab.c vendor/byacc/dist/test/btyacc/calc_code_requires.tab.h vendor/byacc/dist/test/btyacc/calc_code_top.error vendor/byacc/dist/test/btyacc/calc_code_top.output vendor/byacc/dist/test/btyacc/calc_code_top.tab.c vendor/byacc/dist/test/btyacc/calc_code_top.tab.h vendor/byacc/dist/test/btyacc/defines1.calc.c vendor/byacc/dist/test/btyacc/defines1.calc.h vendor/byacc/dist/test/btyacc/defines1.error vendor/byacc/dist/test/btyacc/defines1.output vendor/byacc/dist/test/btyacc/defines2.calc.c vendor/byacc/dist/test/btyacc/defines2.calc.h vendor/byacc/dist/test/btyacc/defines2.error vendor/byacc/dist/test/btyacc/defines2.output vendor/byacc/dist/test/btyacc/defines3.calc.c vendor/byacc/dist/test/btyacc/defines3.calc.h vendor/byacc/dist/test/btyacc/defines3.error vendor/byacc/dist/test/btyacc/defines3.output vendor/byacc/dist/test/btyacc/stdin1.calc.c vendor/byacc/dist/test/btyacc/stdin1.error vendor/byacc/dist/test/btyacc/stdin1.output vendor/byacc/dist/test/btyacc/stdin2.calc.c vendor/byacc/dist/test/btyacc/stdin2.error vendor/byacc/dist/test/btyacc/stdin2.output vendor/byacc/dist/test/calc.tab.c vendor/byacc/dist/test/calc_code_all.y vendor/byacc/dist/test/calc_code_default.y vendor/byacc/dist/test/calc_code_imports.y vendor/byacc/dist/test/calc_code_provides.y vendor/byacc/dist/test/calc_code_requires.y vendor/byacc/dist/test/calc_code_top.y vendor/byacc/dist/test/yacc/calc_code_all.error vendor/byacc/dist/test/yacc/calc_code_all.output vendor/byacc/dist/test/yacc/calc_code_all.tab.c vendor/byacc/dist/test/yacc/calc_code_all.tab.h vendor/byacc/dist/test/yacc/calc_code_default.error vendor/byacc/dist/test/yacc/calc_code_default.output vendor/byacc/dist/test/yacc/calc_code_default.tab.c vendor/byacc/dist/test/yacc/calc_code_default.tab.h vendor/byacc/dist/test/yacc/calc_code_imports.error vendor/byacc/dist/test/yacc/calc_code_imports.output vendor/byacc/dist/test/yacc/calc_code_imports.tab.c vendor/byacc/dist/test/yacc/calc_code_imports.tab.h vendor/byacc/dist/test/yacc/calc_code_provides.error vendor/byacc/dist/test/yacc/calc_code_provides.output vendor/byacc/dist/test/yacc/calc_code_provides.tab.c vendor/byacc/dist/test/yacc/calc_code_provides.tab.h vendor/byacc/dist/test/yacc/calc_code_requires.error vendor/byacc/dist/test/yacc/calc_code_requires.output vendor/byacc/dist/test/yacc/calc_code_requires.tab.c vendor/byacc/dist/test/yacc/calc_code_requires.tab.h vendor/byacc/dist/test/yacc/calc_code_top.error vendor/byacc/dist/test/yacc/calc_code_top.output vendor/byacc/dist/test/yacc/calc_code_top.tab.c vendor/byacc/dist/test/yacc/calc_code_top.tab.h vendor/byacc/dist/test/yacc/defines1.calc.c vendor/byacc/dist/test/yacc/defines1.calc.h vendor/byacc/dist/test/yacc/defines1.error vendor/byacc/dist/test/yacc/defines1.output vendor/byacc/dist/test/yacc/defines2.calc.c vendor/byacc/dist/test/yacc/defines2.calc.h vendor/byacc/dist/test/yacc/defines2.error vendor/byacc/dist/test/yacc/defines2.output vendor/byacc/dist/test/yacc/defines3.calc.c vendor/byacc/dist/test/yacc/defines3.calc.h vendor/byacc/dist/test/yacc/defines3.error vendor/byacc/dist/test/yacc/defines3.output vendor/byacc/dist/test/yacc/stdin1.calc.c vendor/byacc/dist/test/yacc/stdin1.error vendor/byacc/dist/test/yacc/stdin1.output vendor/byacc/dist/test/yacc/stdin2.calc.c vendor/byacc/dist/test/yacc/stdin2.error vendor/byacc/dist/test/yacc/stdin2.output Deleted: vendor/byacc/dist/test/btyacc/btyacc_demo2.error vendor/byacc/dist/test/btyacc/btyacc_demo2.output vendor/byacc/dist/test/btyacc/btyacc_demo2.tab.c vendor/byacc/dist/test/btyacc/btyacc_demo2.tab.h vendor/byacc/dist/test/btyacc/code_debug.c vendor/byacc/dist/test/btyacc/code_debug.error vendor/byacc/dist/test/btyacc/code_debug.h vendor/byacc/dist/test/btyacc/code_debug.i vendor/byacc/dist/test/btyacc/code_debug.output Modified: vendor/byacc/dist/CHANGES vendor/byacc/dist/MANIFEST vendor/byacc/dist/VERSION vendor/byacc/dist/aclocal.m4 vendor/byacc/dist/btyaccpar.c vendor/byacc/dist/btyaccpar.skel vendor/byacc/dist/config.guess vendor/byacc/dist/config.sub vendor/byacc/dist/config_h.in vendor/byacc/dist/configure vendor/byacc/dist/configure.in vendor/byacc/dist/defs.h vendor/byacc/dist/main.c vendor/byacc/dist/mkpar.c vendor/byacc/dist/mstring.c vendor/byacc/dist/output.c vendor/byacc/dist/package/byacc.spec vendor/byacc/dist/package/debian/changelog vendor/byacc/dist/package/debian/control vendor/byacc/dist/package/debian/copyright vendor/byacc/dist/package/debian/rules vendor/byacc/dist/package/debian/watch vendor/byacc/dist/package/mingw-byacc.spec vendor/byacc/dist/package/pkgsrc/Makefile vendor/byacc/dist/reader.c vendor/byacc/dist/test/btyacc/big_b.error vendor/byacc/dist/test/btyacc/big_b.output vendor/byacc/dist/test/btyacc/big_l.error vendor/byacc/dist/test/btyacc/big_l.output vendor/byacc/dist/test/btyacc/btyacc_calc1.tab.c vendor/byacc/dist/test/btyacc/btyacc_calc1.tab.h vendor/byacc/dist/test/btyacc/btyacc_demo.tab.c vendor/byacc/dist/test/btyacc/btyacc_demo.tab.h vendor/byacc/dist/test/btyacc/btyacc_destroy1.tab.c vendor/byacc/dist/test/btyacc/btyacc_destroy2.tab.c vendor/byacc/dist/test/btyacc/btyacc_destroy3.tab.c vendor/byacc/dist/test/btyacc/calc.tab.c vendor/byacc/dist/test/btyacc/calc1.tab.c vendor/byacc/dist/test/btyacc/calc2.tab.c vendor/byacc/dist/test/btyacc/calc3.tab.c vendor/byacc/dist/test/btyacc/code_calc.code.c vendor/byacc/dist/test/btyacc/code_error.code.c vendor/byacc/dist/test/btyacc/empty.tab.c vendor/byacc/dist/test/btyacc/err_inherit3.tab.c vendor/byacc/dist/test/btyacc/err_inherit4.tab.c vendor/byacc/dist/test/btyacc/err_inherit4.tab.h vendor/byacc/dist/test/btyacc/err_syntax10.tab.c vendor/byacc/dist/test/btyacc/err_syntax11.tab.c vendor/byacc/dist/test/btyacc/err_syntax12.tab.c vendor/byacc/dist/test/btyacc/err_syntax18.tab.c vendor/byacc/dist/test/btyacc/err_syntax20.tab.c vendor/byacc/dist/test/btyacc/error.tab.c vendor/byacc/dist/test/btyacc/expr.oxout.tab.c vendor/byacc/dist/test/btyacc/grammar.tab.c vendor/byacc/dist/test/btyacc/help.error vendor/byacc/dist/test/btyacc/help.output vendor/byacc/dist/test/btyacc/inherit0.tab.c vendor/byacc/dist/test/btyacc/inherit1.tab.c vendor/byacc/dist/test/btyacc/inherit2.tab.c vendor/byacc/dist/test/btyacc/no_b_opt.error vendor/byacc/dist/test/btyacc/no_b_opt.output vendor/byacc/dist/test/btyacc/no_b_opt1.error vendor/byacc/dist/test/btyacc/no_b_opt1.output vendor/byacc/dist/test/btyacc/no_code_c.error vendor/byacc/dist/test/btyacc/no_code_c.output vendor/byacc/dist/test/btyacc/no_defines.error vendor/byacc/dist/test/btyacc/no_defines.output vendor/byacc/dist/test/btyacc/no_graph.error vendor/byacc/dist/test/btyacc/no_graph.output vendor/byacc/dist/test/btyacc/no_include.error vendor/byacc/dist/test/btyacc/no_include.output vendor/byacc/dist/test/btyacc/no_opts.error vendor/byacc/dist/test/btyacc/no_opts.output vendor/byacc/dist/test/btyacc/no_output.error vendor/byacc/dist/test/btyacc/no_output.output vendor/byacc/dist/test/btyacc/no_output1.error vendor/byacc/dist/test/btyacc/no_output1.output vendor/byacc/dist/test/btyacc/no_output2.error vendor/byacc/dist/test/btyacc/no_output2.output vendor/byacc/dist/test/btyacc/no_p_opt.error vendor/byacc/dist/test/btyacc/no_p_opt.output vendor/byacc/dist/test/btyacc/no_p_opt1.error vendor/byacc/dist/test/btyacc/no_p_opt1.output vendor/byacc/dist/test/btyacc/no_verbose.error vendor/byacc/dist/test/btyacc/no_verbose.output vendor/byacc/dist/test/btyacc/nostdin.error vendor/byacc/dist/test/btyacc/nostdin.output vendor/byacc/dist/test/btyacc/ok_syntax1.tab.c vendor/byacc/dist/test/btyacc/ok_syntax1.tab.h vendor/byacc/dist/test/btyacc/pure_calc.tab.c vendor/byacc/dist/test/btyacc/pure_error.tab.c vendor/byacc/dist/test/btyacc/quote_calc-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc.tab.c vendor/byacc/dist/test/btyacc/quote_calc2-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc2.tab.c vendor/byacc/dist/test/btyacc/quote_calc3-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc3.tab.c vendor/byacc/dist/test/btyacc/quote_calc4-s.tab.c vendor/byacc/dist/test/btyacc/quote_calc4.tab.c vendor/byacc/dist/test/btyacc/rename_debug.c vendor/byacc/dist/test/btyacc/rename_debug.i vendor/byacc/dist/test/btyacc/varsyntax_calc1.tab.c vendor/byacc/dist/test/grammar.y vendor/byacc/dist/test/run_make.sh vendor/byacc/dist/test/run_test.sh vendor/byacc/dist/test/yacc/big_b.error vendor/byacc/dist/test/yacc/big_b.output vendor/byacc/dist/test/yacc/big_l.error vendor/byacc/dist/test/yacc/big_l.output vendor/byacc/dist/test/yacc/calc.tab.c vendor/byacc/dist/test/yacc/calc1.tab.c vendor/byacc/dist/test/yacc/calc2.tab.c vendor/byacc/dist/test/yacc/calc3.tab.c vendor/byacc/dist/test/yacc/code_calc.code.c vendor/byacc/dist/test/yacc/code_error.code.c vendor/byacc/dist/test/yacc/empty.tab.c vendor/byacc/dist/test/yacc/err_syntax10.tab.c vendor/byacc/dist/test/yacc/err_syntax11.tab.c vendor/byacc/dist/test/yacc/err_syntax12.tab.c vendor/byacc/dist/test/yacc/err_syntax18.tab.c vendor/byacc/dist/test/yacc/err_syntax20.tab.c vendor/byacc/dist/test/yacc/error.tab.c vendor/byacc/dist/test/yacc/expr.oxout.tab.c vendor/byacc/dist/test/yacc/grammar.tab.c vendor/byacc/dist/test/yacc/help.error vendor/byacc/dist/test/yacc/help.output vendor/byacc/dist/test/yacc/no_b_opt.error vendor/byacc/dist/test/yacc/no_b_opt.output vendor/byacc/dist/test/yacc/no_b_opt1.error vendor/byacc/dist/test/yacc/no_b_opt1.output vendor/byacc/dist/test/yacc/no_code_c.error vendor/byacc/dist/test/yacc/no_code_c.output vendor/byacc/dist/test/yacc/no_defines.error vendor/byacc/dist/test/yacc/no_defines.output vendor/byacc/dist/test/yacc/no_graph.error vendor/byacc/dist/test/yacc/no_graph.output vendor/byacc/dist/test/yacc/no_include.error vendor/byacc/dist/test/yacc/no_include.output vendor/byacc/dist/test/yacc/no_opts.error vendor/byacc/dist/test/yacc/no_opts.output vendor/byacc/dist/test/yacc/no_output.error vendor/byacc/dist/test/yacc/no_output.output vendor/byacc/dist/test/yacc/no_output1.error vendor/byacc/dist/test/yacc/no_output1.output vendor/byacc/dist/test/yacc/no_output2.error vendor/byacc/dist/test/yacc/no_output2.output vendor/byacc/dist/test/yacc/no_p_opt.error vendor/byacc/dist/test/yacc/no_p_opt.output vendor/byacc/dist/test/yacc/no_p_opt1.error vendor/byacc/dist/test/yacc/no_p_opt1.output vendor/byacc/dist/test/yacc/no_verbose.error vendor/byacc/dist/test/yacc/no_verbose.output vendor/byacc/dist/test/yacc/nostdin.error vendor/byacc/dist/test/yacc/nostdin.output vendor/byacc/dist/test/yacc/ok_syntax1.tab.c vendor/byacc/dist/test/yacc/ok_syntax1.tab.h vendor/byacc/dist/test/yacc/pure_calc.tab.c vendor/byacc/dist/test/yacc/pure_error.tab.c vendor/byacc/dist/test/yacc/quote_calc-s.tab.c vendor/byacc/dist/test/yacc/quote_calc.tab.c vendor/byacc/dist/test/yacc/quote_calc2-s.tab.c vendor/byacc/dist/test/yacc/quote_calc2.tab.c vendor/byacc/dist/test/yacc/quote_calc3-s.tab.c vendor/byacc/dist/test/yacc/quote_calc3.tab.c vendor/byacc/dist/test/yacc/quote_calc4-s.tab.c vendor/byacc/dist/test/yacc/quote_calc4.tab.c vendor/byacc/dist/test/yacc/rename_debug.c vendor/byacc/dist/test/yacc/rename_debug.i vendor/byacc/dist/test/yacc/varsyntax_calc1.tab.c vendor/byacc/dist/yacc.1 vendor/byacc/dist/yaccpar.c vendor/byacc/dist/yaccpar.skel Modified: vendor/byacc/dist/CHANGES ============================================================================== --- vendor/byacc/dist/CHANGES Mon Jun 22 21:41:51 2020 (r362512) +++ vendor/byacc/dist/CHANGES Mon Jun 22 22:42:20 2020 (r362513) @@ -1,3 +1,423 @@ +2020-03-30 Thomas E. Dickey + + * package/debian/copyright: bump + + * test/yacc/grammar.tab.c, test/btyacc/grammar.tab.c, test/grammar.y, reader.c: + typo found with codespell + + * yacc.1: fixes noted in the original report, overlooked in followup + +2020-03-30 Bjarni.Ingi.Gislason + + * yacc.1: typography/spelling fixes - Debian #955175 + +2020-03-30 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2020-03-10 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: + resync with my-autoconf, mostly fixes for compiler-warnings + + * configure.in: use macro to suppress X-dependency from newer macros + +2019-12-20 Thomas E. Dickey + + * config.guess: 2019-12-21 + +2019-11-25 Tom.Shields + + * main.c: + fix an inconsistency between the getopt and non-getopt configuration. + In the former, getopt always used "yacc", not the name of the executable. + +2019-11-25 Thomas E. Dickey + + * test/run_make.sh: + suppress bison's -Wyacc warning, which is not useful. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2019-11-19 Thomas E. Dickey + + * yacc.1: new version of manpage + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * yacc.1: document %code + + * test/btyacc/calc_code_all.error, test/btyacc/calc_code_all.output, test/btyacc/calc_code_all.tab.c, test/btyacc/calc_code_all.tab.h, test/btyacc/calc_code_default.error, test/btyacc/calc_code_default.output, test/btyacc/calc_code_default.tab.c, test/btyacc/calc_code_default.tab.h, test/btyacc/calc_code_imports.error, test/btyacc/calc_code_imports.output, test/btyacc/calc_code_imports.tab.c, test/btyacc/calc_code_imports.tab.h, test/btyacc/calc_code_provides.error, test/btyacc/calc_code_provides.output, test/btyacc/calc_code_provides.tab.c, test/btyacc/calc_code_provides.tab.h, test/btyacc/calc_code_requires.error, test/btyacc/calc_code_requires.output, test/btyacc/calc_code_requires.tab.c, test/btyacc/calc_code_requires.tab.h, test/btyacc/calc_code_top.error, test/btyacc/calc_code_top.output, test/btyacc/calc_code_top.tab.c, test/btyacc/calc_code_top.tab.h, test/yacc/calc_code_all.tab.c, test/yacc/calc_code_all.tab.h, test/yacc/calc_code_default.tab.c, test/yacc/calc_code_provide s.tab.c, test/yacc/calc_code_provides.tab.h, test/yacc/calc_code_requires.tab.c, test/yacc/calc_code_requires.tab.h, test/yacc/calc_code_top.tab.c: + RCS_BASE + + * output.c: + amend updates for 'outline' when processing "%code" in code-file + + * output.c: + modify output_code_lines() to show begin/end block comments which were in + reader.c, and to generate a #line for the code-file. + + * reader.c: + modify copy_code() to allow for multiple %code directives for a given + section, recording the input line-number for each directive as a #line + in the resulting string. remove the block start/end comments, since those + will be done for a whole section in output.c + + * mstring.c, defs.h: add msrenew() + + * test/yacc/calc_code_all.error, test/yacc/calc_code_all.output, test/yacc/calc_code_default.error, test/yacc/calc_code_default.output, test/yacc/calc_code_default.tab.h, test/yacc/calc_code_imports.error, test/yacc/calc_code_imports.output, test/yacc/calc_code_imports.tab.c, test/yacc/calc_code_imports.tab.h, test/yacc/calc_code_provides.error, test/yacc/calc_code_provides.output, test/yacc/calc_code_requires.error, test/yacc/calc_code_requires.output, test/yacc/calc_code_top.error, test/yacc/calc_code_top.output, test/yacc/calc_code_top.tab.h: + RCS_BASE + +2019-11-18 Thomas E. Dickey + + * test/calc_code_imports.y, test/calc_code_all.y, test/calc_code_default.y, test/calc_code_top.y, test/calc_code_provides.y, test/calc_code_requires.y: + RCS_BASE + +2019-11-04 Michael.Forney + + * defs.h: add missing "extern" for new variable "code_lines" + +2019-11-03 Thomas E. Dickey + + * main.c: build-fix for MinGW cross-compiling + + * output.c, reader.c: gcc-warnings + + * output.c: check validity of text_file before rewind + remove redundant check of iflag + + * main.c: fix memory-leak reported by clang + + * mkpar.c: guard against a null-reference reported by clang (unlikely) + + * reader.c: fix two coverity warnings: + a) resource leak on malloc-failure + b) possible null-pointer dereference on parse-error + + * test/btyacc/err_inherit4.tab.h, test/btyacc/btyacc_demo.tab.h: regen + + * defs.h: use enum's to simplify recent change + + * mstring.c: + enable mstring() in regular byacc, since Zoulas' change relies upon it + +2019-11-03 Christos.Zoulas + + * defs.h, reader.c, output.c: add support for bison's "%code" feature + also fix a small bug: declare YYLTYPE externally when producing locations + +2019-11-03 Thomas E. Dickey + + * test/btyacc/help.error, test/btyacc/no_b_opt.error, test/btyacc/no_output2.error, test/btyacc/no_p_opt.error, test/yacc/help.error, test/yacc/no_b_opt.error, test/yacc/no_output2.error, test/yacc/no_p_opt.error: + regen + + * test/run_test.sh: + there's no standard wording for the options-errors from getopt; + filter that to "error message" in the test reference files. + + * main.c: + provide for using getopt(), to accommodate a case where developers have + relied upon non-POSIX behavior. + + * test/run_test.sh: + getopt's messages do not print the full pathname of yacc in some cases; + adjust the sed-script which changes those to "YACC" + + * configure: regen + + * config_h.in: regen, using autoheader-252 + + * configure.in: add configure check for getopt + + * configure: regen + + * aclocal.m4: + resync with my-autoconf adds a fix which accommodates a difference in + warning options between gcc/clang when --enable-warnings is not set. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2019-09-11 Thomas E. Dickey + + * config.guess, config.sub: 2019-09-10 + +2019-06-17 Thomas E. Dickey + + * test/btyacc/big_b.error, test/btyacc/big_l.error, test/btyacc/help.error, test/btyacc/no_b_opt.error, test/btyacc/no_output2.error, test/btyacc/no_p_opt.error, test/btyacc/nostdin.error, test/yacc/big_b.error, test/yacc/big_l.error, test/yacc/help.error, test/yacc/no_b_opt.error, test/yacc/no_output2.error, test/yacc/no_p_opt.error, test/yacc/nostdin.error: + regen + + * test/run_test.sh: test "-H" rather than "-D" + +2019-06-16 Thomas E. Dickey + + * main.c, yacc.1: + change "-D" option to "-H" (discussion with Ethan Sommer) + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * test/btyacc/defines1.calc.c, test/btyacc/defines2.calc.c, test/btyacc/defines3.calc.c: + RCS_BASE + + * test/run_test.sh: in test_defines, save the ".c" file too + + * test/yacc/defines3.calc.c, test/yacc/defines2.calc.c, test/yacc/defines1.calc.c: + RCS_BASE + + * test/run_test.sh: + output of test_defines should be a header ".h", not ".c" + + * test/btyacc/defines1.calc.h, test/btyacc/defines1.error, test/btyacc/defines1.output, test/btyacc/defines2.calc.h, test/btyacc/defines2.error, test/btyacc/defines2.output, test/btyacc/defines3.calc.h, test/btyacc/defines3.error, test/btyacc/defines3.output: + RCS_BASE + + * main.c: however, a subsequent -d cancels -D + + * test/yacc/defines1.calc.h, test/yacc/defines3.calc.h: RCS_BASE + + * main.c: -D option implies -d + + * test/yacc/defines1.error, test/yacc/defines1.output, test/yacc/defines2.calc.h, test/yacc/defines2.error, test/yacc/defines2.output, test/yacc/defines3.error, test/yacc/defines3.output: + RCS_BASE + + * yacc.1: align macro definitions with my other manpages + + * test/run_test.sh: add test for -D after -d or -b options + + * test/btyacc/stdin1.calc.c, test/btyacc/stdin1.error, test/btyacc/stdin1.output, test/btyacc/stdin2.calc.c, test/btyacc/stdin2.error, test/btyacc/stdin2.output: + RCS_BASE + + * test/btyacc/big_b.error, test/btyacc/big_b.output, test/btyacc/big_l.error, test/btyacc/big_l.output, test/btyacc/help.error, test/btyacc/help.output, test/btyacc/no_b_opt.error, test/btyacc/no_b_opt.output, test/btyacc/no_b_opt1.error, test/btyacc/no_b_opt1.output, test/btyacc/no_code_c.error, test/btyacc/no_code_c.output, test/btyacc/no_defines.error, test/btyacc/no_defines.output, test/btyacc/no_graph.error, test/btyacc/no_graph.output, test/btyacc/no_include.error, test/btyacc/no_include.output, test/btyacc/no_opts.error, test/btyacc/no_opts.output, test/btyacc/no_output.error, test/btyacc/no_output.output, test/btyacc/no_output1.error, test/btyacc/no_output1.output, test/btyacc/no_output2.error, test/btyacc/no_output2.output, test/btyacc/no_p_opt.error, test/btyacc/no_p_opt.output, test/btyacc/no_p_opt1.error, test/btyacc/no_p_opt1.output, test/btyacc/no_verbose.error, test/btyacc/no_verbose.output, test/btyacc/nostdin.error, test/btyacc/nostdin.output, test/yacc/big_b.error , test/yacc/big_b.output, test/yacc/big_l.error, test/yacc/big_l.output, test/yacc/help.error, test/yacc/help.output, test/yacc/no_b_opt.error, test/yacc/no_b_opt.output, test/yacc/no_b_opt1.error, test/yacc/no_b_opt1.output, test/yacc/no_code_c.error, test/yacc/no_code_c.output, test/yacc/no_defines.error, test/yacc/no_defines.output, test/yacc/no_graph.error, test/yacc/no_graph.output, test/yacc/no_include.error, test/yacc/no_include.output, test/yacc/no_opts.error, test/yacc/no_opts.output, test/yacc/no_output.error, test/yacc/no_output.output, test/yacc/no_output1.error, test/yacc/no_output1.output, test/yacc/no_output2.error, test/yacc/no_output2.output, test/yacc/no_p_opt.error, test/yacc/no_p_opt.output, test/yacc/no_p_opt1.error, test/yacc/no_p_opt1.output, test/yacc/no_verbose.error, test/yacc/no_verbose.output, test/yacc/nostdin.error, test/yacc/nostdin.output: + regen + + * test/run_test.sh: + add a test for stdin "-" vs end-options "--", and correct a redirection + of stderr in test_flags + + * test/yacc/stdin2.output, test/yacc/stdin2.calc.c, test/yacc/stdin1.calc.c, test/yacc/stdin1.error, test/yacc/stdin1.output, test/yacc/stdin2.error: + RCS_BASE + + * test/btyacc/big_b.output, test/btyacc/big_l.output, test/btyacc/help.output, test/btyacc/no_b_opt.output, test/btyacc/no_output2.output, test/btyacc/no_p_opt.output, test/btyacc/nostdin.output, test/yacc/big_b.output, test/yacc/big_l.output, test/yacc/help.output, test/yacc/no_b_opt.output, test/yacc/no_output2.output, test/yacc/no_p_opt.output, test/yacc/nostdin.output: + regen + + * main.c: add -D option, to specify filename vs y.tab.h for -d + + * defs.h: add dflag2, for -D option + + * yacc.1: document -D option + + * config_h.in: updated with autoheader-252 + + * configure: regen + + * package/debian/copyright: bump + + * aclocal.m4: add CF_GETOPT_HEADER + + * aclocal.m4: Improved autoconf macros: + + CF_CC_ENV_FLAGS + putting preprocessor flags in CFLAGS also is a nuisance, which can be + addressed in the same way. + + CF_GCC_WARNINGS + factor out workaround for XTSTRINGDEFINES as CF_CONST_X_STRING + + CF_GNU_SOURCE + The check for _DEFAULT_SOURCE should apply to "recent" Cygwin (since early 2016), + and except for "NEWLIB" vs "GLIBC" in the test, acts the same if I pretend + that "newlib" is the GNU C library. Without this, the check falls through + to the _XOPEN_SOURCE test, which breaks the pseudoterminal checks for xterm. + + CF_POSIX_C_SOURCE + add/use CF_POSIX_VISIBLE + + CF_TRY_XOPEN_SOURCE + use CF_APPEND_TEXT + + CF_WITH_MAN2HTML + use sed to work around non-POSIX tail utility + + CF_XOPEN_SOURCE + use CF_APPEND_TEXT + add/use CF_POSIX_VISIBLE + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2019-06-10 Thomas E. Dickey + + * config.guess: 2019-06-10 + +2019-05-22 Thomas E. Dickey + + * config.sub: 2019-05-22 + +2018-06-09 Thomas E. Dickey + + * yacc.1: minor typographical fixes + + * test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, t est/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/rename_debug.c, btyaccpar.c: + regen + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2018-06-09 Tom.Shields + + * btyaccpar.skel: + add casts to fix g++ (clang++) compile errors in the backtracking skeleton + due to assignment of ‘void *’ to another pointer type. + +2018-05-25 Thomas E. Dickey + + * test/run_make.sh: + check if this is bison 3+ before adding options to suppress warnings + + * package/byacc.spec: build-fix for Mageia 6 + + * package/byacc.spec: add btyacc package + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * package/debian/control: add a package for btyacc + + * package/debian/rules: generate a package for btyacc + +2018-05-24 Thomas E. Dickey + + * test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, btyaccpar.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destr oy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/rename_debug.c: + regen + + * btyaccpar.skel: fix typo + +2018-05-21 Thomas E. Dickey + + * test/run_make.sh: + ignore case for "%" directives to skip with old-yacc, and add %token-table + to the list + + * btyaccpar.c: regen + +2018-05-21 Christos.Zoulas + + * btyaccpar.skel: + improve compatibility with bison by changing the YYLLOC_DEFAULT macro to use + YYRHSLOC() macro, and adjusting the array indices of yyerror_loc_range[] for + consistency. + +2018-05-10 Thomas E. Dickey + + * output.c: + add a fallback definition for YYDEBUG to the -i externs file. + + * test/btyacc/rename_debug.i, test/yacc/rename_debug.i: regen + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2018-05-09 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: resync with my-autoconf + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * test/btyacc/rename_debug.i, btyaccpar.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.ta b.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/rename_debug.c, test/btyacc/varsyntax_calc1.tab.c: + regen + + * btyaccpar.skel: apply Guy Harris' changes here as well + + * test/btyacc/rename_debug.i, test/yacc/rename_debug.i: regen + + * output.c: correct/improve fallback prototype for yylex() + + * test/btyacc/rename_debug.i, test/yacc/rename_debug.i: regen + +2018-05-08 Thomas E. Dickey + + * test/btyacc/grammar.tab.c, test/yacc/grammar.tab.c: regen + + * test/grammar.y: + quiet some warnings from gcc 7 when doing "make check_make" + + * package/debian/watch, package/pkgsrc/Makefile: update ftp-url + + * test/btyacc/ok_syntax1.tab.h, test/btyacc/btyacc_calc1.tab.h: regen + + * output.c: + provide yylex() declaration for simple case (request by "Mutiny") + + * test/yacc/err_syntax20.tab.c, test/yacc/error.tab.c, test/yacc/expr.oxout.tab.c, test/yacc/grammar.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/ok_syntax1.tab.h, test/yacc/pure_calc.tab.c, test/yacc/pure_error.tab.c, test/yacc/quote_calc-s.tab.c, test/yacc/quote_calc.tab.c, test/yacc/quote_calc2-s.tab.c, test/yacc/quote_calc2.tab.c, test/yacc/quote_calc3-s.tab.c, test/yacc/quote_calc3.tab.c, test/yacc/quote_calc4-s.tab.c, test/yacc/quote_calc4.tab.c, test/yacc/varsyntax_calc1.tab.c, test/yacc/calc.tab.c, test/yacc/calc1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/yacc/code_calc.code.c, test/yacc/code_error.code.c, test/yacc/empty.tab.c, test/yacc/err_syntax10.tab.c, test/yacc/err_syntax11.tab.c, test/yacc/err_syntax12.tab.c, test/yacc/err_syntax18.tab.c, test/yacc/rename_debug.c, test/yacc/rename_debug.i, yaccpar.c: + regen + + * VERSION, package/byacc.spec, package/debian/changelog, package/debian/copyright, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + +2018-05-06 Guy.Harris + + * yaccpar.skel: two fixes: + 1) define yydebug only if YYDEBUG is defined and + 2) make yynerrs a parser-local variable if the parser is reentrant. + +2018-02-24 Guy.Harris + + * output.c: do not emit "extern YYSTYPE yylval;" for pure parsers + +2018-02-05 Thomas E. Dickey + + * config.sub: 2018-01-15 + + * config.guess: 2018-01-26 + +2017-12-04 erik.b.andersen + + * main.c: A proper path for temporary files is needed by byacc under + Windows commandline, otherwise there's a risk of empty files. + The TEMP environment variable is always defined in Windows. + + * defs.h: The noreturn attribute needs to be specified before function + to be portable among compilers (gcc, clang, msvc). + +2017-12-04 Thomas E. Dickey + + * reader.c: adapted fix by Erik B: + a) increase the length of name[] to account for a trailing null + b) note that calling syntax_error() from get_number() does not return + +2017-09-14 Tom.Shields + + * yacc.1: fix typo + +2017-07-09 Thomas E. Dickey + + * package/byacc.spec, package/mingw-byacc.spec: + use predefined "configure" + + * reader.c: remove unused assignment + + * package/debian/rules: use dpkg-buildflags + + * configure: regen + + * aclocal.m4: resync with my-autoconf + + * reader.c, output.c, defs.h: + add/use IS_NAME1() and IS_NAME2() to reduce clutter + + * reader.c, output.c, defs.h: + guard against sign-extension in ctype-macros + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * reader.c: check for numeric overflow in get_number() + + * reader.c: + correct limit-checks for input filename and line-number, in case no valid + filename and/or number was found. + 2017-04-30 Thomas E. Dickey * test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/error.tab.c, test/btyacc/expr.oxout.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/ok_syntax1.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, t est/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c, test/btyacc/rename_debug.c, btyaccpar.c, btyaccpar.skel: @@ -22,6 +442,10 @@ * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: bump +2017-04-29 Thomas E. Dickey + + * config.sub: 2017-04-02 + 2017-03-18 Thomas E. Dickey * config.sub: 2017-02-07 @@ -2558,7 +2982,7 @@ * vmsbuild.com: original version -2000-02-23 dickey@clark.net +2000-02-23 Thomas E. Dickey * test/RCS, RCS: PERMIT FILE @@ -2597,7 +3021,7 @@ * test/ftp.output, test/ftp.tab.c, test/ftp.tab.h: RCS_BASE -1993-02-22 Thomas E. Dickey +1993-02-22 dickey@software.org * test/yacc/error.output, test/yacc/error.tab.h: reference output for testing @@ -2637,7 +3061,7 @@ * symtab.c, lalr.c, error.c: original version -1990-01-16 Thomas E. Dickey +1990-01-16 dickey@software.org * test/code_error.y, test/pure_error.y: RCS_BASE Modified: vendor/byacc/dist/MANIFEST ============================================================================== --- vendor/byacc/dist/MANIFEST Mon Jun 22 21:41:51 2020 (r362512) +++ vendor/byacc/dist/MANIFEST Mon Jun 22 22:42:20 2020 (r362513) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20170430, version t20170430 +MANIFEST for byacc-20200330, version t20200330 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 @@ -77,10 +77,6 @@ test/btyacc/btyacc_demo.error reference output for t test/btyacc/btyacc_demo.output reference output for testing test/btyacc/btyacc_demo.tab.c reference output for testing test/btyacc/btyacc_demo.tab.h reference output for testing -test/btyacc/btyacc_demo2.error reference output for testing -test/btyacc/btyacc_demo2.output reference output for testing -test/btyacc/btyacc_demo2.tab.c reference output for testing -test/btyacc/btyacc_demo2.tab.h reference output for testing test/btyacc/btyacc_destroy1.error reference output for testing test/btyacc/btyacc_destroy1.output reference output for testing test/btyacc/btyacc_destroy1.tab.c reference output for testing @@ -114,11 +110,6 @@ test/btyacc/code_calc.error reference output for t test/btyacc/code_calc.output reference output for testing test/btyacc/code_calc.tab.c reference output for testing test/btyacc/code_calc.tab.h reference output for testing -test/btyacc/code_debug.c reference for test-output -test/btyacc/code_debug.error reference for test-output -test/btyacc/code_debug.h reference for test-output -test/btyacc/code_debug.i reference for test-output -test/btyacc/code_debug.output reference for test-output test/btyacc/code_error.code.c reference output for testing test/btyacc/code_error.error reference output for testing test/btyacc/code_error.output reference output for testing @@ -382,6 +373,7 @@ test/btyacc_demo.y testcase for btyacc test/btyacc_destroy1.y btyacc test-case for %parse-param test/btyacc_destroy2.y btyacc test-case for %parse-param test/btyacc_destroy3.y btyacc test-case for %parse-param +test/calc.tab.c c-file for calc.y test/calc.y example from VMS freeware version of byacc test/calc1.y advanced example from Steve Johnson's paper. test/calc2.y test-cases and reference files for %lex-param / %parse-param Modified: vendor/byacc/dist/VERSION ============================================================================== --- vendor/byacc/dist/VERSION Mon Jun 22 21:41:51 2020 (r362512) +++ vendor/byacc/dist/VERSION Mon Jun 22 22:42:20 2020 (r362513) @@ -1 +1 @@ -20170430 +20200330 Modified: vendor/byacc/dist/aclocal.m4 ============================================================================== --- vendor/byacc/dist/aclocal.m4 Mon Jun 22 21:41:51 2020 (r362512) +++ vendor/byacc/dist/aclocal.m4 Mon Jun 22 22:42:20 2020 (r362513) @@ -1,7 +1,7 @@ -dnl $Id: aclocal.m4,v 1.42 2017/02/01 10:12:21 tom Exp $ +dnl $Id: aclocal.m4,v 1.48 2020/03/10 22:53:47 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- -dnl Copyright 2004-2016,2017 Thomas E. Dickey +dnl Copyright 2004-2019,2020 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -54,7 +54,7 @@ define([CF_ACVERSION_COMPARE], [ifelse([$8], , ,[$8])], [ifelse([$9], , ,[$9])])])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_CFLAGS version: 12 updated: 2015/04/12 15:39:00 +dnl CF_ADD_CFLAGS version: 13 updated: 2017/02/25 18:57:40 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. @@ -84,10 +84,10 @@ case $cf_fix_cppflags in && cf_fix_cppflags=yes if test $cf_fix_cppflags = yes ; then - cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) continue elif test "${cf_tst_cflags}" = "\"'" ; then - cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) continue fi ;; @@ -102,17 +102,17 @@ case $cf_fix_cppflags in CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags) ;; esac - cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_cppflags,$cf_add_cflags) ;; esac ;; (*) - cf_new_cflags="$cf_new_cflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_cflags,$cf_add_cflags) ;; esac ;; (yes) - cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags" + CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'` @@ -125,23 +125,33 @@ done if test -n "$cf_new_cflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) - CFLAGS="$CFLAGS $cf_new_cflags" + CF_APPEND_TEXT(CFLAGS,$cf_new_cflags) fi if test -n "$cf_new_cppflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) - CPPFLAGS="$CPPFLAGS $cf_new_cppflags" + CF_APPEND_TEXT(CPPFLAGS,$cf_new_cppflags) fi if test -n "$cf_new_extra_cppflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) - EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" + CF_APPEND_TEXT(EXTRA_CPPFLAGS,$cf_new_extra_cppflags) fi AC_SUBST(EXTRA_CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_APPEND_TEXT version: 1 updated: 2017/02/25 18:58:55 +dnl -------------- +dnl use this macro for appending text without introducing an extra blank at +dnl the beginning +define([CF_APPEND_TEXT], +[ + test -n "[$]$1" && $1="[$]$1 " + $1="[$]{$1}$2" +])dnl +dnl --------------------------------------------------------------------------- dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31 dnl -------------- dnl Allow user to disable a normally-on option. @@ -171,7 +181,7 @@ ifelse([$3],,[ :]dnl ])dnl ])])dnl dnl --------------------------------------------------------------------------- -dnl CF_CC_ENV_FLAGS version: 6 updated: 2016/08/29 20:57:00 +dnl CF_CC_ENV_FLAGS version: 9 updated: 2018/07/29 18:03:26 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler @@ -188,19 +198,37 @@ AC_DEFUN([CF_CC_ENV_FLAGS], # This should have been defined by AC_PROG_CC : ${CC:=cc} +AC_MSG_CHECKING(\$CFLAGS variable) +case "x$CFLAGS" in +(*-[[IUD]]*) + AC_MSG_RESULT(broken) + AC_MSG_WARN(your environment uses the CFLAGS variable to hold CPPFLAGS options) + cf_flags="$CFLAGS" + CFLAGS= + for cf_arg in $cf_flags + do + CF_ADD_CFLAGS($cf_arg) + done + ;; +(*) + AC_MSG_RESULT(ok) + ;; +esac + AC_MSG_CHECKING(\$CC variable) case "$CC" in (*[[\ \ ]]-*) AC_MSG_RESULT(broken) - AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options) + AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... - cf_flags=`echo "$CC" | sed -e 's/^.*[[ ]]\(-[[^ ]]\)/\1/'` - CC=`echo "$CC " | sed -e 's/[[ ]]-[[^ ]].*$//' -e 's/[[ ]]*$//'` + cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'` + cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'` + CC="$cf_prog" for cf_arg in $cf_flags do case "x$cf_arg" in (x-[[IUDfgOW]]*) - CF_ADD_CFLAGS($cf_flags) + CF_ADD_CFLAGS($cf_arg) ;; (*) CC="$CC $cf_arg" @@ -285,6 +313,66 @@ cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments" fi ]) dnl --------------------------------------------------------------------------- +dnl CF_CONST_X_STRING version: 4 updated: 2020/03/10 18:53:47 +dnl ----------------- +dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most +dnl character-strings. +dnl +dnl It is ambiguous because the specification accommodated the pre-ANSI +dnl compilers bundled by more than one vendor in lieu of providing a standard C +dnl compiler other than by costly add-ons. Because of this, the specification +dnl did not take into account the use of const for telling the compiler that +dnl string literals would be in readonly memory. +dnl +dnl As a workaround, one could (starting with X11R5) define XTSTRINGDEFINES, to +dnl let the compiler decide how to represent Xt's strings which were #define'd. +dnl That does not solve the problem of using the block of Xt's strings which +dnl are compiled into the library (and is less efficient than one might want). +dnl +dnl Xt specification 7 introduces the _CONST_X_STRING symbol which is used both +dnl when compiling the library and compiling using the library, to tell the +dnl compiler that String is const. +AC_DEFUN([CF_CONST_X_STRING], +[ +AC_REQUIRE([AC_PATH_XTRA]) + +CF_SAVE_XTRA_FLAGS([CF_CONST_X_STRING]) + +AC_TRY_COMPILE( +[ +#include +#include +], +[String foo = malloc(1); (void)foo],[ + +AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ + AC_TRY_COMPILE( + [ +#define _CONST_X_STRING /* X11R7.8 (perhaps) */ +#undef XTSTRINGDEFINES /* X11R5 and later */ +#include +#include + ],[String foo = malloc(1); *foo = 0],[ + cf_cv_const_x_string=no + ],[ + cf_cv_const_x_string=yes + ]) +]) + +CF_RESTORE_XTRA_FLAGS([CF_CONST_X_STRING]) + +case $cf_cv_const_x_string in +(no) + CF_APPEND_TEXT(CPPFLAGS,-DXTSTRINGDEFINES) + ;; +(*) + CF_APPEND_TEXT(CPPFLAGS,-D_CONST_X_STRING) + ;; +esac + +]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DISABLE_ECHO version: 13 updated: 2015/04/18 08:56:57 dnl --------------- dnl You can always use "make -n" to see the actual options, but it's hard to @@ -345,7 +433,7 @@ if test "$with_no_leaks" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00 +dnl CF_GCC_ATTRIBUTES version: 18 updated: 2020/03/10 18:53:47 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary @@ -389,7 +477,7 @@ cat > conftest.$ac_ext < conftest.$ac_ext <], +[int x = optind; char *y = optarg], +[cf_cv_getopt_header=$cf_header + break]) +done +]) +if test $cf_cv_getopt_header != none ; then + AC_DEFINE(HAVE_GETOPT_HEADER,1,[Define to 1 if getopt variables are declared in header]) +fi +if test $cf_cv_getopt_header = getopt.h ; then + AC_DEFINE(NEED_GETOPT_H,1,[Define to 1 if we must include getopt.h]) +fi +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_GNU_SOURCE version: 10 updated: 2018/12/10 20:09:41 dnl ------------- dnl Check if we must define _GNU_SOURCE to get a reasonable value for dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect @@ -598,38 +709,106 @@ dnl (or misfeature) of glibc2, which breaks portabilit dnl since it is interwoven with GNU extensions. dnl dnl Well, yes we could work around it... +dnl +dnl Parameters: +dnl $1 is the nominal value for _XOPEN_SOURCE AC_DEFUN([CF_GNU_SOURCE], [ -AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[ +cf_gnu_xopen_source=ifelse($1,,500,$1) + +AC_CACHE_CHECK(if this is the GNU C library,cf_cv_gnu_library,[ AC_TRY_COMPILE([#include ],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_gnu_source=no], - [cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - AC_TRY_COMPILE([#include ],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_gnu_source=no], - [cf_cv_gnu_source=yes]) - CPPFLAGS="$cf_save" - ]) + #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0 + return 0; + #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0 + return 0; + #else + # error not GNU C library + #endif], + [cf_cv_gnu_library=yes], + [cf_cv_gnu_library=no]) ]) -if test "$cf_cv_gnu_source" = yes -then -AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[ -CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - AC_TRY_COMPILE([#include ],[ -#ifdef _DEFAULT_SOURCE -make an error -#endif], - [cf_cv_default_source=no], - [cf_cv_default_source=yes]) +if test x$cf_cv_gnu_library = xyes; then + + # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE + # was changed to help a little. newlib incorporated the change about 4 + # years later. + AC_CACHE_CHECK(if _DEFAULT_SOURCE can be used as a basis,cf_cv_gnu_library_219,[ + cf_save="$CPPFLAGS" + CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE) + AC_TRY_COMPILE([#include ],[ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2) + return 0; + #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3) + return 0; + #else + # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old + #endif], + [cf_cv_gnu_library_219=yes], + [cf_cv_gnu_library_219=no]) + CPPFLAGS="$cf_save" ]) -test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE" + + if test "x$cf_cv_gnu_library_219" = xyes; then + cf_save="$CPPFLAGS" + AC_CACHE_CHECK(if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE,cf_cv_gnu_dftsrc_219,[ + CF_ADD_CFLAGS(-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source) + AC_TRY_COMPILE([ + #include + #include + ],[ + #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1) + return 0; + #else + # error GNU C library is too old + #endif], + [cf_cv_gnu_dftsrc_219=yes], + [cf_cv_gnu_dftsrc_219=no]) + ]) + test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save" + else + cf_cv_gnu_dftsrc_219=maybe + fi + + if test "x$cf_cv_gnu_dftsrc_219" != xyes; then + + AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[ + AC_TRY_COMPILE([#include ],[ + #ifndef _XOPEN_SOURCE + #error expected _XOPEN_SOURCE to be defined + #endif], + [cf_cv_gnu_source=no], + [cf_save="$CPPFLAGS" + CF_ADD_CFLAGS(-D_GNU_SOURCE) + AC_TRY_COMPILE([#include ],[ + #ifdef _XOPEN_SOURCE + #error expected _XOPEN_SOURCE to be undefined + #endif], + [cf_cv_gnu_source=no], + [cf_cv_gnu_source=yes]) + CPPFLAGS="$cf_save" + ]) + ]) + + if test "$cf_cv_gnu_source" = yes + then + AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[ + CF_APPEND_TEXT(CPPFLAGS,-D_GNU_SOURCE) + AC_TRY_COMPILE([#include ],[ + #ifdef _DEFAULT_SOURCE + #error expected _DEFAULT_SOURCE to be undefined + #endif], + [cf_cv_default_source=no], + [cf_cv_default_source=yes]) + ]) + if test "$cf_cv_default_source" = yes + then + CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE) + fi + fi + fi + fi ])dnl dnl --------------------------------------------------------------------------- @@ -935,7 +1114,7 @@ case ".[$]$1" in esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_POSIX_C_SOURCE version: 9 updated: 2015/04/12 15:39:00 +dnl CF_POSIX_C_SOURCE version: 11 updated: 2018/12/31 20:46:17 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl @@ -950,7 +1129,10 @@ dnl dnl Parameters: dnl $1 is the nominal value for _POSIX_C_SOURCE AC_DEFUN([CF_POSIX_C_SOURCE], -[ +[AC_REQUIRE([CF_POSIX_VISIBLE])dnl + +if test "$cf_cv_posix_visible" = no; then + cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1]) cf_save_CFLAGS="$CFLAGS" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Mon Jun 22 22:43:10 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B69F33EF14; Mon, 22 Jun 2020 22:43:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rPZQ1l2dz4X0v; Mon, 22 Jun 2020 22:43:10 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CA9D154FE; Mon, 22 Jun 2020 22:43:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MMh9AQ097030; Mon, 22 Jun 2020 22:43:09 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MMh9Um097029; Mon, 22 Jun 2020 22:43:09 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202006222243.05MMh9Um097029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 22 Jun 2020 22:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362514 - vendor/byacc/20200330 X-SVN-Group: vendor X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor/byacc/20200330 X-SVN-Commit-Revision: 362514 X-SVN-Commit-Repository: base 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.33 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, 22 Jun 2020 22:43:10 -0000 Author: jkim Date: Mon Jun 22 22:43:09 2020 New Revision: 362514 URL: https://svnweb.freebsd.org/changeset/base/362514 Log: Tag byacc 20200330. Added: vendor/byacc/20200330/ - copied from r362513, vendor/byacc/dist/ From owner-svn-src-vendor@freebsd.org Wed Jun 24 00:20:48 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA80833DDCD; Wed, 24 Jun 2020 00:20:48 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49s3hc5xP9z4L4Q; Wed, 24 Jun 2020 00:20:48 +0000 (UTC) (envelope-from cy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6B5D9201; Wed, 24 Jun 2020 00:20:48 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05O0KmTe038656; Wed, 24 Jun 2020 00:20:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05O0Kk0T038640; Wed, 24 Jun 2020 00:20:46 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006240020.05O0Kk0T038640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 24 Jun 2020 00:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362565 - in vendor/ntp/dist: . html/drivers include lib/isc/win32/include/isc libntp ntpd ntpdate ntpdc ntpq ntpsnmpd ports/winnt/include ports/winnt/libntp ports/winnt/ntpd scripts sc... X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in vendor/ntp/dist: . html/drivers include lib/isc/win32/include/isc libntp ntpd ntpdate ntpdc ntpq ntpsnmpd ports/winnt/include ports/winnt/libntp ports/winnt/ntpd scripts scripts/calc_tickadj script... X-SVN-Commit-Revision: 362565 X-SVN-Commit-Repository: base 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.33 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, 24 Jun 2020 00:20:49 -0000 Author: cy Date: Wed Jun 24 00:20:45 2020 New Revision: 362565 URL: https://svnweb.freebsd.org/changeset/base/362565 Log: Import ntp-4.2.8p15. Security: ntp bug 3661 Modified: vendor/ntp/dist/ChangeLog vendor/ntp/dist/CommitLog vendor/ntp/dist/NEWS vendor/ntp/dist/config.h.in vendor/ntp/dist/configure vendor/ntp/dist/configure.ac vendor/ntp/dist/html/drivers/driver40-ja.html vendor/ntp/dist/html/drivers/driver40.html vendor/ntp/dist/include/l_stdlib.h vendor/ntp/dist/include/ntp.h vendor/ntp/dist/include/ntp_config.h vendor/ntp/dist/include/recvbuff.h vendor/ntp/dist/lib/isc/win32/include/isc/int.h vendor/ntp/dist/libntp/a_md5encrypt.c vendor/ntp/dist/libntp/decodenetnum.c vendor/ntp/dist/libntp/recvbuff.c vendor/ntp/dist/libntp/strdup.c vendor/ntp/dist/libntp/timexsup.c vendor/ntp/dist/ntpd/invoke-ntp.conf.texi vendor/ntp/dist/ntpd/invoke-ntp.keys.texi vendor/ntp/dist/ntpd/invoke-ntpd.texi vendor/ntp/dist/ntpd/ntp.conf.5man vendor/ntp/dist/ntpd/ntp.conf.5mdoc vendor/ntp/dist/ntpd/ntp.conf.html vendor/ntp/dist/ntpd/ntp.conf.man.in vendor/ntp/dist/ntpd/ntp.conf.mdoc.in vendor/ntp/dist/ntpd/ntp.keys.5man vendor/ntp/dist/ntpd/ntp.keys.5mdoc vendor/ntp/dist/ntpd/ntp.keys.html vendor/ntp/dist/ntpd/ntp.keys.man.in vendor/ntp/dist/ntpd/ntp.keys.mdoc.in vendor/ntp/dist/ntpd/ntp_config.c vendor/ntp/dist/ntpd/ntp_io.c vendor/ntp/dist/ntpd/ntp_proto.c vendor/ntp/dist/ntpd/ntp_refclock.c vendor/ntp/dist/ntpd/ntp_request.c vendor/ntp/dist/ntpd/ntp_timer.c vendor/ntp/dist/ntpd/ntpd-opts.c vendor/ntp/dist/ntpd/ntpd-opts.h vendor/ntp/dist/ntpd/ntpd.1ntpdman vendor/ntp/dist/ntpd/ntpd.1ntpdmdoc vendor/ntp/dist/ntpd/ntpd.html vendor/ntp/dist/ntpd/ntpd.man.in vendor/ntp/dist/ntpd/ntpd.mdoc.in vendor/ntp/dist/ntpd/refclock_jjy.c vendor/ntp/dist/ntpd/refclock_nmea.c vendor/ntp/dist/ntpd/refclock_palisade.c vendor/ntp/dist/ntpd/refclock_parse.c vendor/ntp/dist/ntpdate/ntpdate.c vendor/ntp/dist/ntpdc/invoke-ntpdc.texi vendor/ntp/dist/ntpdc/ntpdc-opts.c vendor/ntp/dist/ntpdc/ntpdc-opts.h vendor/ntp/dist/ntpdc/ntpdc.1ntpdcman vendor/ntp/dist/ntpdc/ntpdc.1ntpdcmdoc vendor/ntp/dist/ntpdc/ntpdc.html vendor/ntp/dist/ntpdc/ntpdc.man.in vendor/ntp/dist/ntpdc/ntpdc.mdoc.in vendor/ntp/dist/ntpq/invoke-ntpq.texi vendor/ntp/dist/ntpq/ntpq-opts.c vendor/ntp/dist/ntpq/ntpq-opts.h vendor/ntp/dist/ntpq/ntpq.1ntpqman vendor/ntp/dist/ntpq/ntpq.1ntpqmdoc vendor/ntp/dist/ntpq/ntpq.html vendor/ntp/dist/ntpq/ntpq.man.in vendor/ntp/dist/ntpq/ntpq.mdoc.in vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.texi vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdman vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc vendor/ntp/dist/ntpsnmpd/ntpsnmpd.html vendor/ntp/dist/ntpsnmpd/ntpsnmpd.man.in vendor/ntp/dist/ntpsnmpd/ntpsnmpd.mdoc.in vendor/ntp/dist/packageinfo.sh vendor/ntp/dist/ports/winnt/include/config.h vendor/ntp/dist/ports/winnt/libntp/messages.h vendor/ntp/dist/ports/winnt/ntpd/ntp_iocompletionport.c vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.html vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.man.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.mdoc.in vendor/ntp/dist/scripts/calc_tickadj/invoke-calc_tickadj.texi vendor/ntp/dist/scripts/invoke-plot_summary.texi vendor/ntp/dist/scripts/invoke-summary.texi vendor/ntp/dist/scripts/ntp-wait/invoke-ntp-wait.texi vendor/ntp/dist/scripts/ntp-wait/ntp-wait-opts vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitman vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc vendor/ntp/dist/scripts/ntp-wait/ntp-wait.html vendor/ntp/dist/scripts/ntp-wait/ntp-wait.man.in vendor/ntp/dist/scripts/ntp-wait/ntp-wait.mdoc.in vendor/ntp/dist/scripts/ntpsweep/invoke-ntpsweep.texi vendor/ntp/dist/scripts/ntpsweep/ntpsweep-opts vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepman vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc vendor/ntp/dist/scripts/ntpsweep/ntpsweep.html vendor/ntp/dist/scripts/ntpsweep/ntpsweep.man.in vendor/ntp/dist/scripts/ntpsweep/ntpsweep.mdoc.in vendor/ntp/dist/scripts/ntptrace/invoke-ntptrace.texi vendor/ntp/dist/scripts/ntptrace/ntptrace-opts vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptraceman vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptracemdoc vendor/ntp/dist/scripts/ntptrace/ntptrace.html vendor/ntp/dist/scripts/ntptrace/ntptrace.man.in vendor/ntp/dist/scripts/ntptrace/ntptrace.mdoc.in vendor/ntp/dist/scripts/plot_summary-opts vendor/ntp/dist/scripts/plot_summary.1plot_summaryman vendor/ntp/dist/scripts/plot_summary.1plot_summarymdoc vendor/ntp/dist/scripts/plot_summary.html vendor/ntp/dist/scripts/plot_summary.man.in vendor/ntp/dist/scripts/plot_summary.mdoc.in vendor/ntp/dist/scripts/summary-opts vendor/ntp/dist/scripts/summary.1summaryman vendor/ntp/dist/scripts/summary.1summarymdoc vendor/ntp/dist/scripts/summary.html vendor/ntp/dist/scripts/summary.man.in vendor/ntp/dist/scripts/summary.mdoc.in vendor/ntp/dist/scripts/update-leap/invoke-update-leap.texi vendor/ntp/dist/scripts/update-leap/update-leap-opts vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapman vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapmdoc vendor/ntp/dist/scripts/update-leap/update-leap.html vendor/ntp/dist/scripts/update-leap/update-leap.man.in vendor/ntp/dist/scripts/update-leap/update-leap.mdoc.in vendor/ntp/dist/sntp/configure vendor/ntp/dist/sntp/crypto.c vendor/ntp/dist/sntp/include/version.def vendor/ntp/dist/sntp/include/version.texi vendor/ntp/dist/sntp/invoke-sntp.texi vendor/ntp/dist/sntp/m4/version.m4 vendor/ntp/dist/sntp/sntp-opts.c vendor/ntp/dist/sntp/sntp-opts.h vendor/ntp/dist/sntp/sntp.1sntpman vendor/ntp/dist/sntp/sntp.1sntpmdoc vendor/ntp/dist/sntp/sntp.html vendor/ntp/dist/sntp/sntp.man.in vendor/ntp/dist/sntp/sntp.mdoc.in vendor/ntp/dist/sntp/version.c vendor/ntp/dist/tests/libntp/decodenetnum.c vendor/ntp/dist/tests/libntp/netof.c vendor/ntp/dist/tests/libntp/recvbuff.c vendor/ntp/dist/tests/libntp/run-decodenetnum.c vendor/ntp/dist/tests/libntp/sockaddrtest.c vendor/ntp/dist/util/invoke-ntp-keygen.texi vendor/ntp/dist/util/ntp-keygen-opts.c vendor/ntp/dist/util/ntp-keygen-opts.h vendor/ntp/dist/util/ntp-keygen.1ntp-keygenman vendor/ntp/dist/util/ntp-keygen.1ntp-keygenmdoc vendor/ntp/dist/util/ntp-keygen.html vendor/ntp/dist/util/ntp-keygen.man.in vendor/ntp/dist/util/ntp-keygen.mdoc.in Modified: vendor/ntp/dist/ChangeLog ============================================================================== --- vendor/ntp/dist/ChangeLog Tue Jun 23 23:52:43 2020 (r362564) +++ vendor/ntp/dist/ChangeLog Wed Jun 24 00:20:45 2020 (r362565) @@ -1,4 +1,33 @@ --- +(4.2.8p15) 2020/06/23 Released by Harlan Stenn +(4.2.8p15) 2020/06/23 Released by Harlan Stenn + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merge of 3592 and 3596 + - fixed a bad merge that happened before 4.2.8-p14. Thanks to + Sylar Tao for noticing this! +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- (4.2.8p14) 2020/03/03 Released by Harlan Stenn * [Sec 3610] process_control() should bail earlier on short packets. stenn@ Modified: vendor/ntp/dist/CommitLog ============================================================================== --- vendor/ntp/dist/CommitLog Tue Jun 23 23:52:43 2020 (r362564) +++ vendor/ntp/dist/CommitLog Wed Jun 24 00:20:45 2020 (r362565) @@ -1,3 +1,700 @@ +ChangeSet@1.3911, 2020-06-23 02:22:19-07:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P15 + TAG: NTP_4_2_8P15 + + ChangeLog@1.1985 +1 -0 + NTP_4_2_8P15 + + ntpd/invoke-ntp.conf.texi@1.222 +1 -1 + NTP_4_2_8P15 + + ntpd/invoke-ntp.keys.texi@1.207 +1 -1 + NTP_4_2_8P15 + + ntpd/invoke-ntpd.texi@1.521 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.5man@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.5mdoc@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.html@1.204 +1 -1 + NTP_4_2_8P15 + + ntpd/ntp.conf.man.in@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.mdoc.in@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.5man@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.5mdoc@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.html@1.202 +1 -1 + NTP_4_2_8P15 + + ntpd/ntp.keys.man.in@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.mdoc.in@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd-opts.c@1.544 +7 -7 + NTP_4_2_8P15 + + ntpd/ntpd-opts.h@1.543 +3 -3 + NTP_4_2_8P15 + + ntpd/ntpd.1ntpdman@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.1ntpdmdoc@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.html@1.195 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.man.in@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.mdoc.in@1.350 +2 -2 + NTP_4_2_8P15 + + ntpdc/invoke-ntpdc.texi@1.518 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc-opts.c@1.537 +7 -7 + NTP_4_2_8P15 + + ntpdc/ntpdc-opts.h@1.536 +3 -3 + NTP_4_2_8P15 + + ntpdc/ntpdc.1ntpdcman@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.1ntpdcmdoc@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.html@1.364 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.man.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.mdoc.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpq/invoke-ntpq.texi@1.528 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq-opts.c@1.546 +7 -7 + NTP_4_2_8P15 + + ntpq/ntpq-opts.h@1.544 +3 -3 + NTP_4_2_8P15 + + ntpq/ntpq.1ntpqman@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.1ntpqmdoc@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.html@1.195 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.man.in@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.mdoc.in@1.356 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.520 +1 -1 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd-opts.c@1.539 +7 -7 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd-opts.h@1.538 +3 -3 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.html@1.188 +1 -1 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.man.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.349 +2 -2 + NTP_4_2_8P15 + + packageinfo.sh@1.546 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.110 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.111 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.html@1.111 +1 -1 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.man.in@1.109 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.111 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.114 +1 -1 + NTP_4_2_8P15 + + scripts/invoke-plot_summary.texi@1.132 +2 -2 + NTP_4_2_8P15 + + scripts/invoke-summary.texi@1.131 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.342 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait-opts@1.78 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.338 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.339 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.html@1.360 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.man.in@1.338 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.339 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.html@1.132 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.man.in@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.118 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/invoke-ntptrace.texi@1.131 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.1ntptraceman@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.118 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.html@1.133 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.man.in@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.mdoc.in@1.119 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary-opts@1.81 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.1plot_summaryman@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.1plot_summarymdoc@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.html@1.135 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.man.in@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.mdoc.in@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/summary-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/summary.1summaryman@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.1summarymdoc@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.html@1.134 +2 -2 + NTP_4_2_8P15 + + scripts/summary.man.in@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.mdoc.in@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/invoke-update-leap.texi@1.30 +1 -1 + NTP_4_2_8P15 + + scripts/update-leap/update-leap-opts@1.31 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.1update-leapman@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.1update-leapmdoc@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.html@1.31 +1 -1 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.man.in@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.mdoc.in@1.30 +2 -2 + NTP_4_2_8P15 + + sntp/invoke-sntp.texi@1.520 +2 -2 + NTP_4_2_8P15 + + sntp/sntp-opts.c@1.540 +7 -7 + NTP_4_2_8P15 + + sntp/sntp-opts.h@1.538 +3 -3 + NTP_4_2_8P15 + + sntp/sntp.1sntpman@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.1sntpmdoc@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.html@1.536 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.man.in@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.mdoc.in@1.355 +2 -2 + NTP_4_2_8P15 + + util/invoke-ntp-keygen.texi@1.523 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen-opts.c@1.542 +7 -7 + NTP_4_2_8P15 + + util/ntp-keygen-opts.h@1.540 +3 -3 + NTP_4_2_8P15 + + util/ntp-keygen.1ntp-keygenman@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.1ntp-keygenmdoc@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.html@1.196 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.man.in@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.mdoc.in@1.351 +2 -2 + NTP_4_2_8P15 + +ChangeSet@1.3910, 2020-06-23 02:05:32-07:00, ntpreleng@ntp-build.tal1.ntfo.org + ntp-4.2.8p15 + + packageinfo.sh@1.545 +1 -1 + ntp-4.2.8p15 + +ChangeSet@1.3908, 2020-06-09 07:12:27-04:00, stenn@psp-deb2.ntp.org + p15 updates + + ChangeLog@1.1983 +1 -1 + p15 updates + + NEWS@1.214 +1 -1 + p15 updates + +ChangeSet@1.3896.1.22, 2020-06-09 07:09:18-04:00, stenn@psp-deb2.ntp.org + 3670 + + ChangeLog@1.1974.1.14 +1 -1 + 3670 + + NEWS@1.205.1.7 +3 -1 + 3670 + +ChangeSet@1.3896.1.21, 2020-06-09 08:39:26+02:00, perlinger@ntp.org + [Bug 3670] Deleted statements come back + + ChangeLog@1.1974.1.13 +3 -0 + [Bug 3670] Deleted statements come back + + ntpd/ntp_proto.c@1.437 +4 -19 + [Bug 3670] Deleted statements come back + +ChangeSet@1.3906, 2020-05-31 09:52:14+00:00, stenn@psp-deb1.ntp.org + update the expected releease date + + NEWS@1.213 +1 -1 + update the expected releease date + +ChangeSet@1.3896.9.3, 2020-05-31 09:49:39+00:00, stenn@psp-deb1.ntp.org + Update ChangeLog and NEWS files for 3644 + + ChangeLog@1.1974.1.12 +1 -3 + Update ChangeLog and NEWS files for 3644 + + NEWS@1.205.1.6 +2 -1 + Update ChangeLog and NEWS files for 3644 + +ChangeSet@1.3896.9.2, 2020-05-31 09:47:05+00:00, stenn@psp-deb1.ntp.org + [Bug 3644]: Do we want to log an event in this case? + + ntpd/ntp_timer.c@1.99 +2 -0 + [Bug 3644]: Do we want to log an event in this case? + +ChangeSet@1.3896.9.1, 2020-05-31 11:13:45+02:00, perlinger@ntp.org + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + ChangeLog@1.1974.1.11 +3 -0 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + include/ntp.h@1.233 +1 -1 + [Bug 3644] Unsynchronized server [...] selected as candidate + - comment typo + + ntpd/ntp_proto.c@1.436 +2 -3 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + ntpd/ntp_timer.c@1.98 +24 -9 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + - according to DLM, we should go S16/UNSYNCED if we have no proper orphan config + +ChangeSet@1.3896.1.19, 2020-05-25 12:42:46+02:00, nb241700@md2g3rcc.ad001.siemens.net + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues + + libntp/decodenetnum.c@1.21 +1 -1 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues ('sa_family_t' is POSIX, now ANSI/MSVC) + + libntp/strdup.c@1.11 +3 -3 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues (typo+cast in memchr replacement) + + ports/winnt/include/config.h@1.117 +2 -0 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues (have memchr() and strnlen() in MSVC) + +ChangeSet@1.3896.1.18, 2020-05-22 06:07:28+00:00, stenn@psp-deb1.ntp.org + Update NEWS file with 3667 + + NEWS@1.205.1.5 +3 -1 + Update NEWS file with 3667 + +ChangeSet@1.3896.1.17, 2020-05-22 06:05:45+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1974.1.10 +2 -4 + cleanup + +ChangeSet@1.3896.1.16, 2020-05-22 06:04:57+00:00, stenn@psp-deb1.ntp.org + indentation tweaks + + tests/libntp/sockaddrtest.c@1.5 +7 -7 + indentation tweaks + +ChangeSet@1.3896.1.15, 2020-05-20 09:44:15+02:00, perlinger@ntp.org + [Bug 3667] decodenetnum fails with numeric port + + ChangeLog@1.1974.1.9 +4 -0 + [Bug 3667] decodenetnum fails with numeric port + + configure.ac@1.619 +1 -1 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + include/l_stdlib.h@1.21 +9 -0 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + libntp/decodenetnum.c@1.20 +123 -77 + [Bug 3667] decodenetnum fails with numeric port + - rewrite in terms of inet_pton() and strtoul(), no getaddrinfo() any more + + libntp/strdup.c@1.10 +29 -3 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + tests/libntp/decodenetnum.c@1.13 +94 -6 + [Bug 3667] decodenetnum fails with numeric port + - additional tests + + tests/libntp/netof.c@1.10 +2 -0 + Bug 3667 - decodenetnum fails with numeric port + - clear address buffers before use + + tests/libntp/run-decodenetnum.c@1.14 +8 -2 + [Bug 3667] decodenetnum fails with numeric port + - regenerated + + tests/libntp/sockaddrtest.c@1.4 +2 -1 + [Bug 3667] decodenetnum fails with numeric port + - include scope id in IPv6 compare + +ChangeSet@1.3896.1.14, 2020-05-14 03:45:40-07:00, harlan@psp-at0.tal1.ntfo.org + Added 3660 to the NEWS file + + NEWS@1.205.1.4 +3 -1 + Added 3660 to the NEWS file + +ChangeSet@1.3896.8.1, 2020-05-14 03:14:44-07:00, harlan@psp-at0.tal1.ntfo.org + [Bug 3660] Manycast orphan mode startup discovery problem + + ChangeLog@1.1974.8.1 +5 -0 + [Bug 3660] Manycast orphan mode startup discovery problem + + ntpd/ntp_proto.c@1.432.2.1 +2 -1 + [Bug 3660] Manycast orphan mode startup discovery problem + +ChangeSet@1.3896.1.12, 2020-05-10 11:26:21+00:00, stenn@psp-deb1.ntp.org + Update NEWS + + NEWS@1.205.1.3 +3 -1 + Update NEWS + +ChangeSet@1.3896.1.11, 2020-05-10 09:44:50+00:00, stenn@psp-deb1.ntp.org + Merge cleanup + + ChangeLog@1.1974.1.7 +2 -4 + Merge cleanup + +ChangeSet@1.3896.1.10, 2020-05-09 08:20:44+02:00, perlinger@ntp.org + [Bug 3666] avoid unlimited receive buffer allocation + + BitKeeper/etc/ignore@1.95 +1 -0 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) ignore the '.vs' directory of VS2017 & above + + ChangeLog@1.1974.1.6 +4 -0 + [Bug 3666] avoid unlimited receive buffer allocation + + include/recvbuff.h@1.28 +23 -7 + [Bug 3666] avoid unlimited receive buffer allocation + - buffer count limit is 4096 now, always enforced + - API change for urgent buffers + + lib/isc/win32/include/isc/int.h@1.5 +3 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) define standard reserved macros only if not yet defined! + + libntp/recvbuff.c@1.44 +131 -73 + [Bug 3666] avoid unlimited receive buffer allocation + - don't exceed RECV_TOOMANY allocated buffers + - keep emergency reserve for clocks + + libntp/timexsup.c@1.3 +3 -4 + [bug 3666] avoid unlimited receive buffer allocation + - (sidekick) fix some warnings of clang on lp64 targets + + ntpd/ntp_io.c@1.432 +23 -13 + [Bug 3666] avoid unlimited receive buffer allocation + - support urgent buffer reserve for refclocks + + ntpd/refclock_parse.c@1.89 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - support urgent buffer reserve for refclocks + + ntpdate/ntpdate.c@1.106 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - get_free_recv_buffer() API change + + ports/winnt/libntp/messages.h@1.3 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) regenerated + + ports/winnt/ntpd/ntp_iocompletionport.c@1.81 +63 -38 + [Bug 3666] avoid unlimited receive buffer allocation + - reuse last buffer ASAP if no new buffer available + - typos and some internal renaming + + tests/libntp/recvbuff.c@1.8 +2 -2 + [Bug 3666] avoid unlimited receive buffer allocation + - internal API changes + +ChangeSet@1.3896.1.9, 2020-05-05 03:53:50+00:00, stenn@psp-deb1.ntp.org + Update NEWS with 3639 + + NEWS@1.205.1.2 +3 -1 + Update NEWS with 3639 + +ChangeSet@1.3896.1.7, 2020-04-20 08:14:39+00:00, stenn@psp-deb1.ntp.org + NEWS and bug 3664 + + NEWS@1.205.1.1 +2 -1 + NEWS and bug 3664 + +ChangeSet@1.3896.7.1, 2020-04-16 17:50:44+02:00, burnicki@psp-deb1.ntp.org + Enable openSSL CMAC support on Windows. + + ChangeLog@1.1974.7.1 +2 -0 + Enable openSSL CMAC support on Windows. + + ports/winnt/include/config.h@1.116 +2 -0 + Enable openSSL CMAC support on Windows. + +ChangeSet@1.3899, 2020-04-11 09:59:23+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.206 +1 -0 + update + +ChangeSet@1.3896.1.5, 2020-04-11 09:35:19+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.205 +2 -2 + update + +ChangeSet@1.3896.1.3, 2020-04-11 08:10:59+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.204 +3 -1 + update + +ChangeSet@1.3896.2.3, 2020-04-11 07:21:36+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.203 +1 -0 + update + +ChangeSet@1.3896.3.3, 2020-04-11 07:12:47+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.202 +22 -0 + update + +ChangeSet@1.3896.6.4, 2020-04-07 17:51:25+02:00, burnicki@psp-deb1.ntp.org + [Bug 3662] Fix build errors on Windows with VS2008. + + ChangeLog@1.1974.6.1 +2 -0 + [Bug 3662] Fix build errors on Windows with VS2008. + +ChangeSet@1.3896.6.3, 2020-04-07 17:49:08+02:00, burnicki@psp-deb1.ntp.org + Fix unused variable warning in ntpdate.c. + + ntpdate/ntpdate.c@1.105 +2 -1 + Fix unused variable warning. + +ChangeSet@1.3896.6.2, 2020-04-07 17:48:25+02:00, burnicki@psp-deb1.ntp.org + Fix compiling refclock_palisade.c + Don't have variable declarations after code. + + ntpd/refclock_palisade.c@1.49 +25 -23 + Don't have variable declarations after code. + +ChangeSet@1.3896.6.1, 2020-04-07 17:47:02+02:00, burnicki@psp-deb1.ntp.org + Fix prototype in ntpd/refclock_nmea.c + + ntpd/refclock_nmea.c@1.85 +1 -1 + Fix prototype in ntpd/refclock_nmea.c + +ChangeSet@1.3896.5.1, 2020-04-05 10:10:12+02:00, perlinger@ntp.org + [Bug 3646] Avoid sync with unsync orphan + + ChangeLog@1.1974.5.1 +4 -0 + [Bug 3646] Avoid sync with unsync orphan + + ntpd/ntp_proto.c@1.432.1.1 +21 -0 + [Bug 3646] Avoid sync with unsync orphan + +ChangeSet@1.3896.4.1, 2020-04-05 09:53:25+02:00, perlinger@ntp.org + [Bug 3653] Refclock jitter RMS calculation + + ChangeLog@1.1974.4.1 +4 -0 + [Bug 3653] Refclock jitter RMS calculation + + ntpd/ntp_refclock.c@1.132 +36 -36 + [Bug 3653] Refclock jitter RMS calculation + +ChangeSet@1.3896.3.1, 2020-04-04 08:57:51+02:00, perlinger@ntp.org + [Bug 3655] ntpdc memstats hash counts + + ChangeLog@1.1974.3.1 +4 -0 + [Bug 3655] ntpdc memstats hash counts + + ntpd/ntp_request.c@1.132 +1 -1 + [Bug 3655] ntpdc memstats hash counts + +ChangeSet@1.3896.2.1, 2020-04-04 08:48:51+02:00, perlinger@ntp.org + [Bug 3657] Wrong "Autokey group mismatch" debug message + + ChangeLog@1.1974.2.1 +3 -0 + [Bug 3657] Wrong "Autokey group mismatch" debug message + + ntpd/ntp_proto.c@1.433 +3 -2 + [Bug 3657] Wrong "Autokey group mismatch" debug message + +ChangeSet@1.3896.1.1, 2020-04-04 08:38:06+02:00, perlinger@ntp.org + [Bug 3659] ntp-4.2.8p14 fails to build + + ChangeLog@1.1974.1.1 +3 -0 + [Bug 3659] ntp-4.2.8p14 fails to build + + include/ntp_config.h@1.90 +0 -10 + [Bug 3659] ntp-4.2.8p14 fails to build + - move global declaration of 'psl' from header to static declaration in code + + ntpd/ntp_config.c@1.376 +10 -0 + [Bug 3659] ntp-4.2.8p14 fails to build + - move global declaration of 'psl' from header to static declaration in code + +ChangeSet@1.3897, 2020-04-01 16:49:43+02:00, perlinger@ntp.org + [Bug 3661] memory leak with AES128CMAC keys + + ChangeLog@1.1975 +3 -0 + [Bug 3661] memory leak with AES128CMAC keys + + libntp/a_md5encrypt.c@1.52 +1 -1 + [Bug 3661] memory leak with AES128CMAC keys + - free context, not just cleaning up internally + + sntp/crypto.c@1.40 +2 -1 + [Bug 3661] memory leak with AES128CMAC keys + - free context, not just cleaning up internally + ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P14 TAG: NTP_4_2_8P14 @@ -675,7 +1372,7 @@ ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng ntpd/ntp_config.c@1.374 +2 -2 provide get_pollskew() for simulator -ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org +ChangeSet@1.3844.25.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P13 TAG: NTP_4_2_8P13 (currently on 1.3894) @@ -933,7 +1630,7 @@ ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp ChangeSet@1.3879, 2020-02-17 08:11:42+00:00, stenn@psp-deb1.ntp.org updates - ChangeLog@1.1968.34.1 +2 -0 + ChangeLog@1.1968.35.1 +2 -0 ChangeSet@1.3877.1.2, 2020-02-08 23:00:11+00:00, stenn@psp-deb1.ntp.org html/confopt.html cleanup @@ -1288,6 +1985,22 @@ ChangeSet@1.3878, 2020-01-29 06:03:13+00:00, stenn@psp ntpd/ntp_proto.c@1.427.1.1 +8 -0 Initial pass at fixes for bug 3596 + +ChangeSet@1.3844.24.1, 2020-01-21 12:49:14+00:00, abe@psp-deb1.ntp.org + driver40.html, refclock_jjy.c, driver40-ja.html, ChangeLog: + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + ChangeLog@1.1968.34.1 +3 -0 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + html/drivers/driver40-ja.html@1.8 +10 -2 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + html/drivers/driver40.html@1.23 +9 -2 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + ntpd/refclock_jjy.c@1.37 +76 -32 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. ChangeSet@1.3873.4.2, 2020-01-18 04:46:30-05:00, stenn@psp-deb2.ntp.org [Bug 3637] Emit the version of ntpd in saveconfig Modified: vendor/ntp/dist/NEWS ============================================================================== --- vendor/ntp/dist/NEWS Tue Jun 23 23:52:43 2020 (r362564) +++ vendor/ntp/dist/NEWS Wed Jun 24 00:20:45 2020 (r362565) @@ -1,4 +1,42 @@ --- +NTP 4.2.8p15 (Harlan Stenn , 2020 Jun 23) + +Focus: Security, Bug fixes + +Severity: MEDIUM + +This release fixes one vulnerability: Associations that use CMAC +authentication between ntpd from versions 4.2.8p11/4.3.97 and +4.2.8p14/4.3.100 will leak a small amount of memory for each packet. +Eventually, ntpd will run out of memory and abort. + +It also fixes 13 other bugs. + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merger between 3592 and 3596 + - Thanks to Sylar Tao +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- NTP 4.2.8p14 (Harlan Stenn , 2020 Mar 03) Focus: Security, Bug fixes, enhancements. Modified: vendor/ntp/dist/config.h.in ============================================================================== --- vendor/ntp/dist/config.h.in Tue Jun 23 23:52:43 2020 (r362564) +++ vendor/ntp/dist/config.h.in Wed Jun 24 00:20:45 2020 (r362565) @@ -583,6 +583,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MD5_H +/* Define to 1 if you have the `memchr' function. */ +#undef HAVE_MEMCHR + /* Define to 1 if you have the `memlk' function. */ #undef HAVE_MEMLK @@ -894,6 +897,9 @@ /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY + +/* Define to 1 if you have the `strnlen' function. */ +#undef HAVE_STRNLEN /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H Modified: vendor/ntp/dist/configure ============================================================================== --- vendor/ntp/dist/configure Tue Jun 23 23:52:43 2020 (r362564) +++ vendor/ntp/dist/configure Wed Jun 24 00:20:45 2020 (r362565) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ntp 4.2.8p14. +# Generated by GNU Autoconf 2.69 for ntp 4.2.8p15. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ntp' PACKAGE_TARNAME='ntp' -PACKAGE_VERSION='4.2.8p14' -PACKAGE_STRING='ntp 4.2.8p14' +PACKAGE_VERSION='4.2.8p15' +PACKAGE_STRING='ntp 4.2.8p15' PACKAGE_BUGREPORT='http://bugs.ntp.org./' PACKAGE_URL='http://www.ntp.org./' @@ -1617,7 +1617,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ntp 4.2.8p14 to adapt to many kinds of systems. +\`configure' configures ntp 4.2.8p15 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1687,7 +1687,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ntp 4.2.8p14:";; + short | recursive ) echo "Configuration of ntp 4.2.8p15:";; esac cat <<\_ACEOF @@ -1930,7 +1930,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ntp configure 4.2.8p14 +ntp configure 4.2.8p15 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2639,7 +2639,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ntp $as_me 4.2.8p14, which was +It was created by ntp $as_me 4.2.8p15, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3640,7 +3640,7 @@ fi # Define the identity of the package. PACKAGE='ntp' - VERSION='4.2.8p14' + VERSION='4.2.8p15' cat >>confdefs.h <<_ACEOF @@ -27308,7 +27308,7 @@ _ACEOF fi done -for ac_func in strdup strerror setrlimit strchr +for ac_func in strdup strnlen memchr strerror setrlimit strchr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -34174,7 +34174,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ntp $as_me 4.2.8p14, which was +This file was extended by ntp $as_me 4.2.8p15, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34241,7 +34241,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ntp config.status 4.2.8p14 +ntp config.status 4.2.8p15 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/ntp/dist/configure.ac ============================================================================== --- vendor/ntp/dist/configure.ac Tue Jun 23 23:52:43 2020 (r362564) +++ vendor/ntp/dist/configure.ac Wed Jun 24 00:20:45 2020 (r362565) @@ -912,7 +912,7 @@ case "$host" in ;; esac AC_CHECK_FUNCS([setlinebuf setpgid setpriority setsid setvbuf]) -AC_CHECK_FUNCS([strdup strerror setrlimit strchr]) +AC_CHECK_FUNCS([strdup strnlen memchr strerror setrlimit strchr]) case "$host" in *-*-aix[[4-9]]*) # XXX only verified thru AIX6. Modified: vendor/ntp/dist/html/drivers/driver40-ja.html ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/ntp/dist/html/drivers/driver40.html ============================================================================== --- vendor/ntp/dist/html/drivers/driver40.html Tue Jun 23 23:52:43 2020 (r362564) +++ vendor/ntp/dist/html/drivers/driver40.html Wed Jun 24 00:20:45 2020 (r362565) @@ -52,14 +52,20 @@
server   127.127.40.X   mode 1

-
fudge   127.127.40.X   time1 0.NNN   flag1 0|1
+
fudge   127.127.40.X   time1 0.NNN   flag1 0|1   flag2 0|1   time2 H

Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds. You may specify the time offset from several tens of milli-seconds ( 0.0NN seconds ) to a hundred and several tens of milli-seconds ( 0.1NN seconds ) for this clock.

-

Flag1 has no effect for time synchronization. When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.

+

Time2 may specify a grace period in hours after the 'adjusted' reply of the STUS command stopped coming.
This hours is effective when both flag1 and flag2 are set to 1.

+

Flag1 has no effect for time synchronization unless flag2 is set to 1.
When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.

0 (Default)DCST and STUS commands are not issued
1DCST and STUS commands are issued
+

Flag2 enables the time synchronization only when the reply of the STUS is 'adjusted'. When this functionality is used, flag1 must be set to 1 together.

+ + + +
0 (Default)Always
1'adjusted' only

@@ -193,6 +199,7 @@
  • CITIZEN T.I.C. CO.,LTD.   JJY-200   http://www.tic-citizen.co.jp/ (Japanese only)


    +

    The JJY-200 became the end of sales in 2013.


    NTP configuration ( ntp.conf )

    Modified: vendor/ntp/dist/include/l_stdlib.h ============================================================================== --- vendor/ntp/dist/include/l_stdlib.h Tue Jun 23 23:52:43 2020 (r362564) +++ vendor/ntp/dist/include/l_stdlib.h Wed Jun 24 00:20:45 2020 (r362565) @@ -221,4 +221,13 @@ extern int errno; extern int h_errno; #endif +#ifndef HAVE_MEMCHR +extern void *memchr(const void *s, int c, size_t n); +#endif + +#ifndef HAVE_STRNLEN +extern size_t strnlen(const char *s, size_t n); +#endif + + #endif /* L_STDLIB_H */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Jun 24 00:22:11 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 812E433D8FA; Wed, 24 Jun 2020 00:22:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49s3kC2xxDz4LCt; Wed, 24 Jun 2020 00:22:11 +0000 (UTC) (envelope-from cy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46B33928B; Wed, 24 Jun 2020 00:22:11 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05O0MBAP043483; Wed, 24 Jun 2020 00:22:11 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05O0MB9a043481; Wed, 24 Jun 2020 00:22:11 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006240022.05O0MB9a043481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 24 Jun 2020 00:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362566 - vendor/ntp/4.2.8p15 X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: vendor/ntp/4.2.8p15 X-SVN-Commit-Revision: 362566 X-SVN-Commit-Repository: base 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.33 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, 24 Jun 2020 00:22:11 -0000 Author: cy Date: Wed Jun 24 00:22:10 2020 New Revision: 362566 URL: https://svnweb.freebsd.org/changeset/base/362566 Log: Tag ntp-4.2.8p15. Added: vendor/ntp/4.2.8p15/ - copied from r362565, vendor/ntp/dist/ From owner-svn-src-vendor@freebsd.org Wed Jun 24 20:22:46 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 210483429B4; Wed, 24 Jun 2020 20:22:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sZMV0Hnzz44PC; Wed, 24 Jun 2020 20:22:46 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04E4C1791F; Wed, 24 Jun 2020 20:22:46 +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 05OKMkXq018873; Wed, 24 Jun 2020 20:22:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OKMj2K018865; Wed, 24 Jun 2020 20:22:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006242022.05OKMj2K018865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 24 Jun 2020 20:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362593 - in vendor/llvm-project/release-10.x: clang/include/clang/Driver clang/lib/Basic/Targets clang/lib/Driver clang/lib/Driver/ToolChains/Arch llvm/include/llvm/CodeGen llvm/includ... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm-project/release-10.x: clang/include/clang/Driver clang/lib/Basic/Targets clang/lib/Driver clang/lib/Driver/ToolChains/Arch llvm/include/llvm/CodeGen llvm/include/llvm/IR llvm/include/ll... X-SVN-Commit-Revision: 362593 X-SVN-Commit-Repository: base 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.33 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, 24 Jun 2020 20:22:46 -0000 Author: dim Date: Wed Jun 24 20:22:44 2020 New Revision: 362593 URL: https://svnweb.freebsd.org/changeset/base/362593 Log: Vendor import of llvm-project branch release/10.x llvmorg-10.0.0-129-gd24d5c8e308. Added: vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFGraph.h (contents, props changed) vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFLiveness.h (contents, props changed) vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFRegisters.h (contents, props changed) vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFGraph.cpp (contents, props changed) vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFLiveness.cpp (contents, props changed) vendor/llvm-project/release-10.x/llvm/lib/CodeGen/RDFRegisters.cpp (contents, props changed) vendor/llvm-project/release-10.x/llvm/lib/Target/X86/ImmutableGraph.h (contents, props changed) vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86IndirectThunks.cpp (contents, props changed) vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp (contents, props changed) vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp (contents, props changed) Deleted: vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFGraph.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFGraph.h vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFLiveness.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFLiveness.h vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFRegisters.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFRegisters.h vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86RetpolineThunks.cpp Modified: vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td vendor/llvm-project/release-10.x/clang/lib/Basic/Targets/PPC.h vendor/llvm-project/release-10.x/clang/lib/Driver/SanitizerArgs.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChain.cpp vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Arch/X86.cpp vendor/llvm-project/release-10.x/llvm/include/llvm/IR/IntrinsicsPowerPC.td vendor/llvm-project/release-10.x/llvm/include/llvm/Support/ManagedStatic.h vendor/llvm-project/release-10.x/llvm/include/llvm/Target/TargetSelectionDAG.td vendor/llvm-project/release-10.x/llvm/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm-project/release-10.x/llvm/lib/LTO/LTO.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/BPF/BTFDebug.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFCopy.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFCopy.h vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFDeadCode.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/Hexagon/RDFDeadCode.h vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/P9InstrResources.td vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCInstrAltivec.td vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCInstrVSX.td vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86.h vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86.td vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86FastISel.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86FrameLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86ISelLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86ISelLowering.h vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86InstrCompiler.td vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86InstrControl.td vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86InstrInfo.td vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86MCInstLower.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86Subtarget.h vendor/llvm-project/release-10.x/llvm/lib/Target/X86/X86TargetMachine.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp Modified: vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td Wed Jun 24 19:51:03 2020 (r362592) +++ vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td Wed Jun 24 20:22:44 2020 (r362593) @@ -2267,6 +2267,14 @@ def mspeculative_load_hardening : Flag<["-"], "mspecul Group, Flags<[CoreOption,CC1Option]>; def mno_speculative_load_hardening : Flag<["-"], "mno-speculative-load-hardening">, Group, Flags<[CoreOption]>; +def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group, Flags<[CoreOption,DriverOption]>, + HelpText<"Enable all mitigations for Load Value Injection (LVI)">; +def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group, Flags<[CoreOption,DriverOption]>, + HelpText<"Disable mitigations for Load Value Injection (LVI)">; +def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group, Flags<[CoreOption,DriverOption]>, + HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">; +def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group, Flags<[CoreOption,DriverOption]>, + HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">; def mrelax : Flag<["-"], "mrelax">, Group, HelpText<"Enable linker relaxation">; Modified: vendor/llvm-project/release-10.x/clang/lib/Basic/Targets/PPC.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Basic/Targets/PPC.h Wed Jun 24 19:51:03 2020 (r362592) +++ vendor/llvm-project/release-10.x/clang/lib/Basic/Targets/PPC.h Wed Jun 24 20:22:44 2020 (r362593) @@ -276,11 +276,12 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public T break; case 'Q': // Memory operand that is an offset from a register (it is // usually better to use `m' or `es' in asm statements) + Info.setAllowsRegister(); + LLVM_FALLTHROUGH; case 'Z': // Memory operand that is an indexed or indirect from a // register (it is usually better to use `m' or `es' in // asm statements) Info.setAllowsMemory(); - Info.setAllowsRegister(); break; case 'R': // AIX TOC entry case 'a': // Address operand that is an indexed or indirect from a Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/SanitizerArgs.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/SanitizerArgs.cpp Wed Jun 24 19:51:03 2020 (r362592) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/SanitizerArgs.cpp Wed Jun 24 20:22:44 2020 (r362593) @@ -454,8 +454,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, << lastArgumentForMask(D, Args, Kinds & NeedsLTO) << "-flto"; } - if ((Kinds & SanitizerKind::ShadowCallStack) && - TC.getTriple().getArch() == llvm::Triple::aarch64 && + if ((Kinds & SanitizerKind::ShadowCallStack) && TC.getTriple().isAArch64() && !llvm::AArch64::isX18ReservedByDefault(TC.getTriple()) && !Args.hasArg(options::OPT_ffixed_x18)) { D.Diag(diag::err_drv_argument_only_allowed_with) Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChain.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChain.cpp Wed Jun 24 19:51:03 2020 (r362592) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChain.cpp Wed Jun 24 20:22:44 2020 (r362593) @@ -954,15 +954,12 @@ SanitizerMask ToolChain::getSupportedSanitizers() cons if (getTriple().getArch() == llvm::Triple::x86 || getTriple().getArch() == llvm::Triple::x86_64 || getTriple().getArch() == llvm::Triple::arm || - getTriple().getArch() == llvm::Triple::aarch64 || getTriple().getArch() == llvm::Triple::wasm32 || - getTriple().getArch() == llvm::Triple::wasm64) + getTriple().getArch() == llvm::Triple::wasm64 || getTriple().isAArch64()) Res |= SanitizerKind::CFIICall; - if (getTriple().getArch() == llvm::Triple::x86_64 || - getTriple().getArch() == llvm::Triple::aarch64) + if (getTriple().getArch() == llvm::Triple::x86_64 || getTriple().isAArch64()) Res |= SanitizerKind::ShadowCallStack; - if (getTriple().getArch() == llvm::Triple::aarch64 || - getTriple().getArch() == llvm::Triple::aarch64_be) + if (getTriple().isAArch64()) Res |= SanitizerKind::MemTag; return Res; } Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Arch/X86.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Arch/X86.cpp Wed Jun 24 19:51:03 2020 (r362592) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/ToolChains/Arch/X86.cpp Wed Jun 24 20:22:44 2020 (r362593) @@ -146,6 +146,7 @@ void x86::getX86TargetFeatures(const Driver &D, const // flags). This is a bit hacky but keeps existing usages working. We should // consider deprecating this and instead warn if the user requests external // retpoline thunks and *doesn't* request some form of retpolines. + auto SpectreOpt = clang::driver::options::ID::OPT_INVALID; if (Args.hasArgNoClaim(options::OPT_mretpoline, options::OPT_mno_retpoline, options::OPT_mspeculative_load_hardening, options::OPT_mno_speculative_load_hardening)) { @@ -153,12 +154,14 @@ void x86::getX86TargetFeatures(const Driver &D, const false)) { Features.push_back("+retpoline-indirect-calls"); Features.push_back("+retpoline-indirect-branches"); + SpectreOpt = options::OPT_mretpoline; } else if (Args.hasFlag(options::OPT_mspeculative_load_hardening, options::OPT_mno_speculative_load_hardening, false)) { // On x86, speculative load hardening relies on at least using retpolines // for indirect calls. Features.push_back("+retpoline-indirect-calls"); + SpectreOpt = options::OPT_mspeculative_load_hardening; } } else if (Args.hasFlag(options::OPT_mretpoline_external_thunk, options::OPT_mno_retpoline_external_thunk, false)) { @@ -166,6 +169,26 @@ void x86::getX86TargetFeatures(const Driver &D, const // eventually switch to an error here. Features.push_back("+retpoline-indirect-calls"); Features.push_back("+retpoline-indirect-branches"); + SpectreOpt = options::OPT_mretpoline_external_thunk; + } + + auto LVIOpt = clang::driver::options::ID::OPT_INVALID; + if (Args.hasFlag(options::OPT_mlvi_hardening, options::OPT_mno_lvi_hardening, + false)) { + Features.push_back("+lvi-load-hardening"); + Features.push_back("+lvi-cfi"); // load hardening implies CFI protection + LVIOpt = options::OPT_mlvi_hardening; + } else if (Args.hasFlag(options::OPT_mlvi_cfi, options::OPT_mno_lvi_cfi, + false)) { + Features.push_back("+lvi-cfi"); + LVIOpt = options::OPT_mlvi_cfi; + } + + if (SpectreOpt != clang::driver::options::ID::OPT_INVALID && + LVIOpt != clang::driver::options::ID::OPT_INVALID) { + D.Diag(diag::err_drv_argument_not_allowed_with) + << D.getOpts().getOptionName(SpectreOpt) + << D.getOpts().getOptionName(LVIOpt); } // Now add any that the user explicitly requested on the command line, Added: vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFGraph.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/llvm/include/llvm/CodeGen/RDFGraph.h Wed Jun 24 20:22:44 2020 (r362593) @@ -0,0 +1,968 @@ +//===- RDFGraph.h -----------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Target-independent, SSA-based data flow graph for register data flow (RDF) +// for a non-SSA program representation (e.g. post-RA machine code). +// +// +// *** Introduction +// +// The RDF graph is a collection of nodes, each of which denotes some element +// of the program. There are two main types of such elements: code and refe- +// rences. Conceptually, "code" is something that represents the structure +// of the program, e.g. basic block or a statement, while "reference" is an +// instance of accessing a register, e.g. a definition or a use. Nodes are +// connected with each other based on the structure of the program (such as +// blocks, instructions, etc.), and based on the data flow (e.g. reaching +// definitions, reached uses, etc.). The single-reaching-definition principle +// of SSA is generally observed, although, due to the non-SSA representation +// of the program, there are some differences between the graph and a "pure" +// SSA representation. +// +// +// *** Implementation remarks +// +// Since the graph can contain a large number of nodes, memory consumption +// was one of the major design considerations. As a result, there is a single +// base class NodeBase which defines all members used by all possible derived +// classes. The members are arranged in a union, and a derived class cannot +// add any data members of its own. Each derived class only defines the +// functional interface, i.e. member functions. NodeBase must be a POD, +// which implies that all of its members must also be PODs. +// Since nodes need to be connected with other nodes, pointers have been +// replaced with 32-bit identifiers: each node has an id of type NodeId. +// There are mapping functions in the graph that translate between actual +// memory addresses and the corresponding identifiers. +// A node id of 0 is equivalent to nullptr. +// +// +// *** Structure of the graph +// +// A code node is always a collection of other nodes. For example, a code +// node corresponding to a basic block will contain code nodes corresponding +// to instructions. In turn, a code node corresponding to an instruction will +// contain a list of reference nodes that correspond to the definitions and +// uses of registers in that instruction. The members are arranged into a +// circular list, which is yet another consequence of the effort to save +// memory: for each member node it should be possible to obtain its owner, +// and it should be possible to access all other members. There are other +// ways to accomplish that, but the circular list seemed the most natural. +// +// +- CodeNode -+ +// | | <---------------------------------------------------+ +// +-+--------+-+ | +// |FirstM |LastM | +// | +-------------------------------------+ | +// | | | +// V V | +// +----------+ Next +----------+ Next Next +----------+ Next | +// | |----->| |-----> ... ----->| |----->-+ +// +- Member -+ +- Member -+ +- Member -+ +// +// The order of members is such that related reference nodes (see below) +// should be contiguous on the member list. +// +// A reference node is a node that encapsulates an access to a register, +// in other words, data flowing into or out of a register. There are two +// major kinds of reference nodes: defs and uses. A def node will contain +// the id of the first reached use, and the id of the first reached def. +// Each def and use will contain the id of the reaching def, and also the +// id of the next reached def (for def nodes) or use (for use nodes). +// The "next node sharing the same reaching def" is denoted as "sibling". +// In summary: +// - Def node contains: reaching def, sibling, first reached def, and first +// reached use. +// - Use node contains: reaching def and sibling. +// +// +-- DefNode --+ +// | R2 = ... | <---+--------------------+ +// ++---------+--+ | | +// |Reached |Reached | | +// |Def |Use | | +// | | |Reaching |Reaching +// | V |Def |Def +// | +-- UseNode --+ Sib +-- UseNode --+ Sib Sib +// | | ... = R2 |----->| ... = R2 |----> ... ----> 0 +// | +-------------+ +-------------+ +// V +// +-- DefNode --+ Sib +// | R2 = ... |----> ... +// ++---------+--+ +// | | +// | | +// ... ... +// +// To get a full picture, the circular lists connecting blocks within a +// function, instructions within a block, etc. should be superimposed with +// the def-def, def-use links shown above. +// To illustrate this, consider a small example in a pseudo-assembly: +// foo: +// add r2, r0, r1 ; r2 = r0+r1 +// addi r0, r2, 1 ; r0 = r2+1 +// ret r0 ; return value in r0 +// +// The graph (in a format used by the debugging functions) would look like: +// +// DFG dump:[ +// f1: Function foo +// b2: === %bb.0 === preds(0), succs(0): +// p3: phi [d4(,d12,u9):] +// p5: phi [d6(,,u10):] +// s7: add [d8(,,u13):, u9(d4):, u10(d6):] +// s11: addi [d12(d4,,u15):, u13(d8):] +// s14: ret [u15(d12):] +// ] +// +// The f1, b2, p3, etc. are node ids. The letter is prepended to indicate the +// kind of the node (i.e. f - function, b - basic block, p - phi, s - state- +// ment, d - def, u - use). +// The format of a def node is: +// dN(rd,d,u):sib, +// where +// N - numeric node id, +// R - register being defined +// rd - reaching def, +// d - reached def, +// u - reached use, +// sib - sibling. +// The format of a use node is: +// uN[!](rd):sib, +// where +// N - numeric node id, +// R - register being used, +// rd - reaching def, +// sib - sibling. +// Possible annotations (usually preceding the node id): +// + - preserving def, +// ~ - clobbering def, +// " - shadow ref (follows the node id), +// ! - fixed register (appears after register name). +// +// The circular lists are not explicit in the dump. +// +// +// *** Node attributes +// +// NodeBase has a member "Attrs", which is the primary way of determining +// the node's characteristics. The fields in this member decide whether +// the node is a code node or a reference node (i.e. node's "type"), then +// within each type, the "kind" determines what specifically this node +// represents. The remaining bits, "flags", contain additional information +// that is even more detailed than the "kind". +// CodeNode's kinds are: +// - Phi: Phi node, members are reference nodes. +// - Stmt: Statement, members are reference nodes. +// - Block: Basic block, members are instruction nodes (i.e. Phi or Stmt). +// - Func: The whole function. The members are basic block nodes. +// RefNode's kinds are: +// - Use. +// - Def. +// +// Meaning of flags: +// - Preserving: applies only to defs. A preserving def is one that can +// preserve some of the original bits among those that are included in +// the register associated with that def. For example, if R0 is a 32-bit +// register, but a def can only change the lower 16 bits, then it will +// be marked as preserving. +// - Shadow: a reference that has duplicates holding additional reaching +// defs (see more below). +// - Clobbering: applied only to defs, indicates that the value generated +// by this def is unspecified. A typical example would be volatile registers +// after function calls. +// - Fixed: the register in this def/use cannot be replaced with any other +// register. A typical case would be a parameter register to a call, or +// the register with the return value from a function. +// - Undef: the register in this reference the register is assumed to have +// no pre-existing value, even if it appears to be reached by some def. +// This is typically used to prevent keeping registers artificially live +// in cases when they are defined via predicated instructions. For example: +// r0 = add-if-true cond, r10, r11 (1) +// r0 = add-if-false cond, r12, r13, implicit r0 (2) +// ... = r0 (3) +// Before (1), r0 is not intended to be live, and the use of r0 in (3) is +// not meant to be reached by any def preceding (1). However, since the +// defs in (1) and (2) are both preserving, these properties alone would +// imply that the use in (3) may indeed be reached by some prior def. +// Adding Undef flag to the def in (1) prevents that. The Undef flag +// may be applied to both defs and uses. +// - Dead: applies only to defs. The value coming out of a "dead" def is +// assumed to be unused, even if the def appears to be reaching other defs +// or uses. The motivation for this flag comes from dead defs on function +// calls: there is no way to determine if such a def is dead without +// analyzing the target's ABI. Hence the graph should contain this info, +// as it is unavailable otherwise. On the other hand, a def without any +// uses on a typical instruction is not the intended target for this flag. +// +// *** Shadow references +// +// It may happen that a super-register can have two (or more) non-overlapping +// sub-registers. When both of these sub-registers are defined and followed +// by a use of the super-register, the use of the super-register will not +// have a unique reaching def: both defs of the sub-registers need to be +// accounted for. In such cases, a duplicate use of the super-register is +// added and it points to the extra reaching def. Both uses are marked with +// a flag "shadow". Example: +// Assume t0 is a super-register of r0 and r1, r0 and r1 do not overlap: +// set r0, 1 ; r0 = 1 +// set r1, 1 ; r1 = 1 +// addi t1, t0, 1 ; t1 = t0+1 +// +// The DFG: +// s1: set [d2(,,u9):] +// s3: set [d4(,,u10):] +// s5: addi [d6(,,):, u7"(d2):, u8"(d4):] +// +// The statement s5 has two use nodes for t0: u7" and u9". The quotation +// mark " indicates that the node is a shadow. +// + +#ifndef LLVM_LIB_TARGET_HEXAGON_RDFGRAPH_H +#define LLVM_LIB_TARGET_HEXAGON_RDFGRAPH_H + +#include "RDFRegisters.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/MC/LaneBitmask.h" +#include "llvm/Support/Allocator.h" +#include "llvm/Support/MathExtras.h" +#include +#include +#include +#include +#include +#include +#include +#include + +// RDF uses uint32_t to refer to registers. This is to ensure that the type +// size remains specific. In other places, registers are often stored using +// unsigned. +static_assert(sizeof(uint32_t) == sizeof(unsigned), "Those should be equal"); + +namespace llvm { + +class MachineBasicBlock; +class MachineDominanceFrontier; +class MachineDominatorTree; +class MachineFunction; +class MachineInstr; +class MachineOperand; +class raw_ostream; +class TargetInstrInfo; +class TargetRegisterInfo; + +namespace rdf { + + using NodeId = uint32_t; + + struct DataFlowGraph; + + struct NodeAttrs { + enum : uint16_t { + None = 0x0000, // Nothing + + // Types: 2 bits + TypeMask = 0x0003, + Code = 0x0001, // 01, Container + Ref = 0x0002, // 10, Reference + + // Kind: 3 bits + KindMask = 0x0007 << 2, + Def = 0x0001 << 2, // 001 + Use = 0x0002 << 2, // 010 + Phi = 0x0003 << 2, // 011 + Stmt = 0x0004 << 2, // 100 + Block = 0x0005 << 2, // 101 + Func = 0x0006 << 2, // 110 + + // Flags: 7 bits for now + FlagMask = 0x007F << 5, + Shadow = 0x0001 << 5, // 0000001, Has extra reaching defs. + Clobbering = 0x0002 << 5, // 0000010, Produces unspecified values. + PhiRef = 0x0004 << 5, // 0000100, Member of PhiNode. + Preserving = 0x0008 << 5, // 0001000, Def can keep original bits. + Fixed = 0x0010 << 5, // 0010000, Fixed register. + Undef = 0x0020 << 5, // 0100000, Has no pre-existing value. + Dead = 0x0040 << 5, // 1000000, Does not define a value. + }; + + static uint16_t type(uint16_t T) { return T & TypeMask; } + static uint16_t kind(uint16_t T) { return T & KindMask; } + static uint16_t flags(uint16_t T) { return T & FlagMask; } + + static uint16_t set_type(uint16_t A, uint16_t T) { + return (A & ~TypeMask) | T; + } + + static uint16_t set_kind(uint16_t A, uint16_t K) { + return (A & ~KindMask) | K; + } + + static uint16_t set_flags(uint16_t A, uint16_t F) { + return (A & ~FlagMask) | F; + } + + // Test if A contains B. + static bool contains(uint16_t A, uint16_t B) { + if (type(A) != Code) + return false; + uint16_t KB = kind(B); + switch (kind(A)) { + case Func: + return KB == Block; + case Block: + return KB == Phi || KB == Stmt; + case Phi: + case Stmt: + return type(B) == Ref; + } + return false; + } + }; + + struct BuildOptions { + enum : unsigned { + None = 0x00, + KeepDeadPhis = 0x01, // Do not remove dead phis during build. + }; + }; + + template struct NodeAddr { + NodeAddr() = default; + NodeAddr(T A, NodeId I) : Addr(A), Id(I) {} + + // Type cast (casting constructor). The reason for having this class + // instead of std::pair. + template NodeAddr(const NodeAddr &NA) + : Addr(static_cast(NA.Addr)), Id(NA.Id) {} + + bool operator== (const NodeAddr &NA) const { + assert((Addr == NA.Addr) == (Id == NA.Id)); + return Addr == NA.Addr; + } + bool operator!= (const NodeAddr &NA) const { + return !operator==(NA); + } + + T Addr = nullptr; + NodeId Id = 0; + }; + + struct NodeBase; + + // Fast memory allocation and translation between node id and node address. + // This is really the same idea as the one underlying the "bump pointer + // allocator", the difference being in the translation. A node id is + // composed of two components: the index of the block in which it was + // allocated, and the index within the block. With the default settings, + // where the number of nodes per block is 4096, the node id (minus 1) is: + // + // bit position: 11 0 + // +----------------------------+--------------+ + // | Index of the block |Index in block| + // +----------------------------+--------------+ + // + // The actual node id is the above plus 1, to avoid creating a node id of 0. + // + // This method significantly improved the build time, compared to using maps + // (std::unordered_map or DenseMap) to translate between pointers and ids. + struct NodeAllocator { + // Amount of storage for a single node. + enum { NodeMemSize = 32 }; + + NodeAllocator(uint32_t NPB = 4096) + : NodesPerBlock(NPB), BitsPerIndex(Log2_32(NPB)), + IndexMask((1 << BitsPerIndex)-1) { + assert(isPowerOf2_32(NPB)); + } + + NodeBase *ptr(NodeId N) const { + uint32_t N1 = N-1; + uint32_t BlockN = N1 >> BitsPerIndex; + uint32_t Offset = (N1 & IndexMask) * NodeMemSize; + return reinterpret_cast(Blocks[BlockN]+Offset); + } + + NodeId id(const NodeBase *P) const; + NodeAddr New(); + void clear(); + + private: + void startNewBlock(); + bool needNewBlock(); + + uint32_t makeId(uint32_t Block, uint32_t Index) const { + // Add 1 to the id, to avoid the id of 0, which is treated as "null". + return ((Block << BitsPerIndex) | Index) + 1; + } + + const uint32_t NodesPerBlock; + const uint32_t BitsPerIndex; + const uint32_t IndexMask; + char *ActiveEnd = nullptr; + std::vector Blocks; + using AllocatorTy = BumpPtrAllocatorImpl; + AllocatorTy MemPool; + }; + + using RegisterSet = std::set; + + struct TargetOperandInfo { + TargetOperandInfo(const TargetInstrInfo &tii) : TII(tii) {} + virtual ~TargetOperandInfo() = default; + + virtual bool isPreserving(const MachineInstr &In, unsigned OpNum) const; + virtual bool isClobbering(const MachineInstr &In, unsigned OpNum) const; + virtual bool isFixedReg(const MachineInstr &In, unsigned OpNum) const; + + const TargetInstrInfo &TII; + }; + + // Packed register reference. Only used for storage. + struct PackedRegisterRef { + RegisterId Reg; + uint32_t MaskId; + }; + + struct LaneMaskIndex : private IndexedSet { + LaneMaskIndex() = default; + + LaneBitmask getLaneMaskForIndex(uint32_t K) const { + return K == 0 ? LaneBitmask::getAll() : get(K); + } + + uint32_t getIndexForLaneMask(LaneBitmask LM) { + assert(LM.any()); + return LM.all() ? 0 : insert(LM); + } + + uint32_t getIndexForLaneMask(LaneBitmask LM) const { + assert(LM.any()); + return LM.all() ? 0 : find(LM); + } + }; + + struct NodeBase { + public: + // Make sure this is a POD. + NodeBase() = default; + + uint16_t getType() const { return NodeAttrs::type(Attrs); } + uint16_t getKind() const { return NodeAttrs::kind(Attrs); } + uint16_t getFlags() const { return NodeAttrs::flags(Attrs); } + NodeId getNext() const { return Next; } + + uint16_t getAttrs() const { return Attrs; } + void setAttrs(uint16_t A) { Attrs = A; } + void setFlags(uint16_t F) { setAttrs(NodeAttrs::set_flags(getAttrs(), F)); } + + // Insert node NA after "this" in the circular chain. + void append(NodeAddr NA); + + // Initialize all members to 0. + void init() { memset(this, 0, sizeof *this); } + + void setNext(NodeId N) { Next = N; } + + protected: + uint16_t Attrs; + uint16_t Reserved; + NodeId Next; // Id of the next node in the circular chain. + // Definitions of nested types. Using anonymous nested structs would make + // this class definition clearer, but unnamed structs are not a part of + // the standard. + struct Def_struct { + NodeId DD, DU; // Ids of the first reached def and use. + }; + struct PhiU_struct { + NodeId PredB; // Id of the predecessor block for a phi use. + }; + struct Code_struct { + void *CP; // Pointer to the actual code. + NodeId FirstM, LastM; // Id of the first member and last. + }; + struct Ref_struct { + NodeId RD, Sib; // Ids of the reaching def and the sibling. + union { + Def_struct Def; + PhiU_struct PhiU; + }; + union { + MachineOperand *Op; // Non-phi refs point to a machine operand. + PackedRegisterRef PR; // Phi refs store register info directly. + }; + }; + + // The actual payload. + union { + Ref_struct Ref; + Code_struct Code; + }; + }; + // The allocator allocates chunks of 32 bytes for each node. The fact that + // each node takes 32 bytes in memory is used for fast translation between + // the node id and the node address. + static_assert(sizeof(NodeBase) <= NodeAllocator::NodeMemSize, + "NodeBase must be at most NodeAllocator::NodeMemSize bytes"); + + using NodeList = SmallVector, 4>; + using NodeSet = std::set; + + struct RefNode : public NodeBase { + RefNode() = default; + + RegisterRef getRegRef(const DataFlowGraph &G) const; + + MachineOperand &getOp() { + assert(!(getFlags() & NodeAttrs::PhiRef)); + return *Ref.Op; + } + + void setRegRef(RegisterRef RR, DataFlowGraph &G); + void setRegRef(MachineOperand *Op, DataFlowGraph &G); + + NodeId getReachingDef() const { + return Ref.RD; + } + void setReachingDef(NodeId RD) { + Ref.RD = RD; + } + + NodeId getSibling() const { + return Ref.Sib; + } + void setSibling(NodeId Sib) { + Ref.Sib = Sib; + } + + bool isUse() const { + assert(getType() == NodeAttrs::Ref); + return getKind() == NodeAttrs::Use; + } + + bool isDef() const { + assert(getType() == NodeAttrs::Ref); + return getKind() == NodeAttrs::Def; + } + + template + NodeAddr getNextRef(RegisterRef RR, Predicate P, bool NextOnly, + const DataFlowGraph &G); + NodeAddr getOwner(const DataFlowGraph &G); + }; + + struct DefNode : public RefNode { + NodeId getReachedDef() const { + return Ref.Def.DD; + } + void setReachedDef(NodeId D) { + Ref.Def.DD = D; + } + NodeId getReachedUse() const { + return Ref.Def.DU; + } + void setReachedUse(NodeId U) { + Ref.Def.DU = U; + } + + void linkToDef(NodeId Self, NodeAddr DA); + }; + + struct UseNode : public RefNode { + void linkToDef(NodeId Self, NodeAddr DA); + }; + + struct PhiUseNode : public UseNode { + NodeId getPredecessor() const { + assert(getFlags() & NodeAttrs::PhiRef); + return Ref.PhiU.PredB; + } + void setPredecessor(NodeId B) { + assert(getFlags() & NodeAttrs::PhiRef); + Ref.PhiU.PredB = B; + } + }; + + struct CodeNode : public NodeBase { + template T getCode() const { + return static_cast(Code.CP); + } + void setCode(void *C) { + Code.CP = C; + } + + NodeAddr getFirstMember(const DataFlowGraph &G) const; + NodeAddr getLastMember(const DataFlowGraph &G) const; + void addMember(NodeAddr NA, const DataFlowGraph &G); + void addMemberAfter(NodeAddr MA, NodeAddr NA, + const DataFlowGraph &G); + void removeMember(NodeAddr NA, const DataFlowGraph &G); + + NodeList members(const DataFlowGraph &G) const; + template + NodeList members_if(Predicate P, const DataFlowGraph &G) const; + }; + + struct InstrNode : public CodeNode { + NodeAddr getOwner(const DataFlowGraph &G); + }; + + struct PhiNode : public InstrNode { + MachineInstr *getCode() const { + return nullptr; + } + }; + + struct StmtNode : public InstrNode { + MachineInstr *getCode() const { + return CodeNode::getCode(); + } + }; + + struct BlockNode : public CodeNode { + MachineBasicBlock *getCode() const { + return CodeNode::getCode(); + } + + void addPhi(NodeAddr PA, const DataFlowGraph &G); + }; + + struct FuncNode : public CodeNode { + MachineFunction *getCode() const { + return CodeNode::getCode(); + } + + NodeAddr findBlock(const MachineBasicBlock *BB, + const DataFlowGraph &G) const; + NodeAddr getEntryBlock(const DataFlowGraph &G); + }; + + struct DataFlowGraph { + DataFlowGraph(MachineFunction &mf, const TargetInstrInfo &tii, + const TargetRegisterInfo &tri, const MachineDominatorTree &mdt, + const MachineDominanceFrontier &mdf, const TargetOperandInfo &toi); + + NodeBase *ptr(NodeId N) const; + template T ptr(NodeId N) const { + return static_cast(ptr(N)); + } + + NodeId id(const NodeBase *P) const; + + template NodeAddr addr(NodeId N) const { + return { ptr(N), N }; + } + + NodeAddr getFunc() const { return Func; } + MachineFunction &getMF() const { return MF; } + const TargetInstrInfo &getTII() const { return TII; } + const TargetRegisterInfo &getTRI() const { return TRI; } + const PhysicalRegisterInfo &getPRI() const { return PRI; } + const MachineDominatorTree &getDT() const { return MDT; } + const MachineDominanceFrontier &getDF() const { return MDF; } + const RegisterAggr &getLiveIns() const { return LiveIns; } + + struct DefStack { + DefStack() = default; + + bool empty() const { return Stack.empty() || top() == bottom(); } + + private: + using value_type = NodeAddr; + struct Iterator { + using value_type = DefStack::value_type; + + Iterator &up() { Pos = DS.nextUp(Pos); return *this; } + Iterator &down() { Pos = DS.nextDown(Pos); return *this; } + + value_type operator*() const { + assert(Pos >= 1); + return DS.Stack[Pos-1]; + } + const value_type *operator->() const { + assert(Pos >= 1); + return &DS.Stack[Pos-1]; + } + bool operator==(const Iterator &It) const { return Pos == It.Pos; } + bool operator!=(const Iterator &It) const { return Pos != It.Pos; } + + private: + friend struct DefStack; + + Iterator(const DefStack &S, bool Top); + + // Pos-1 is the index in the StorageType object that corresponds to + // the top of the DefStack. + const DefStack &DS; + unsigned Pos; + }; + + public: + using iterator = Iterator; + + iterator top() const { return Iterator(*this, true); } + iterator bottom() const { return Iterator(*this, false); } + unsigned size() const; + + void push(NodeAddr DA) { Stack.push_back(DA); } + void pop(); + void start_block(NodeId N); + void clear_block(NodeId N); + + private: + friend struct Iterator; + + using StorageType = std::vector; + + bool isDelimiter(const StorageType::value_type &P, NodeId N = 0) const { + return (P.Addr == nullptr) && (N == 0 || P.Id == N); + } + + unsigned nextUp(unsigned P) const; + unsigned nextDown(unsigned P) const; + + StorageType Stack; + }; + + // Make this std::unordered_map for speed of accessing elements. + // Map: Register (physical or virtual) -> DefStack + using DefStackMap = std::unordered_map; + + void build(unsigned Options = BuildOptions::None); + void pushAllDefs(NodeAddr IA, DefStackMap &DM); + void markBlock(NodeId B, DefStackMap &DefM); + void releaseBlock(NodeId B, DefStackMap &DefM); + + PackedRegisterRef pack(RegisterRef RR) { + return { RR.Reg, LMI.getIndexForLaneMask(RR.Mask) }; + } + PackedRegisterRef pack(RegisterRef RR) const { + return { RR.Reg, LMI.getIndexForLaneMask(RR.Mask) }; + } + RegisterRef unpack(PackedRegisterRef PR) const { + return RegisterRef(PR.Reg, LMI.getLaneMaskForIndex(PR.MaskId)); + } + + RegisterRef makeRegRef(unsigned Reg, unsigned Sub) const; + RegisterRef makeRegRef(const MachineOperand &Op) const; + RegisterRef restrictRef(RegisterRef AR, RegisterRef BR) const; + + NodeAddr getNextRelated(NodeAddr IA, + NodeAddr RA) const; + NodeAddr getNextImp(NodeAddr IA, + NodeAddr RA, bool Create); + NodeAddr getNextImp(NodeAddr IA, + NodeAddr RA) const; + NodeAddr getNextShadow(NodeAddr IA, + NodeAddr RA, bool Create); + NodeAddr getNextShadow(NodeAddr IA, + NodeAddr RA) const; + + NodeList getRelatedRefs(NodeAddr IA, + NodeAddr RA) const; + + NodeAddr findBlock(MachineBasicBlock *BB) const { + return BlockNodes.at(BB); + } + + void unlinkUse(NodeAddr UA, bool RemoveFromOwner) { + unlinkUseDF(UA); + if (RemoveFromOwner) + removeFromOwner(UA); + } + + void unlinkDef(NodeAddr DA, bool RemoveFromOwner) { + unlinkDefDF(DA); + if (RemoveFromOwner) + removeFromOwner(DA); + } + + // Some useful filters. + template + static bool IsRef(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Ref && + BA.Addr->getKind() == Kind; + } + + template + static bool IsCode(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Code && + BA.Addr->getKind() == Kind; + } + + static bool IsDef(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Ref && + BA.Addr->getKind() == NodeAttrs::Def; + } + + static bool IsUse(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Ref && + BA.Addr->getKind() == NodeAttrs::Use; + } + + static bool IsPhi(const NodeAddr BA) { + return BA.Addr->getType() == NodeAttrs::Code && + BA.Addr->getKind() == NodeAttrs::Phi; + } + + static bool IsPreservingDef(const NodeAddr DA) { + uint16_t Flags = DA.Addr->getFlags(); + return (Flags & NodeAttrs::Preserving) && !(Flags & NodeAttrs::Undef); + } + + private: + void reset(); + + RegisterSet getLandingPadLiveIns() const; + + NodeAddr newNode(uint16_t Attrs); + NodeAddr cloneNode(const NodeAddr B); + NodeAddr newUse(NodeAddr Owner, + MachineOperand &Op, uint16_t Flags = NodeAttrs::None); + NodeAddr newPhiUse(NodeAddr Owner, + RegisterRef RR, NodeAddr PredB, + uint16_t Flags = NodeAttrs::PhiRef); + NodeAddr newDef(NodeAddr Owner, + MachineOperand &Op, uint16_t Flags = NodeAttrs::None); + NodeAddr newDef(NodeAddr Owner, + RegisterRef RR, uint16_t Flags = NodeAttrs::PhiRef); + NodeAddr newPhi(NodeAddr Owner); + NodeAddr newStmt(NodeAddr Owner, + MachineInstr *MI); + NodeAddr newBlock(NodeAddr Owner, + MachineBasicBlock *BB); + NodeAddr newFunc(MachineFunction *MF); + + template + std::pair,NodeAddr> + locateNextRef(NodeAddr IA, NodeAddr RA, + Predicate P) const; + + using BlockRefsMap = std::map; + + void buildStmt(NodeAddr BA, MachineInstr &In); + void recordDefsForDF(BlockRefsMap &PhiM, NodeAddr BA); + void buildPhis(BlockRefsMap &PhiM, RegisterSet &AllRefs, + NodeAddr BA); + void removeUnusedPhis(); + + void pushClobbers(NodeAddr IA, DefStackMap &DM); + void pushDefs(NodeAddr IA, DefStackMap &DM); + template void linkRefUp(NodeAddr IA, + NodeAddr TA, DefStack &DS); + template void linkStmtRefs(DefStackMap &DefM, + NodeAddr SA, Predicate P); + void linkBlockRefs(DefStackMap &DefM, NodeAddr BA); + + void unlinkUseDF(NodeAddr UA); + void unlinkDefDF(NodeAddr DA); + + void removeFromOwner(NodeAddr RA) { + NodeAddr IA = RA.Addr->getOwner(*this); + IA.Addr->removeMember(RA, *this); + } + + MachineFunction &MF; + const TargetInstrInfo &TII; + const TargetRegisterInfo &TRI; + const PhysicalRegisterInfo PRI; + const MachineDominatorTree &MDT; + const MachineDominanceFrontier &MDF; + const TargetOperandInfo &TOI; + + RegisterAggr LiveIns; + NodeAddr Func; + NodeAllocator Memory; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Wed Jun 24 20:23:38 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CF95342BAA; Wed, 24 Jun 2020 20:23:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sZNV2MG4z44TR; Wed, 24 Jun 2020 20:23:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 33DA717759; Wed, 24 Jun 2020 20: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 05OKNcKr018976; Wed, 24 Jun 2020 20:23:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OKNcwg018975; Wed, 24 Jun 2020 20:23:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006242023.05OKNcwg018975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 24 Jun 2020 20:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362594 - vendor/llvm-project/llvmorg-10.0.0-129-gd24d5c8e308 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-project/llvmorg-10.0.0-129-gd24d5c8e308 X-SVN-Commit-Revision: 362594 X-SVN-Commit-Repository: base 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.33 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, 24 Jun 2020 20:23:38 -0000 Author: dim Date: Wed Jun 24 20:23:37 2020 New Revision: 362594 URL: https://svnweb.freebsd.org/changeset/base/362594 Log: Tag llvm-project branch release/10.x llvmorg-10.0.0-129-gd24d5c8e308. Added: vendor/llvm-project/llvmorg-10.0.0-129-gd24d5c8e308/ - copied from r362593, vendor/llvm-project/release-10.x/ From owner-svn-src-vendor@freebsd.org Sat Jun 27 15:03:20 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6F22353C25; Sat, 27 Jun 2020 15:03:20 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vH7X47Mpz43xM; Sat, 27 Jun 2020 15:03:20 +0000 (UTC) (envelope-from se@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 886AD26EBC; Sat, 27 Jun 2020 15:03:20 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RF3KYd099809; Sat, 27 Jun 2020 15:03:20 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RF3J0G099804; Sat, 27 Jun 2020 15:03:19 GMT (envelope-from se@FreeBSD.org) Message-Id: <202006271503.05RF3J0G099804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 27 Jun 2020 15:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362697 - in vendor/bc: . dist dist/gen dist/include dist/locales dist/manuals dist/src dist/src/bc dist/src/dc dist/src/history dist/src/rand dist/tests dist/tests/bc dist/tests/bc/err... X-SVN-Group: vendor X-SVN-Commit-Author: se X-SVN-Commit-Paths: in vendor/bc: . dist dist/gen dist/include dist/locales dist/manuals dist/src dist/src/bc dist/src/dc dist/src/history dist/src/rand dist/tests dist/tests/bc dist/tests/bc/errors dist/tests/bc/scripts... X-SVN-Commit-Revision: 362697 X-SVN-Commit-Repository: base 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.33 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, 27 Jun 2020 15:03:20 -0000 Author: se Date: Sat Jun 27 15:03:19 2020 New Revision: 362697 URL: https://svnweb.freebsd.org/changeset/base/362697 Log: Import new 2-clause BSD licenced implementation of the bc and dc commands These implementations of the bc and dc programs offer a number of advantages compared to the current implementations in the FreeBSD base system: - They do not depend on external large number functions (i.e. no dependency on OpenSSL or any other large number library) - They implements all features found in GNU bc/dc (with the exception of the forking of sub-processes, which the author of this version considers as a security issue). - They are significantly faster than the current code in base (more than 2 orders of magnitude in some of my tests, e.g. for 12345^100000). - They should be fully compatible with all features and the behavior of the current implementations in FreeBSD (not formally verified). - They support POSIX message catalogs and come with localized messages in Chinese, Dutch, English, French, German, Japanese, Polish, Portugueze, and Russian. - They offer very detailed man-pages that provide far more information than the current ones. Approved by: imp Obtained from: https://git.yzena.com/gavin/bc Differential Revision: https://reviews.freebsd.org/D19982 Added: vendor/bc/ vendor/bc/dist/.gitignore vendor/bc/dist/.travis.yml vendor/bc/dist/LICENSE.md vendor/bc/dist/Makefile.in (contents, props changed) vendor/bc/dist/NEWS.md vendor/bc/dist/NOTICE.md vendor/bc/dist/README.md vendor/bc/dist/RELEASE.md vendor/bc/dist/TODO.md vendor/bc/dist/codecov.yml vendor/bc/dist/configure (contents, props changed) vendor/bc/dist/configure.sh (contents, props changed) vendor/bc/dist/functions.sh (contents, props changed) vendor/bc/dist/gen/ vendor/bc/dist/gen/bc_help.txt (contents, props changed) vendor/bc/dist/gen/dc_help.txt (contents, props changed) vendor/bc/dist/gen/lib.bc vendor/bc/dist/gen/lib2.bc vendor/bc/dist/gen/strgen.c (contents, props changed) vendor/bc/dist/gen/strgen.sh (contents, props changed) vendor/bc/dist/include/ vendor/bc/dist/include/args.h (contents, props changed) vendor/bc/dist/include/bc.h (contents, props changed) vendor/bc/dist/include/dc.h (contents, props changed) vendor/bc/dist/include/file.h (contents, props changed) vendor/bc/dist/include/history.h (contents, props changed) vendor/bc/dist/include/lang.h (contents, props changed) vendor/bc/dist/include/lex.h (contents, props changed) vendor/bc/dist/include/num.h (contents, props changed) vendor/bc/dist/include/opt.h (contents, props changed) vendor/bc/dist/include/parse.h (contents, props changed) vendor/bc/dist/include/program.h (contents, props changed) vendor/bc/dist/include/rand.h (contents, props changed) vendor/bc/dist/include/read.h (contents, props changed) vendor/bc/dist/include/status.h (contents, props changed) vendor/bc/dist/include/vector.h (contents, props changed) vendor/bc/dist/include/vm.h (contents, props changed) vendor/bc/dist/install.sh (contents, props changed) vendor/bc/dist/karatsuba.py (contents, props changed) vendor/bc/dist/link.sh (contents, props changed) vendor/bc/dist/locale_install.sh (contents, props changed) vendor/bc/dist/locale_uninstall.sh (contents, props changed) vendor/bc/dist/locales/ vendor/bc/dist/locales/de_AT.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/de_AT.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/de_AT.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/de_AT.utf8.msg (contents, props changed) vendor/bc/dist/locales/de_CH.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/de_CH.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/de_CH.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/de_CH.utf8.msg (contents, props changed) vendor/bc/dist/locales/de_DE.ISO8859-1.msg vendor/bc/dist/locales/de_DE.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/de_DE.UTF-8.msg vendor/bc/dist/locales/de_DE.utf8.msg (contents, props changed) vendor/bc/dist/locales/en_AU.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/en_AU.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/en_AU.US-ASCII.msg (contents, props changed) vendor/bc/dist/locales/en_AU.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/en_AU.utf8.msg (contents, props changed) vendor/bc/dist/locales/en_CA.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/en_CA.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/en_CA.US-ASCII.msg (contents, props changed) vendor/bc/dist/locales/en_CA.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/en_CA.utf8.msg (contents, props changed) vendor/bc/dist/locales/en_GB.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/en_GB.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/en_GB.US-ASCII.msg (contents, props changed) vendor/bc/dist/locales/en_GB.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/en_GB.utf8.msg (contents, props changed) vendor/bc/dist/locales/en_IE.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/en_IE.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/en_IE.US_ASCII.msg (contents, props changed) vendor/bc/dist/locales/en_IE.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/en_IE.utf8.msg (contents, props changed) vendor/bc/dist/locales/en_NZ.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/en_NZ.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/en_NZ.US-ASCII.msg (contents, props changed) vendor/bc/dist/locales/en_NZ.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/en_NZ.utf8.msg (contents, props changed) vendor/bc/dist/locales/en_US.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/en_US.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/en_US.US-ASCII.msg (contents, props changed) vendor/bc/dist/locales/en_US.US_ASCII.msg (contents, props changed) vendor/bc/dist/locales/en_US.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/en_US.msg vendor/bc/dist/locales/en_US.utf8.msg (contents, props changed) vendor/bc/dist/locales/es_ES.UTF-8.msg vendor/bc/dist/locales/es_ES.utf8.msg (contents, props changed) vendor/bc/dist/locales/fr_BE.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/fr_BE.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/fr_BE.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/fr_BE.utf8.msg (contents, props changed) vendor/bc/dist/locales/fr_CA.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/fr_CA.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/fr_CA.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/fr_CA.utf8.msg (contents, props changed) vendor/bc/dist/locales/fr_CH.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/fr_CH.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/fr_CH.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/fr_CH.utf8.msg (contents, props changed) vendor/bc/dist/locales/fr_FR.ISO8859-1.msg vendor/bc/dist/locales/fr_FR.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/fr_FR.UTF-8.msg vendor/bc/dist/locales/fr_FR.utf8.msg (contents, props changed) vendor/bc/dist/locales/ja_JP.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/ja_JP.eucJP.msg (contents, props changed) vendor/bc/dist/locales/ja_JP.utf8.msg (contents, props changed) vendor/bc/dist/locales/nl_BE.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/nl_BE.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/nl_NL.ISO8859-1.msg vendor/bc/dist/locales/nl_NL.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/nl_NL.UTF-8.msg vendor/bc/dist/locales/nl_NL.utf8.msg (contents, props changed) vendor/bc/dist/locales/pl_PL.ISO8859-2.msg vendor/bc/dist/locales/pl_PL.UTF-8.msg vendor/bc/dist/locales/pl_PL.utf8.msg (contents, props changed) vendor/bc/dist/locales/pt_BR.ISO8859-1.msg (contents, props changed) vendor/bc/dist/locales/pt_BR.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/pt_BR.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/pt_BR.utf8.msg (contents, props changed) vendor/bc/dist/locales/pt_PT.ISO8859-1.msg vendor/bc/dist/locales/pt_PT.ISO8859-15.msg (contents, props changed) vendor/bc/dist/locales/pt_PT.UTF-8.msg vendor/bc/dist/locales/pt_PT.utf8.msg (contents, props changed) vendor/bc/dist/locales/ru_RU.CP1251.msg (contents, props changed) vendor/bc/dist/locales/ru_RU.CP866.msg (contents, props changed) vendor/bc/dist/locales/ru_RU.ISO8859-5.msg (contents, props changed) vendor/bc/dist/locales/ru_RU.KOI8-R.msg (contents, props changed) vendor/bc/dist/locales/ru_RU.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/ru_RU.utf8.msg (contents, props changed) vendor/bc/dist/locales/zh_CN.GB18030.msg (contents, props changed) vendor/bc/dist/locales/zh_CN.GB2312.msg (contents, props changed) vendor/bc/dist/locales/zh_CN.GBK.msg (contents, props changed) vendor/bc/dist/locales/zh_CN.UTF-8.msg (contents, props changed) vendor/bc/dist/locales/zh_CN.eucCN.msg (contents, props changed) vendor/bc/dist/locales/zh_CN.utf8.msg (contents, props changed) vendor/bc/dist/manpage.sh (contents, props changed) vendor/bc/dist/manuals/ vendor/bc/dist/manuals/algorithms.md vendor/bc/dist/manuals/bc.1 (contents, props changed) vendor/bc/dist/manuals/bc.1.ronn vendor/bc/dist/manuals/bc.md (contents, props changed) vendor/bc/dist/manuals/benchmarks.md vendor/bc/dist/manuals/build.md vendor/bc/dist/manuals/dc.1 (contents, props changed) vendor/bc/dist/manuals/dc.1.ronn vendor/bc/dist/manuals/dc.md (contents, props changed) vendor/bc/dist/release.sh (contents, props changed) vendor/bc/dist/safe-install.sh (contents, props changed) vendor/bc/dist/src/ vendor/bc/dist/src/args.c (contents, props changed) vendor/bc/dist/src/bc/ vendor/bc/dist/src/bc/bc.c (contents, props changed) vendor/bc/dist/src/bc/lex.c (contents, props changed) vendor/bc/dist/src/bc/parse.c (contents, props changed) vendor/bc/dist/src/data.c (contents, props changed) vendor/bc/dist/src/dc/ vendor/bc/dist/src/dc/dc.c (contents, props changed) vendor/bc/dist/src/dc/lex.c (contents, props changed) vendor/bc/dist/src/dc/parse.c (contents, props changed) vendor/bc/dist/src/file.c (contents, props changed) vendor/bc/dist/src/history/ vendor/bc/dist/src/history/history.c (contents, props changed) vendor/bc/dist/src/lang.c (contents, props changed) vendor/bc/dist/src/lex.c (contents, props changed) vendor/bc/dist/src/main.c (contents, props changed) vendor/bc/dist/src/num.c (contents, props changed) vendor/bc/dist/src/opt.c (contents, props changed) vendor/bc/dist/src/parse.c (contents, props changed) vendor/bc/dist/src/program.c (contents, props changed) vendor/bc/dist/src/rand/ vendor/bc/dist/src/rand/rand.c (contents, props changed) vendor/bc/dist/src/read.c (contents, props changed) vendor/bc/dist/src/vector.c (contents, props changed) vendor/bc/dist/src/vm.c (contents, props changed) vendor/bc/dist/tests/ vendor/bc/dist/tests/afl.py (contents, props changed) vendor/bc/dist/tests/all.sh (contents, props changed) vendor/bc/dist/tests/all.txt (contents, props changed) vendor/bc/dist/tests/bc/ vendor/bc/dist/tests/bc/abs.txt (contents, props changed) vendor/bc/dist/tests/bc/abs_results.txt (contents, props changed) vendor/bc/dist/tests/bc/add.txt (contents, props changed) vendor/bc/dist/tests/bc/add_results.txt (contents, props changed) vendor/bc/dist/tests/bc/all.txt (contents, props changed) vendor/bc/dist/tests/bc/arctangent.txt (contents, props changed) vendor/bc/dist/tests/bc/arctangent_results.txt (contents, props changed) vendor/bc/dist/tests/bc/arrays.txt (contents, props changed) vendor/bc/dist/tests/bc/arrays_results.txt (contents, props changed) vendor/bc/dist/tests/bc/assignments.txt (contents, props changed) vendor/bc/dist/tests/bc/assignments_results.txt (contents, props changed) vendor/bc/dist/tests/bc/boolean.txt (contents, props changed) vendor/bc/dist/tests/bc/boolean_results.txt (contents, props changed) vendor/bc/dist/tests/bc/comp.txt (contents, props changed) vendor/bc/dist/tests/bc/comp_results.txt (contents, props changed) vendor/bc/dist/tests/bc/cosine.txt (contents, props changed) vendor/bc/dist/tests/bc/cosine_results.txt (contents, props changed) vendor/bc/dist/tests/bc/decimal.txt (contents, props changed) vendor/bc/dist/tests/bc/decimal_results.txt (contents, props changed) vendor/bc/dist/tests/bc/divide.txt (contents, props changed) vendor/bc/dist/tests/bc/divide_results.txt (contents, props changed) vendor/bc/dist/tests/bc/engineering.txt (contents, props changed) vendor/bc/dist/tests/bc/engineering_results.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/ vendor/bc/dist/tests/bc/errors.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/01.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/02.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/03.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/04.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/05.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/06.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/07.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/08.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/09.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/10.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/11.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/12.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/13.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/14.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/15.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/16.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/17.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/18.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/19.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/20.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/21.txt (contents, props changed) vendor/bc/dist/tests/bc/errors/22.txt (contents, props changed) vendor/bc/dist/tests/bc/exponent.txt (contents, props changed) vendor/bc/dist/tests/bc/exponent_results.txt (contents, props changed) vendor/bc/dist/tests/bc/functions.txt (contents, props changed) vendor/bc/dist/tests/bc/functions_results.txt (contents, props changed) vendor/bc/dist/tests/bc/globals.txt (contents, props changed) vendor/bc/dist/tests/bc/globals_results.txt (contents, props changed) vendor/bc/dist/tests/bc/length.txt (contents, props changed) vendor/bc/dist/tests/bc/length_results.txt (contents, props changed) vendor/bc/dist/tests/bc/letters.txt (contents, props changed) vendor/bc/dist/tests/bc/letters_results.txt (contents, props changed) vendor/bc/dist/tests/bc/lib2.txt (contents, props changed) vendor/bc/dist/tests/bc/lib2_results.txt (contents, props changed) vendor/bc/dist/tests/bc/log.txt (contents, props changed) vendor/bc/dist/tests/bc/log_results.txt (contents, props changed) vendor/bc/dist/tests/bc/misc.txt (contents, props changed) vendor/bc/dist/tests/bc/misc1.txt (contents, props changed) vendor/bc/dist/tests/bc/misc1_results.txt (contents, props changed) vendor/bc/dist/tests/bc/misc2.txt (contents, props changed) vendor/bc/dist/tests/bc/misc2_results.txt (contents, props changed) vendor/bc/dist/tests/bc/misc3.txt (contents, props changed) vendor/bc/dist/tests/bc/misc3_results.txt (contents, props changed) vendor/bc/dist/tests/bc/misc4.txt (contents, props changed) vendor/bc/dist/tests/bc/misc4_results.txt (contents, props changed) vendor/bc/dist/tests/bc/misc5.txt (contents, props changed) vendor/bc/dist/tests/bc/misc5_results.txt (contents, props changed) vendor/bc/dist/tests/bc/misc_results.txt (contents, props changed) vendor/bc/dist/tests/bc/modulus.txt (contents, props changed) vendor/bc/dist/tests/bc/modulus_results.txt (contents, props changed) vendor/bc/dist/tests/bc/multiply.txt (contents, props changed) vendor/bc/dist/tests/bc/multiply_results.txt (contents, props changed) vendor/bc/dist/tests/bc/pi.txt (contents, props changed) vendor/bc/dist/tests/bc/pi_results.txt (contents, props changed) vendor/bc/dist/tests/bc/places.txt (contents, props changed) vendor/bc/dist/tests/bc/places_results.txt (contents, props changed) vendor/bc/dist/tests/bc/posix_errors.txt (contents, props changed) vendor/bc/dist/tests/bc/power.txt (contents, props changed) vendor/bc/dist/tests/bc/power_results.txt (contents, props changed) vendor/bc/dist/tests/bc/print2.txt (contents, props changed) vendor/bc/dist/tests/bc/print2_results.txt (contents, props changed) vendor/bc/dist/tests/bc/rand.txt (contents, props changed) vendor/bc/dist/tests/bc/rand_results.txt (contents, props changed) vendor/bc/dist/tests/bc/read.txt (contents, props changed) vendor/bc/dist/tests/bc/read_errors.txt (contents, props changed) vendor/bc/dist/tests/bc/read_results.txt (contents, props changed) vendor/bc/dist/tests/bc/scale.txt (contents, props changed) vendor/bc/dist/tests/bc/scale_results.txt (contents, props changed) vendor/bc/dist/tests/bc/scientific.txt (contents, props changed) vendor/bc/dist/tests/bc/scientific_results.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/ vendor/bc/dist/tests/bc/scripts/add.bc vendor/bc/dist/tests/bc/scripts/array.bc (contents, props changed) vendor/bc/dist/tests/bc/scripts/array.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/atan.bc (contents, props changed) vendor/bc/dist/tests/bc/scripts/atan.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/bessel.bc (contents, props changed) vendor/bc/dist/tests/bc/scripts/divide.bc vendor/bc/dist/tests/bc/scripts/functions.bc vendor/bc/dist/tests/bc/scripts/functions.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/globals.bc (contents, props changed) vendor/bc/dist/tests/bc/scripts/globals.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/len.bc vendor/bc/dist/tests/bc/scripts/len.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/multiply.bc vendor/bc/dist/tests/bc/scripts/parse.bc (contents, props changed) vendor/bc/dist/tests/bc/scripts/print.bc (contents, props changed) vendor/bc/dist/tests/bc/scripts/rand.bc vendor/bc/dist/tests/bc/scripts/rand.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/references.bc (contents, props changed) vendor/bc/dist/tests/bc/scripts/references.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/screen.bc (contents, props changed) vendor/bc/dist/tests/bc/scripts/screen.txt (contents, props changed) vendor/bc/dist/tests/bc/scripts/subtract.bc vendor/bc/dist/tests/bc/shift.txt (contents, props changed) vendor/bc/dist/tests/bc/shift_results.txt (contents, props changed) vendor/bc/dist/tests/bc/sine.txt (contents, props changed) vendor/bc/dist/tests/bc/sine_results.txt (contents, props changed) vendor/bc/dist/tests/bc/sqrt.txt (contents, props changed) vendor/bc/dist/tests/bc/sqrt_results.txt (contents, props changed) vendor/bc/dist/tests/bc/stdin.txt (contents, props changed) vendor/bc/dist/tests/bc/stdin_results.txt (contents, props changed) vendor/bc/dist/tests/bc/strings.txt (contents, props changed) vendor/bc/dist/tests/bc/strings_results.txt (contents, props changed) vendor/bc/dist/tests/bc/subtract.txt (contents, props changed) vendor/bc/dist/tests/bc/subtract_results.txt (contents, props changed) vendor/bc/dist/tests/bc/timeconst.sh (contents, props changed) vendor/bc/dist/tests/bc/trunc.txt (contents, props changed) vendor/bc/dist/tests/bc/trunc_results.txt (contents, props changed) vendor/bc/dist/tests/bc/vars.txt (contents, props changed) vendor/bc/dist/tests/bc/vars_results.txt (contents, props changed) vendor/bc/dist/tests/bc/void.txt (contents, props changed) vendor/bc/dist/tests/bc/void_results.txt (contents, props changed) vendor/bc/dist/tests/dc/ vendor/bc/dist/tests/dc/abs.txt (contents, props changed) vendor/bc/dist/tests/dc/abs_results.txt (contents, props changed) vendor/bc/dist/tests/dc/add.txt (contents, props changed) vendor/bc/dist/tests/dc/add_results.txt (contents, props changed) vendor/bc/dist/tests/dc/all.txt (contents, props changed) vendor/bc/dist/tests/dc/boolean.txt (contents, props changed) vendor/bc/dist/tests/dc/boolean_results.txt (contents, props changed) vendor/bc/dist/tests/dc/decimal.txt (contents, props changed) vendor/bc/dist/tests/dc/decimal_results.txt (contents, props changed) vendor/bc/dist/tests/dc/divide.txt (contents, props changed) vendor/bc/dist/tests/dc/divide_results.txt (contents, props changed) vendor/bc/dist/tests/dc/divmod.txt (contents, props changed) vendor/bc/dist/tests/dc/divmod_results.txt (contents, props changed) vendor/bc/dist/tests/dc/engineering.txt (contents, props changed) vendor/bc/dist/tests/dc/engineering_results.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/ vendor/bc/dist/tests/dc/errors.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/01.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/02.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/03.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/04.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/05.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/06.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/07.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/08.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/09.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/10.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/11.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/12.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/13.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/14.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/15.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/16.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/17.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/18.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/19.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/20.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/21.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/22.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/23.txt (contents, props changed) vendor/bc/dist/tests/dc/errors/24.txt (contents, props changed) vendor/bc/dist/tests/dc/misc.txt (contents, props changed) vendor/bc/dist/tests/dc/misc_results.txt (contents, props changed) vendor/bc/dist/tests/dc/modexp.txt (contents, props changed) vendor/bc/dist/tests/dc/modexp_results.txt (contents, props changed) vendor/bc/dist/tests/dc/modulus.txt (contents, props changed) vendor/bc/dist/tests/dc/modulus_results.txt (contents, props changed) vendor/bc/dist/tests/dc/multiply.txt (contents, props changed) vendor/bc/dist/tests/dc/multiply_results.txt (contents, props changed) vendor/bc/dist/tests/dc/negate.txt (contents, props changed) vendor/bc/dist/tests/dc/negate_results.txt (contents, props changed) vendor/bc/dist/tests/dc/places.txt (contents, props changed) vendor/bc/dist/tests/dc/places_results.txt (contents, props changed) vendor/bc/dist/tests/dc/power.txt (contents, props changed) vendor/bc/dist/tests/dc/power_results.txt (contents, props changed) vendor/bc/dist/tests/dc/rand.txt (contents, props changed) vendor/bc/dist/tests/dc/rand_results.txt (contents, props changed) vendor/bc/dist/tests/dc/read.txt (contents, props changed) vendor/bc/dist/tests/dc/read_errors.txt (contents, props changed) vendor/bc/dist/tests/dc/read_results.txt (contents, props changed) vendor/bc/dist/tests/dc/scientific.txt (contents, props changed) vendor/bc/dist/tests/dc/scientific_results.txt (contents, props changed) vendor/bc/dist/tests/dc/scripts/ vendor/bc/dist/tests/dc/scripts/array.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/array.txt (contents, props changed) vendor/bc/dist/tests/dc/scripts/asciify.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/asciify.txt (contents, props changed) vendor/bc/dist/tests/dc/scripts/else.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/else.txt (contents, props changed) vendor/bc/dist/tests/dc/scripts/factorial.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/factorial.txt (contents, props changed) vendor/bc/dist/tests/dc/scripts/loop.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/loop.txt (contents, props changed) vendor/bc/dist/tests/dc/scripts/prime.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/quit.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/quit.txt (contents, props changed) vendor/bc/dist/tests/dc/scripts/stream.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/weird.dc (contents, props changed) vendor/bc/dist/tests/dc/scripts/weird.txt (contents, props changed) vendor/bc/dist/tests/dc/shift.txt (contents, props changed) vendor/bc/dist/tests/dc/shift_results.txt (contents, props changed) vendor/bc/dist/tests/dc/sqrt.txt (contents, props changed) vendor/bc/dist/tests/dc/sqrt_results.txt (contents, props changed) vendor/bc/dist/tests/dc/stdin.txt (contents, props changed) vendor/bc/dist/tests/dc/stdin_results.txt (contents, props changed) vendor/bc/dist/tests/dc/strings.txt (contents, props changed) vendor/bc/dist/tests/dc/strings_results.txt (contents, props changed) vendor/bc/dist/tests/dc/subtract.txt (contents, props changed) vendor/bc/dist/tests/dc/subtract_results.txt (contents, props changed) vendor/bc/dist/tests/dc/trunc.txt (contents, props changed) vendor/bc/dist/tests/dc/trunc_results.txt (contents, props changed) vendor/bc/dist/tests/dc/vars.txt (contents, props changed) vendor/bc/dist/tests/dc/vars_results.txt (contents, props changed) vendor/bc/dist/tests/errors.sh (contents, props changed) vendor/bc/dist/tests/radamsa.sh (contents, props changed) vendor/bc/dist/tests/radamsa.txt (contents, props changed) vendor/bc/dist/tests/randmath.py (contents, props changed) vendor/bc/dist/tests/read.sh (contents, props changed) vendor/bc/dist/tests/script.sh (contents, props changed) vendor/bc/dist/tests/scripts.sh (contents, props changed) vendor/bc/dist/tests/stdin.sh (contents, props changed) vendor/bc/dist/tests/test.sh (contents, props changed) Directory Properties: vendor/bc/dist/ (props changed) Added: vendor/bc/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bc/dist/.gitignore Sat Jun 27 15:03:19 2020 (r362697) @@ -0,0 +1,54 @@ +*.config +*.creator +*.files +*.includes +*.creator.user* +*.cflags +*.cxxflags +bin/*bc +bin/*bc.exe +bin/*dc +bin/*dc.exe +bc.old +*.o +*.a +.log_*.txt +.test.txt +.math.txt +.results.txt +.ops.txt +gen/strgen +lib.c +lib2.c +lib3.c +bc_help.c +dc_help.c +config.mak +timeconst.bc +Makefile + +.gdb_history + +# Ignore the generated test files +parse.txt +parse_results.txt +print.txt +print_results.txt +bessel.txt +bessel_results.txt +prime.txt +stream.txt +tests/bc/scripts/add.txt +tests/bc/scripts/divide.txt +tests/bc/scripts/multiply.txt +tests/bc/scripts/subtract.txt +perf.data +perf.data.old +*.gcda +*.gcno +*.gcov +*.html +*.profraw + +cscope*.out +tags Added: vendor/bc/dist/.travis.yml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bc/dist/.travis.yml Sat Jun 27 15:03:19 2020 (r362697) @@ -0,0 +1,42 @@ +dist: bionic + +language: c + +arch: + - amd64 + - arm64 + - ppc64le + +compiler: + - gcc + +env: + global: + - CODECOV_TOKEN="040ce7eb-5bc7-4040-8324-364f3ef4baa3" + - CFLAGS="-coverage -DBC_RAND_BUILTIN=0" + matrix: + - CONFIGURE_ARGS=-fHNPOg GEN_HOST=1 LONG_BIT=64 + - CONFIGURE_ARGS=-bfHNPOg GEN_HOST=1 LONG_BIT=64 + - CONFIGURE_ARGS=-dfHNPOg GEN_HOST=1 LONG_BIT=64 + - CONFIGURE_ARGS=-fEHNPOg GEN_HOST=1 LONG_BIT=64 + - CONFIGURE_ARGS=-bfEHNPOg GEN_HOST=1 LONG_BIT=64 + - CONFIGURE_ARGS=-dfEHNPOg GEN_HOST=1 LONG_BIT=64 + - CONFIGURE_ARGS=-fHNPOg GEN_HOST=1 LONG_BIT=32 + - CONFIGURE_ARGS=-bfHNPOg GEN_HOST=1 LONG_BIT=32 + - CONFIGURE_ARGS=-dfHNPOg GEN_HOST=1 LONG_BIT=32 + - CONFIGURE_ARGS=-fEHNPOg GEN_HOST=1 LONG_BIT=32 + - CONFIGURE_ARGS=-bfEHNPOg GEN_HOST=1 LONG_BIT=32 + - CONFIGURE_ARGS=-dfEHNPOg GEN_HOST=1 LONG_BIT=32 + +before_install: + - sudo apt-get install -y dc + - pip install --user codecov + +before_script: + - curl -o tests/bc/scripts/timeconst.bc https://raw.githubusercontent.com/torvalds/linux/master/kernel/time/timeconst.bc + +after_success: + - bash <(curl -s https://codecov.io/bash) + +script: + - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ./configure.sh "$CONFIGURE_ARGS" && make -j4 && make -j4 test ; fi Added: vendor/bc/dist/LICENSE.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bc/dist/LICENSE.md Sat Jun 27 15:03:19 2020 (r362697) @@ -0,0 +1,59 @@ +# License + +Copyright (c) 2018-2020 Gavin D. Howard + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* 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. + +## History + +The files `src/history.c` and `include/history.h` are under the following +copyrights and license: + +Copyright (c) 2010-2014, Salvatore Sanfilippo
    +Copyright (c) 2010-2013, Pieter Noordhuis
    +Copyright (c) 2018 rain-1
    +Copyright (c) 2018-2020, Gavin D. Howard + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* 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. Added: vendor/bc/dist/Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bc/dist/Makefile.in Sat Jun 27 15:03:19 2020 (r362697) @@ -0,0 +1,362 @@ +# +# Copyright (c) 2018-2020 Gavin D. Howard and contributors. +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * 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. +# +# %%WARNING%% +# +.POSIX: + +VERSION = 3.0.2 + +SRC = %%SRC%% +OBJ = %%OBJ%% +GCDA = %%GCDA%% +GCNO = %%GCNO%% + +BC_SRC = %%BC_SRC%% +BC_OBJ = %%BC_OBJ%% +BC_GCDA = %%BC_GCDA%% +BC_GCNO = %%BC_GCNO%% + +DC_SRC = %%DC_SRC%% +DC_OBJ = %%DC_OBJ%% +DC_GCDA = %%DC_GCDA%% +DC_GCNO = %%DC_GCNO%% + +HISTORY_SRC = %%HISTORY_SRC%% +HISTORY_OBJ = %%HISTORY_OBJ%% +HISTORY_GCDA = %%HISTORY_GCDA%% +HISTORY_GCNO = %%HISTORY_GCNO%% + +RAND_SRC = %%RAND_SRC%% +RAND_OBJ = %%RAND_OBJ%% +RAND_GCDA = %%RAND_GCDA%% +RAND_GCNO = %%RAND_GCNO%% + +BC_ENABLED_NAME = BC_ENABLED +BC_ENABLED = %%BC_ENABLED%% +DC_ENABLED_NAME = DC_ENABLED +DC_ENABLED = %%DC_ENABLED%% + +GEN_DIR = gen +GEN = %%GEN%% +GEN_EXEC = $(GEN_DIR)/$(GEN) +GEN_C = $(GEN_DIR)/$(GEN).c + +GEN_EMU = %%GEN_EMU%% + +BC_LIB = $(GEN_DIR)/lib.bc +BC_LIB_C = $(GEN_DIR)/lib.c +BC_LIB_O = %%BC_LIB_O%% +BC_LIB_GCDA = $(GEN_DIR)/lib.gcda +BC_LIB_GCNO = $(GEN_DIR)/lib.gcno + +BC_LIB2 = $(GEN_DIR)/lib2.bc +BC_LIB2_C = $(GEN_DIR)/lib2.c +BC_LIB2_O = %%BC_LIB2_O%% +BC_LIB2_GCDA = $(GEN_DIR)/lib2.gcda +BC_LIB2_GCNO = $(GEN_DIR)/lib2.gcno + +BC_HELP = $(GEN_DIR)/bc_help.txt +BC_HELP_C = $(GEN_DIR)/bc_help.c +BC_HELP_O = %%BC_HELP_O%% +BC_HELP_GCDA = $(GEN_DIR)/bc_help.gcda +BC_HELP_GCNO = $(GEN_DIR)/bc_help.gcno + +DC_HELP = $(GEN_DIR)/dc_help.txt +DC_HELP_C = $(GEN_DIR)/dc_help.c +DC_HELP_O = %%DC_HELP_O%% +DC_HELP_GCDA = $(GEN_DIR)/dc_help.gcda +DC_HELP_GCNO = $(GEN_DIR)/dc_help.gcno + +BIN = bin +LOCALES = locales +EXEC_SUFFIX = %%EXECSUFFIX%% +EXEC_PREFIX = %%EXECPREFIX%% + +BC = bc +DC = dc +BC_EXEC = $(BIN)/$(EXEC_PREFIX)$(BC) +DC_EXEC = $(BIN)/$(EXEC_PREFIX)$(DC) + +MANUALS = manuals +BC_MANPAGE_NAME = $(EXEC_PREFIX)$(BC)$(EXEC_SUFFIX).1 +BC_MANPAGE = $(MANUALS)/$(BC).1 +BC_RONN = $(BC_MANPAGE).ronn +DC_MANPAGE_NAME = $(EXEC_PREFIX)$(DC)$(EXEC_SUFFIX).1 +DC_MANPAGE = $(MANUALS)/$(DC).1 +DC_RONN = $(DC_MANPAGE).ronn + +MANPAGE_INSTALL_ARGS = -Dm644 + +%%DESTDIR%% +BINDIR = %%BINDIR%% +MAN1DIR = %%MAN1DIR%% +MAIN_EXEC = $(EXEC_PREFIX)$(%%MAIN_EXEC%%)$(EXEC_SUFFIX) +EXEC = $(%%EXEC%%) +NLSPATH = %%NLSPATH%% + +BC_ENABLE_HISTORY = %%HISTORY%% +BC_ENABLE_EXTRA_MATH_NAME = BC_ENABLE_EXTRA_MATH +BC_ENABLE_EXTRA_MATH = %%EXTRA_MATH%% +BC_ENABLE_NLS = %%NLS%% +BC_ENABLE_PROMPT = %%PROMPT%% +BC_LONG_BIT = %%LONG_BIT%% + +RM = rm +MKDIR = mkdir + +INSTALL = ./install.sh +SAFE_INSTALL = ./safe-install.sh +LINK = ./link.sh +MANPAGE = ./manpage.sh +KARATSUBA = ./karatsuba.py +LOCALE_INSTALL = ./locale_install.sh +LOCALE_UNINSTALL = ./locale_uninstall.sh + +VALGRIND_ARGS = --error-exitcode=100 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all + +BC_NUM_KARATSUBA_LEN = %%KARATSUBA_LEN%% + +CPPFLAGS1 = -D$(BC_ENABLED_NAME)=$(BC_ENABLED) -D$(DC_ENABLED_NAME)=$(DC_ENABLED) +CPPFLAGS2 = $(CPPFLAGS1) -I./include/ -DVERSION=$(VERSION) %%LONG_BIT_DEFINE%% +CPPFLAGS3 = $(CPPFLAGS2) -DEXECPREFIX=$(EXEC_PREFIX) -DMAINEXEC=$(MAIN_EXEC) +CPPFLAGS4 = $(CPPFLAGS3) -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 +CPPFLAGS5 = $(CPPFLAGS4) -DBC_NUM_KARATSUBA_LEN=$(BC_NUM_KARATSUBA_LEN) +CPPFLAGS6 = $(CPPFLAGS5) -DBC_ENABLE_NLS=$(BC_ENABLE_NLS) -DBC_ENABLE_PROMPT=$(BC_ENABLE_PROMPT) +CPPFLAGS7 = $(CPPFLAGS6) -D$(BC_ENABLE_EXTRA_MATH_NAME)=$(BC_ENABLE_EXTRA_MATH) +CPPFLAGS = $(CPPFLAGS7) -DBC_ENABLE_HISTORY=$(BC_ENABLE_HISTORY) +CFLAGS = $(CPPFLAGS) %%CPPFLAGS%% %%CFLAGS%% +LDFLAGS = %%LDFLAGS%% + +HOSTCFLAGS = %%HOSTCFLAGS%% + +CC = %%CC%% +HOSTCC = %%HOSTCC%% + +BC_LIB_C_ARGS = bc_lib bc.h bc_lib_name $(BC_ENABLED_NAME) 1 +BC_LIB2_C_ARGS = bc_lib2 bc.h bc_lib2_name "$(BC_ENABLED_NAME) && $(BC_ENABLE_EXTRA_MATH_NAME)" 1 + +OBJS1 = $(OBJ) $(DC_OBJ) $(BC_OBJ) $(HISTORY_OBJ) $(RAND_OBJ) $(BC_HELP_O) $(DC_HELP_O) +OBJS = $(OBJS1) $(BC_LIB_O) $(BC_LIB2_O) $(BC_LIB3_O) +OBJ_TARGETS1 = $(DC_HELP_O) $(BC_HELP_O) $(BC_LIB_O) $(BC_LIB2_O) $(BC_LIB3_O) +OBJ_TARGETS = $(OBJ_TARGETS1) $(BC_OBJ) $(DC_OBJ) $(HISTORY_OBJ) $(RAND_OBJ) $(OBJ) + +.c.o: + $(CC) $(CFLAGS) -o $@ -c $< + +all: make_bin $(OBJ_TARGETS) + $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) + %%LINK%% + +$(GEN_EXEC): + %%GEN_EXEC_TARGET%% + +$(BC_LIB_C): $(GEN_EXEC) $(BC_LIB) + $(GEN_EMU) $(GEN_EXEC) $(BC_LIB) $(BC_LIB_C) $(BC_LIB_C_ARGS) + +$(BC_LIB2_C): $(GEN_EXEC) $(BC_LIB2) + $(GEN_EMU) $(GEN_EXEC) $(BC_LIB2) $(BC_LIB2_C) $(BC_LIB2_C_ARGS) + +$(BC_HELP_C): $(GEN_EXEC) $(BC_HELP) + $(GEN_EMU) $(GEN_EXEC) $(BC_HELP) $(BC_HELP_C) bc_help bc.h "" $(BC_ENABLED_NAME) + +$(DC_HELP_C): $(GEN_EXEC) $(DC_HELP) + $(GEN_EMU) $(GEN_EXEC) $(DC_HELP) $(DC_HELP_C) dc_help dc.h "" $(DC_ENABLED_NAME) + +make_bin: + $(MKDIR) -p $(BIN) + +help: + @printf 'available targets:\n' + @printf '\n' + @printf ' all (default) builds %%EXECUTABLES%%\n' + @printf ' check alias for `make test`\n' + @printf ' clean removes all build files\n' + @printf ' clean_config removes all build files as well as the generated Makefile\n' + @printf ' clean_tests removes all build files, the generated Makefile,\n' + @printf ' and generated tests\n' + @printf ' install installs binaries to "%s%s"\n' "$(DESTDIR)" "$(BINDIR)" + @printf ' and (if enabled) manpages to "%s%s"\n' "$(DESTDIR)" "$(MAN1DIR)" + @printf ' karatsuba runs the karatsuba script (requires Python 3)\n' + @printf ' karatsuba_test runs the karatsuba script while running tests\n' + @printf ' (requires Python 3)\n' + @printf ' uninstall uninstalls binaries from "%s%s"\n' "$(DESTDIR)" "$(BINDIR)" + @printf ' and (if enabled) manpages from "%s%s"\n' "$(DESTDIR)" "$(MAN1DIR)" + @printf ' test runs the test suite\n' + @printf ' test_bc runs the bc test suite, if bc has been built\n' + @printf ' test_dc runs the dc test suite, if dc has been built\n' + @printf ' time_test runs the test suite, displaying times for some things\n' + @printf ' time_test_bc runs the bc test suite, displaying times for some things\n' + @printf ' time_test_dc runs the dc test suite, displaying times for some things\n' + @printf ' timeconst runs the test on the Linux timeconst.bc script,\n' + @printf ' if it exists and bc has been built\n' + @printf ' valgrind runs the test suite through valgrind\n' + @printf ' valgrind_bc runs the bc test suite, if bc has been built,\n' + @printf ' through valgrind\n' + @printf ' valgrind_dc runs the dc test suite, if dc has been built,\n' + @printf ' through valgrind\n' + +check: test + +test: test_bc timeconst test_dc + +test_bc: + %%BC_TEST%% + +test_dc: + %%DC_TEST%% + +time_test: time_test_bc timeconst time_test_dc + +time_test_bc: + %%BC_TIME_TEST%% + +time_test_dc: + %%DC_TIME_TEST%% + +timeconst: + %%TIMECONST%% + +valgrind: valgrind_bc valgrind_dc + +valgrind_bc: + %%VG_BC_TEST%% + +valgrind_dc: + %%VG_DC_TEST%% + +karatsuba: + %%KARATSUBA%% + +karatsuba_test: + %%KARATSUBA_TEST%% + +coverage_output: + %%COVERAGE_OUTPUT%% + +coverage:%%COVERAGE_PREREQS%% + +version: + @printf '%s' "$(VERSION)" + +libcname: + @printf '%s' "$(BC_LIB_C)" + +extra_math: + @printf '%s' "$(BC_ENABLE_EXTRA_MATH)" + +manpages: + $(MANPAGE) $(BC_RONN) $(BC_MANPAGE) + $(MANPAGE) $(DC_RONN) $(DC_MANPAGE) + +clean_gen: + @$(RM) -f $(GEN_EXEC) + +clean:%%CLEAN_PREREQS%% + @printf 'Cleaning files...\n' + @$(RM) -f $(OBJ) + @$(RM) -f $(BC_OBJ) + @$(RM) -f $(DC_OBJ) + @$(RM) -f $(HISTORY_OBJ) + @$(RM) -f $(RAND_OBJ) + @$(RM) -f $(BC_EXEC) + @$(RM) -f $(DC_EXEC) + @$(RM) -fr $(BIN) + @$(RM) -f $(LOCALES)/*.cat + @$(RM) -f $(BC_LIB_C) $(BC_LIB_O) + @$(RM) -f $(BC_LIB2_C) $(BC_LIB2_O) + @$(RM) -f $(BC_HELP_C) $(BC_HELP_O) + @$(RM) -f $(DC_HELP_C) $(DC_HELP_O) + +clean_config: clean + @printf 'Cleaning config...\n' + @$(RM) -f Makefile + +clean_coverage: + @printf 'Cleaning coverage files...\n' + @$(RM) -f *.gcov + @$(RM) -f *.html + @$(RM) -f *.gcda *.gcno + @$(RM) -f *.profraw + @$(RM) -f $(GCDA) $(GCNO) + @$(RM) -f $(BC_GCDA) $(BC_GCNO) + @$(RM) -f $(DC_GCDA) $(DC_GCNO) + @$(RM) -f $(HISTORY_GCDA) $(HISTORY_GCNO) + @$(RM) -f $(RAND_GCDA) $(RAND_GCNO) + @$(RM) -f $(BC_LIB_GCDA) $(BC_LIB_GCNO) + @$(RM) -f $(BC_LIB2_GCDA) $(BC_LIB2_GCNO) + @$(RM) -f $(BC_HELP_GCDA) $(BC_HELP_GCNO) + @$(RM) -f $(DC_HELP_GCDA) $(DC_HELP_GCNO) + +clean_tests: clean clean_config clean_coverage + @printf 'Cleaning test files...\n' + @$(RM) -f tests/bc/parse.txt tests/bc/parse_results.txt + @$(RM) -f tests/bc/print.txt tests/bc/print_results.txt + @$(RM) -f tests/bc/bessel.txt tests/bc/bessel_results.txt + @$(RM) -f tests/bc/scripts/bessel.txt + @$(RM) -f tests/bc/scripts/parse.txt + @$(RM) -f tests/bc/scripts/print.txt + @$(RM) -f tests/bc/scripts/add.txt + @$(RM) -f tests/bc/scripts/divide.txt + @$(RM) -f tests/bc/scripts/multiply.txt + @$(RM) -f tests/bc/scripts/subtract.txt + @$(RM) -f tests/dc/scripts/prime.txt tests/dc/scripts/stream.txt + @$(RM) -f .log_*.txt + @$(RM) -f .math.txt .results.txt .ops.txt + @$(RM) -f .test.txt + @$(RM) -f tags .gdbbreakpoints .gdb_history .gdbsetup + @$(RM) -f cscope.* + @$(RM) -f bc.old + +install_locales: + $(LOCALE_INSTALL) $(NLSPATH) $(MAIN_EXEC) $(DESTDIR) + +install_bc_manpage: + $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(BC_MANPAGE) $(DESTDIR)$(MAN1DIR)/$(BC_MANPAGE_NAME) + +install_dc_manpage: + $(SAFE_INSTALL) $(MANPAGE_INSTALL_ARGS) $(DC_MANPAGE) $(DESTDIR)$(MAN1DIR)/$(DC_MANPAGE_NAME) + +install:%%INSTALL_LOCALES_PREREQS%%%%INSTALL_PREREQS%% + $(INSTALL) $(DESTDIR)$(BINDIR) "$(EXEC_SUFFIX)" + +uninstall_locales: + $(LOCALE_UNINSTALL) $(NLSPATH) $(MAIN_EXEC) $(DESTDIR) + +uninstall_bc_manpage: + $(RM) -f $(DESTDIR)$(MAN1DIR)/$(BC_MANPAGE_NAME) + +uninstall_bc: + $(RM) -f $(DESTDIR)$(BINDIR)/$(EXEC_PREFIX)$(BC)$(EXEC_SUFFIX) + +uninstall_dc_manpage: + $(RM) -f $(DESTDIR)$(MAN1DIR)/$(DC_MANPAGE_NAME) + +uninstall_dc: + $(RM) -f $(DESTDIR)$(BINDIR)/$(EXEC_PREFIX)$(DC)$(EXEC_SUFFIX) + +uninstall:%%UNINSTALL_LOCALES_PREREQS%%%%UNINSTALL_MAN_PREREQS%%%%UNINSTALL_PREREQS%% Added: vendor/bc/dist/NEWS.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bc/dist/NEWS.md Sat Jun 27 15:03:19 2020 (r362697) @@ -0,0 +1,824 @@ +# News + +## 3.0.2 + +This is a production release that adds `utf8` locale symlinks and removes an +unused `auto` variable from the `ceil()` function in the [extended math +library][16]. + +Users do ***NOT*** need to update unless they want the locales. + +## 3.0.1 + +This is a production release with two small changes. Users do ***NOT*** need to +upgrade to this release; however, if they haven't upgraded to `3.0.0` yet, it +may be worthwhile to upgrade to this release. + +The first change is fixing a compiler warning on FreeBSD with strict warnings +on. + +The second change is to make the new implementation of `ceil()` in `lib2.bc` +much more efficient. + +## 3.0.0 + +*Notes for package maintainers:* + +*First, the `2.7.0` release series saw a change in the option parsing. This made +me change one error message and add a few others. The error message that was +changed removed one format specifier. This means that `printf()` will seqfault +on old locale files. Unfortunately, `bc` cannot use any locale files except the +global ones that are already installed, so it will use the previous ones while +running tests during install. **If `bc` segfaults while running arg tests when +updating, it is because the global locale files have not been replaced. Make +sure to either prevent the test suite from running on update or remove the old +locale files before updating.** Once this is done, `bc` should install without +problems.* + +*Second, **the option to build without signal support has been removed**. See +below for the reasons why.* + +This is a production release with some small bug fixes, a few improvements, +three major bug fixes, and a complete redesign of `bc`'s error and signal +handling. **Users and package maintainers should update to this version as soon +as possible.** + +The first major bug fix was in how `bc` executed files. Previously, a whole file +was parsed before it was executed, but if a function is defined *after* code, +especially if the function definition was actually a redefinition, and the code +before the definition referred to the previous function, this `bc` would replace +the function before executing any code. The fix was to make sure that all code +that existed before a function definition was executed. + +The second major bug fix was in `bc`'s `lib2.bc`. The `ceil()` function had a +bug where a `0` in the decimal place after the truncation position, caused it to +output the wrong numbers if there was any non-zero digit after. + +The third major bug is that when passing parameters to functions, if an +expression included an array (not an array element) as a parameter, it was +accepted, when it should have been rejected. It is now correctly rejected. + +Beyond that, this `bc` got several improvements that both sped it up, improved +the handling of signals, and improved the error handling. + +First, the requirements for `bc` were pushed back to POSIX 2008. `bc` uses one +function, `strdup()`, which is not in POSIX 2001, and it is in the X/Open System +Interfaces group 2001. It is, however, in POSIX 2008, and since POSIX 2008 is +old enough to be supported anywhere that I care, that should be the requirement. + +Second, the BcVm global variable was put into `bss`. This actually slightly +reduces the size of the executable from a massive code shrink, and it will stop +`bc` from allocating a large set of memory when `bc` starts. + +Third, the default Karatsuba length was updated from 64 to 32 after making the +optimization changes below, since 32 is going to be better than 64 after the +changes. + +Fourth, Spanish translations were added. + +Fifth, the interpreter received a speedup to make performance on non-math-heavy +scripts more competitive with GNU `bc`. While improvements did, in fact, get it +much closer (see the [benchmarks][19]), it isn't quite there. + +There were several things done to speed up the interpreter: + +First, several small inefficiencies were removed. These inefficiencies included +calling the function `bc_vec_pop(v)` twice instead of calling +`bc_vec_npop(v, 2)`. They also included an extra function call for checking the +size of the stack and checking the size of the stack more than once on several +operations. + +Second, since the current `bc` function is the one that stores constants and +strings, the program caches pointers to the current function's vectors of +constants and strings to prevent needing to grab the current function in order +to grab a constant or a string. + +Third, `bc` tries to reuse `BcNum`'s (the internal representation of +arbitary-precision numbers). If a `BcNum` has the default capacity of +`BC_NUM_DEF_SIZE` (32 on 64-bit and 16 on 32-bit) when it is freed, it is added +to a list of available `BcNum`'s. And then, when a `BcNum` is allocated with a +capacity of `BC_NUM_DEF_SIZE` and any `BcNum`'s exist on the list of reusable +ones, one of those ones is grabbed instead. + +In order to support these changes, the `BC_NUM_DEF_SIZE` was changed. It used to +be 16 bytes on all systems, but it was changed to more closely align with the +minimum allocation size on Linux, which is either 32 bytes (64-bit musl), 24 +bytes (64-bit glibc), 16 bytes (32-bit musl), or 12 bytes (32-bit glibc). Since +these are the minimum allocation sizes, these are the sizes that would be +allocated anyway, making it worth it to just use the whole space, so the value +of `BC_NUM_DEF_SIZE` on 64-bit systems was changed to 32 bytes. + +On top of that, at least on 64-bit, `BC_NUM_DEF_SIZE` supports numbers with +either 72 integer digits or 45 integer digits and 27 fractional digits. This +should be more than enough for most cases since `bc`'s default `scale` values +are 0 or 20, meaning that, by default, it has at most 20 fractional digits. And +45 integer digits are *a lot*; it's enough to calculate the amount of mass in +the Milky Way galaxy in kilograms. Also, 72 digits is enough to calculate the +diameter of the universe in Planck lengths. + +(For 32-bit, these numbers are either 32 integer digits or 12 integer digits and +20 fractional digits. These are also quite big, and going much bigger on a +32-bit system seems a little pointless since 12 digits in just under a trillion +and 20 fractional digits is still enough for about any use since `10^-20` light +years is just under a millimeter.) + +All of this together means that for ordinary uses, and even uses in scientific +work, the default number size will be all that is needed, which means that +nearly all, if not all, numbers will be reused, relieving pressure on the system +allocator. + +I did several experiments to find the changes that had the most impact, +especially with regard to reusing `BcNum`'s. One was putting `BcNum`'s into +buckets according to their capacity in powers of 2 up to 512. That performed +worse than `bc` did in `2.7.2`. Another was putting any `BcNum` on the reuse +list that had a capacity of `BC_NUM_DEF_SIZE * 2` and reusing them for `BcNum`'s +that requested `BC_NUM_DEF_SIZE`. This did reduce the amount of time spent, but +it also spent a lot of time in the system allocator for an unknown reason. (When +using `strace`, a bunch more `brk` calls showed up.) Just reusing `BcNum`'s that +had exactly `BC_NUM_DEF_SIZE` capacity spent the smallest amount of time in both +user and system time. This makes sense, especially with the changes to make +`BC_NUM_DEF_SIZE` bigger on 64-bit systems, since the vast majority of numbers +will only ever use numbers with a size less than or equal to `BC_NUM_DEF_SIZE`. + +Last of all, `bc`'s signal handling underwent a complete redesign. (This is the +reason that this version is `3.0.0` and not `2.8.0`.) The change was to move +from a polling approach to signal handling to an interrupt-based approach. + +Previously, every single loop condition had a check for signals. I suspect that +this could be expensive when in tight loops. + +Now, the signal handler just uses `longjmp()` (actually `siglongjmp()`) to start +an unwinding of the stack until it is stopped or the stack is unwound to +`main()`, which just returns. If `bc` is currently executing code that cannot be +safely interrupted (according to POSIX), then signals are "locked." The signal +handler checks if the lock is taken, and if it is, it just sets the status to +indicate that a signal arrived. Later, when the signal lock is released, the +status is checked to see if a signal came in. If so, the stack unwinding starts. + +This design eliminates polling in favor of maintaining a stack of `jmp_buf`'s. +This has its own performance implications, but it gives better interaction. And +the cost of pushing and popping a `jmp_buf` in a function is paid at most twice. +Most functions do not pay that price, and most of the rest only pay it once. +(There are only some 3 functions in `bc` that push and pop a `jmp_buf` twice.) + +As a side effect of this change, I had to eliminate the use of `stdio.h` in `bc` +because `stdio` does not play nice with signals and `longjmp()`. I implemented +custom I/O buffer code that takes a fraction of the size. This means that static +builds will be smaller, but non-static builds will be bigger, though they will +have less linking time. + +This change is also good because my history implementation was already bypassing +`stdio` for good reasons, and unifying the architecture was a win. + +Another reason for this change is that my `bc` should *always* behave correctly +in the presence of signals like `SIGINT`, `SIGTERM`, and `SIGQUIT`. With the +addition of my own I/O buffering, I needed to also make sure that the buffers +were correctly flushed even when such signals happened. + +For this reason, I **removed the option to build without signal support**. + +As a nice side effect of this change, the error handling code could be changed +to take advantage of the stack unwinding that signals used. This means that +signals and error handling use the same code paths, which means that the stack +unwinding is well-tested. (Errors are tested heavily in the test suite.) + +It also means that functions do not need to return a status code that +***every*** caller needs to check. This eliminated over 100 branches that simply +checked return codes and then passed that return code up the stack if necessary. +The code bloat savings from this is at least 1700 bytes on `x86_64`, *before* +taking into account the extra code from removing `stdio.h`. + +## 2.7.2 + +This is a production release with one major bug fix. + +The `length()` built-in function can take either a number or an array. If it +takes an array, it returns the length of the array. Arrays can be passed by +reference. The bug is that the `length()` function would not properly +dereference arrays that were references. This is a bug that affects all users. + +**ALL USERS SHOULD UPDATE `bc`**. + +## 2.7.1 + +This is a production release with fixes for new locales and fixes for compiler +warnings on FreeBSD. + +## 2.7.0 + +This is a production release with a bug fix for Linux, new translations, and new +features. + +Bug fixes: + +* Option parsing in `BC_ENV_ARGS` was broken on Linux in 2.6.1 because `glibc`'s + `getopt_long()` is broken. To get around that, and to support long options on + every platform, an adapted version of [`optparse`][17] was added. Now, `bc` + does not even use `getopt()`. +* Parsing `BC_ENV_ARGS` with quotes now works. It isn't the smartest, but it + does the job if there are spaces in file names. + +The following new languages are supported: + +* Dutch +* Polish +* Russian +* Japanes +* Simplified Chinese + +All of these translations were generated using [DeepL][18], so improvements are +welcome. + +There is only one new feature: **`bc` now has a built-in pseudo-random number +generator** (PRNG). + +The PRNG is seeded, making it useful for applications where +`/dev/urandom` does not work because output needs to be reproducible. However, +it also uses `/dev/urandom` to seed itself by default, so it will start with a +good seed by default. + +It also outputs 32 bits on 32-bit platforms and 64 bits on 64-bit platforms, far +better than the 15 bits of C's `rand()` and `bash`'s `$RANDOM`. + +In addition, the PRNG can take a bound, and when it gets a bound, it +automatically adjusts to remove bias. It can also generate numbers of arbitrary +size. (As of the time of release, the largest pseudo-random number generated by +this `bc` was generated with a bound of `2^(2^20)`.) + +***IMPORTANT: read the [`bc` manual][9] and the [`dc` manual][10] to find out +exactly what guarantees the PRNG provides. The underlying implementation is not +guaranteed to stay the same, but the guarantees that it provides are guaranteed +to stay the same regardless of the implementation.*** + +On top of that, four functions were added to `bc`'s [extended math library][16] +to make using the PRNG easier: + +* `frand(p)`: Generates a number between `[0,1)` to `p` decimal places. +* `ifrand(i, p)`: Generates an integer with bound `i` and adds it to `frand(p)`. +* `srand(x)`: Randomizes the sign of `x`. In other words, it flips the sign of + `x` with probability `0.5`. +* `brand()`: Returns a random boolean value (either `0` or `1`). + +## 2.6.1 + +This is a production release with a bug fix for FreeBSD. + +The bug was that when `bc` was built without long options, it would give a fatal +error on every run. This was caused by a mishandling of `optind`. + +## 2.6.0 + +This release is a production release ***with no bugfixes***. If you do not want +to upgrade, you don't have to. + +No source code changed; the only thing that changed was `lib2.bc`. + +This release adds one function to the [extended math library][16]: `p(x, y)`, +which calculates `x` to the power of `y`, whether or not `y` is an integer. (The +`^` operator can only accept integer powers.) + +This release also includes a couple of small tweaks to the [extended math +library][16], mostly to fix returning numbers with too high of `scale`. + +## 2.5.3 + +This release is a production release which addresses inconsistencies in the +Portuguese locales. No `bc` code was changed. + +The issues were that the ISO files used different naming, and also that the +files that should have been symlinks were not. I did not catch that because +GitHub rendered them the exact same way. + +## 2.5.2 + +This release is a production release. + +No code was changed, but the build system was changed to allow `CFLAGS` to be +given to `CC`, like this: + +``` +CC="gcc -O3 -march=native" ./configure.sh +``` + +If this happens, the flags are automatically put into `CFLAGS`, and the compiler +is set appropriately. In the example above this means that `CC` will be "gcc" +and `CFLAGS` will be "-O3 -march=native". + +This behavior was added to conform to GNU autotools practices. + +## 2.5.1 + +This is a production release which addresses portability concerns discovered +in the `bc` build system. No `bc` code was changed. + +* Support for Solaris SPARC and AIX were added. +* Minor documentations edits were performed. +* An option for `configure.sh` was added to disable long options if + `getopt_long()` is missing. + +## 2.5.0 + +This is a production release with new translations. No code changed. + +The translations were contributed by [bugcrazy][15], and they are for +Portuguese, both Portugal and Brazil locales. + +## 2.4.0 + +This is a production release primarily aimed at improving `dc`. + +* A couple of copy and paste errors in the [`dc` manual][10] were fixed. +* `dc` startup was optimized by making sure it didn't have to set up `bc`-only + things. +* The `bc` `&&` and `||` operators were made available to `dc` through the `M` + and `m` commands, respectively. +* `dc` macros were changed to be tail call-optimized. + +The last item, tail call optimization, means that if the last thing in a macro +is a call to another macro, then the old macro is popped before executing the +new macro. This change was made to stop `dc` from consuming more and more memory +as macros are executed in a loop. + +The `q` and `Q` commands still respect the "hidden" macros by way of recording +how many macros were removed by tail call optimization. + +## 2.3.2 + +This is a production release meant to fix warnings in the Gentoo `ebuild` by +making it possible to disable binary stripping. Other users do *not* need to +upgrade. + +## 2.3.1 + +This is a production release. It fixes a bug that caused `-1000000000 < -1` to +return `0`. This only happened with negative numbers and only if the value on +the left was more negative by a certain amount. That said, this bug *is* a bad +bug, and needs to be fixed. + +**ALL USERS SHOULD UPDATE `bc`**. + +## 2.3.0 + +This is a production release with changes to the build system. + +## 2.2.0 + +This release is a production release. It only has new features and performance +improvements. + +1. The performance of `sqrt(x)` was improved. +2. The new function `root(x, n)` was added to the extended math library to + calculate `n`th roots. +3. The new function `cbrt(x)` was added to the extended math library to + calculate cube roots. + +## 2.1.3 + +This is a non-critical release; it just changes the build system, and in +non-breaking ways: + +1. Linked locale files were changed to link to their sources with a relative + link. +2. A bug in `configure.sh` that caused long option parsing to fail under `bash` + was fixed. + +## 2.1.2 + +This release is not a critical release. + +1. A few codes were added to history. +2. Multiplication was optimized a bit more. +3. Addition and subtraction were both optimized a bit more. + +## 2.1.1 + +This release contains a fix for the test suite made for Linux from Scratch: now +the test suite prints `pass` when a test is passed. + +Other than that, there is no change in this release, so distros and other users +do not need to upgrade. + +## 2.1.0 + +This release is a production release. + +The following bugs were fixed: + +1. A `dc` bug that caused stack mishandling was fixed. +2. A warning on OpenBSD was fixed. +3. Bugs in `ctrl+arrow` operations in history were fixed. +4. The ability to paste multiple lines in history was added. +5. A `bc` bug, mishandling of array arguments to functions, was fixed. +6. A crash caused by freeing the wrong pointer was fixed. +7. A `dc` bug where strings, in a rare case, were mishandled in parsing was + fixed. + +In addition, the following changes were made: + +1. Division was slightly optimized. +2. An option was added to the build to disable printing of prompts. +3. The special case of empty arguments is now handled. This is to prevent + errors in scripts that end up passing empty arguments. +4. A harmless bug was fixed. This bug was that, with the pop instructions + (mostly) removed (see below), `bc` would leave extra values on its stack for + `void` functions and in a few other cases. These extra items would not + affect anything put on the stack and would not cause any sort of crash or + even buggy behavior, but they would cause `bc` to take more memory than it + needed. + +On top of the above changes, the following optimizations were added: + +1. The need for pop instructions in `bc` was removed. +2. Extra tests on every iteration of the interpreter loop were removed. +3. Updating function and code pointers on every iteration of the interpreter + loop was changed to only updating them when necessary. +4. Extra assignments to pointers were removed. + +Altogether, these changes sped up the interpreter by around 2x. + +***NOTE***: This is the last release with new features because this `bc` is now +considered complete. From now on, only bug fixes and new translations will be +added to this `bc`. + +## 2.0.3 + +This is a production, bug-fix release. + +Two bugs were fixed in this release: + +1. A rare and subtle signal handling bug was fixed. +2. A misbehavior on `0` to a negative power was fixed. + +The last bug bears some mentioning. + +When I originally wrote power, I did not thoroughly check its error cases; +instead, I had it check if the first number was `0` and then if so, just return +`0`. However, `0` to a negative power means that `1` will be divided by `0`, +which is an error. + +I caught this, but only after I stopped being cocky. You see, sometime later, I +had noticed that GNU `bc` returned an error, correctly, but I thought it was +wrong simply because that's not what my `bc` did. I saw it again later and had a +double take. I checked for real, finally, and found out that my `bc` was wrong +all along. + +That was bad on me. But the bug was easy to fix, so it is fixed now. + +There are two other things in this release: + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jun 27 15:06:59 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A54E353A68; Sat, 27 Jun 2020 15:06:59 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vHCl35GQz441r; Sat, 27 Jun 2020 15:06:59 +0000 (UTC) (envelope-from se@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4812A270A9; Sat, 27 Jun 2020 15:06:59 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RF6xa7000106; Sat, 27 Jun 2020 15:06:59 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RF6xZe000105; Sat, 27 Jun 2020 15:06:59 GMT (envelope-from se@FreeBSD.org) Message-Id: <202006271506.05RF6xZe000105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: =?UTF-8?Q?Stefan_E=c3=9fer?= Date: Sat, 27 Jun 2020 15:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362698 - vendor/bc/3.0.2 X-SVN-Group: vendor X-SVN-Commit-Author: se X-SVN-Commit-Paths: vendor/bc/3.0.2 X-SVN-Commit-Revision: 362698 X-SVN-Commit-Repository: base 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.33 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, 27 Jun 2020 15:06:59 -0000 Author: se Date: Sat Jun 27 15:06:58 2020 New Revision: 362698 URL: https://svnweb.freebsd.org/changeset/base/362698 Log: Tag bc 3.0.2 Added: vendor/bc/3.0.2/ - copied from r362697, vendor/bc/dist/ From owner-svn-src-vendor@freebsd.org Sat Jun 27 18:34:21 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29C313595CE; Sat, 27 Jun 2020 18:34:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vMq10ZZMz4JJ4; Sat, 27 Jun 2020 18:34:21 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E96209C89; Sat, 27 Jun 2020 18:34:20 +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 05RIYKln030522; Sat, 27 Jun 2020 18:34:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RIYHfu030504; Sat, 27 Jun 2020 18:34:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006271834.05RIYHfu030504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 27 Jun 2020 18:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362703 - in vendor/llvm-project/release-10.x: clang/lib/CodeGen compiler-rt/lib/builtins/riscv libcxx/include llvm/lib/CodeGen/SelectionDAG llvm/lib/Target/AArch64 llvm/lib/Target/Powe... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm-project/release-10.x: clang/lib/CodeGen compiler-rt/lib/builtins/riscv libcxx/include llvm/lib/CodeGen/SelectionDAG llvm/lib/Target/AArch64 llvm/lib/Target/PowerPC llvm/lib/Target/RISCV... X-SVN-Commit-Revision: 362703 X-SVN-Commit-Repository: base 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.33 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, 27 Jun 2020 18:34:21 -0000 Author: dim Date: Sat Jun 27 18:34:17 2020 New Revision: 362703 URL: https://svnweb.freebsd.org/changeset/base/362703 Log: Vendor import of llvm-project branch release/10.x llvmorg-10.0.1-rc2-0-g77d76b71d7d. Added: vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/int_mul_impl.inc (contents, props changed) vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/muldi3.S (contents, props changed) vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/ vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPError.cpp (contents, props changed) vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPError.h (contents, props changed) vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPStringPool.h (contents, props changed) vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/llvm-dwp.cpp (contents, props changed) vendor/llvm-project/release-10.x/llvm/tools/llvm-size/ vendor/llvm-project/release-10.x/llvm/tools/llvm-size/llvm-size.cpp (contents, props changed) vendor/llvm-project/release-10.x/llvm/tools/llvm-strings/ vendor/llvm-project/release-10.x/llvm/tools/llvm-strings/llvm-strings.cpp (contents, props changed) Modified: vendor/llvm-project/release-10.x/clang/lib/CodeGen/TargetInfo.cpp vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/mulsi3.S vendor/llvm-project/release-10.x/libcxx/include/array vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Modified: vendor/llvm-project/release-10.x/clang/lib/CodeGen/TargetInfo.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/CodeGen/TargetInfo.cpp Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/clang/lib/CodeGen/TargetInfo.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -9613,7 +9613,8 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType uint64_t Size = getContext().getTypeSize(Ty); // Pass floating point values via FPRs if possible. - if (IsFixed && Ty->isFloatingType() && FLen >= Size && ArgFPRsLeft) { + if (IsFixed && Ty->isFloatingType() && !Ty->isComplexType() && + FLen >= Size && ArgFPRsLeft) { ArgFPRsLeft--; return ABIArgInfo::getDirect(); } Added: vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/int_mul_impl.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/int_mul_impl.inc Sat Jun 27 18:34:17 2020 (r362703) @@ -0,0 +1,31 @@ +//===-- int_mul_impl.inc - Integer multiplication -------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Helpers used by __mulsi3, __muldi3. +// +//===----------------------------------------------------------------------===// + +#if !defined(__riscv_mul) + .text + .align 2 + + .globl __mulxi3 + .type __mulxi3, @function +__mulxi3: + mv a2, a0 + mv a0, zero +.L1: + andi a3, a1, 1 + beqz a3, .L2 + add a0, a0, a2 +.L2: + srli a1, a1, 1 + slli a2, a2, 1 + bnez a1, .L1 + ret +#endif Added: vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/muldi3.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/muldi3.S Sat Jun 27 18:34:17 2020 (r362703) @@ -0,0 +1,11 @@ +//===--- muldi3.S - Integer multiplication routines -----------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +#if __riscv_xlen == 64 +#define __mulxi3 __muldi3 +#include "int_mul_impl.inc" +#endif Modified: vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/mulsi3.S ============================================================================== --- vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/mulsi3.S Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/mulsi3.S Sat Jun 27 18:34:17 2020 (r362703) @@ -1,4 +1,4 @@ -//===--- mulsi3.S - Integer multiplication routines routines ---===// +//===--- mulsi3.S - Integer multiplication routines -----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,22 +6,7 @@ // //===----------------------------------------------------------------------===// -#if !defined(__riscv_mul) && __riscv_xlen == 32 - .text - .align 2 - - .globl __mulsi3 - .type __mulsi3, @function -__mulsi3: - mv a2, a0 - mv a0, zero -.L1: - andi a3, a1, 1 - beqz a3, .L2 - add a0, a0, a2 -.L2: - srli a1, a1, 1 - slli a2, a2, 1 - bnez a1, .L1 - ret +#if __riscv_xlen == 32 +#define __mulxi3 __mulsi3 +#include "int_mul_impl.inc" #endif Modified: vendor/llvm-project/release-10.x/libcxx/include/array ============================================================================== --- vendor/llvm-project/release-10.x/libcxx/include/array Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/libcxx/include/array Sat Jun 27 18:34:17 2020 (r362703) @@ -359,7 +359,7 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES template && ...), void>::type + class = _EnableIf<__all<_IsSame<_Tp, _Args>::value...>::value> > array(_Tp, _Args...) -> array<_Tp, 1 + sizeof...(_Args)>; Modified: vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -271,8 +271,20 @@ SDValue DAGTypeLegalizer::PromoteIntRes_AtomicCmpSwap( return Res.getValue(1); } - SDValue Op2 = GetPromotedInteger(N->getOperand(2)); + // Op2 is used for the comparison and thus must be extended according to the + // target's atomic operations. Op3 is merely stored and so can be left alone. + SDValue Op2 = N->getOperand(2); SDValue Op3 = GetPromotedInteger(N->getOperand(3)); + if (TLI.getTargetMachine().getTargetTriple().isRISCV()) { + // The comparison argument must be sign-extended for RISC-V. This is + // abstracted using a new TargetLowering hook in the main LLVM development + // branch, but handled here directly in order to fix the codegen bug for + // 10.x without breaking the libLLVM.so ABI. + Op2 = SExtPromotedInteger(Op2); + } else { + Op2 = GetPromotedInteger(Op2); + } + SDVTList VTs = DAG.getVTList(Op2.getValueType(), N->getValueType(1), MVT::Other); SDValue Res = DAG.getAtomicCmpSwap( Modified: vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -5490,10 +5490,21 @@ char TargetLowering::isNegatibleForFree(SDValue Op, Se EVT VT = Op.getValueType(); const SDNodeFlags Flags = Op->getFlags(); const TargetOptions &Options = DAG.getTarget().Options; - if (!Op.hasOneUse() && !(Op.getOpcode() == ISD::FP_EXTEND && - isFPExtFree(VT, Op.getOperand(0).getValueType()))) - return 0; + if (!Op.hasOneUse()) { + bool IsFreeExtend = Op.getOpcode() == ISD::FP_EXTEND && + isFPExtFree(VT, Op.getOperand(0).getValueType()); + // If we already have the use of the negated floating constant, it is free + // to negate it even it has multiple uses. + bool IsFreeConstant = + Op.getOpcode() == ISD::ConstantFP && + !getNegatedExpression(Op, DAG, LegalOperations, ForCodeSize) + .use_empty(); + + if (!IsFreeExtend && !IsFreeConstant) + return 0; + } + // Don't recurse exponentially. if (Depth > SelectionDAG::MaxRecursionDepth) return 0; @@ -5687,14 +5698,7 @@ SDValue TargetLowering::getNegatedExpression(SDValue O ForCodeSize, Depth + 1); char V1 = isNegatibleForFree(Op.getOperand(1), DAG, LegalOperations, ForCodeSize, Depth + 1); - // TODO: This is a hack. It is possible that costs have changed between now - // and the initial calls to isNegatibleForFree(). That is because we - // are rewriting the expression, and that may change the number of - // uses (and therefore the cost) of values. If the negation costs are - // equal, only negate this value if it is a constant. Otherwise, try - // operand 1. A better fix would eliminate uses as a cost factor or - // track the change in uses as we rewrite the expression. - if (V0 > V1 || (V0 == V1 && isa(Op.getOperand(0)))) { + if (V0 > V1) { // fold (fneg (fma X, Y, Z)) -> (fma (fneg X), Y, (fneg Z)) SDValue Neg0 = getNegatedExpression( Op.getOperand(0), DAG, LegalOperations, ForCodeSize, Depth + 1); Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -211,6 +211,24 @@ AArch64FrameLowering::getStackIDForScalableVectors() c return TargetStackID::SVEVector; } +/// Returns the size of the fixed object area (allocated next to sp on entry) +/// On Win64 this may include a var args area and an UnwindHelp object for EH. +static unsigned getFixedObjectSize(const MachineFunction &MF, + const AArch64FunctionInfo *AFI, bool IsWin64, + bool IsFunclet) { + if (!IsWin64 || IsFunclet) { + // Only Win64 uses fixed objects, and then only for the function (not + // funclets) + return 0; + } else { + // Var args are stored here in the primary function. + const unsigned VarArgsArea = AFI->getVarArgsGPRSize(); + // To support EH funclets we allocate an UnwindHelp object + const unsigned UnwindHelpObject = (MF.hasEHFunclets() ? 8 : 0); + return alignTo(VarArgsArea + UnwindHelpObject, 16); + } +} + /// Returns the size of the entire SVE stackframe (calleesaves + spills). static StackOffset getSVEStackSize(const MachineFunction &MF) { const AArch64FunctionInfo *AFI = MF.getInfo(); @@ -959,10 +977,7 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio bool IsWin64 = Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv()); - // Var args are accounted for in the containing function, so don't - // include them for funclets. - unsigned FixedObject = (IsWin64 && !IsFunclet) ? - alignTo(AFI->getVarArgsGPRSize(), 16) : 0; + unsigned FixedObject = getFixedObjectSize(MF, AFI, IsWin64, IsFunclet); auto PrologueSaveSize = AFI->getCalleeSavedStackSize() + FixedObject; // All of the remaining stack allocations are for locals. @@ -993,32 +1008,8 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio ++MBBI; } - // The code below is not applicable to funclets. We have emitted all the SEH - // opcodes that we needed to emit. The FP and BP belong to the containing - // function. - if (IsFunclet) { - if (NeedsWinCFI) { - HasWinCFI = true; - BuildMI(MBB, MBBI, DL, TII->get(AArch64::SEH_PrologEnd)) - .setMIFlag(MachineInstr::FrameSetup); - } - - // SEH funclets are passed the frame pointer in X1. If the parent - // function uses the base register, then the base register is used - // directly, and is not retrieved from X1. - if (F.hasPersonalityFn()) { - EHPersonality Per = classifyEHPersonality(F.getPersonalityFn()); - if (isAsynchronousEHPersonality(Per)) { - BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::COPY), AArch64::FP) - .addReg(AArch64::X1).setMIFlag(MachineInstr::FrameSetup); - MBB.addLiveIn(AArch64::X1); - } - } - - return; - } - - if (HasFP) { + // For funclets the FP belongs to the containing function. + if (!IsFunclet && HasFP) { // Only set up FP if we actually need to. int64_t FPOffset = isTargetDarwin(MF) ? (AFI->getCalleeSavedStackSize() - 16) : 0; @@ -1161,7 +1152,9 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio // Allocate space for the rest of the frame. if (NumBytes) { - const bool NeedsRealignment = RegInfo->needsStackRealignment(MF); + // Alignment is required for the parent frame, not the funclet + const bool NeedsRealignment = + !IsFunclet && RegInfo->needsStackRealignment(MF); unsigned scratchSPReg = AArch64::SP; if (NeedsRealignment) { @@ -1215,7 +1208,8 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio // FIXME: Clarify FrameSetup flags here. // Note: Use emitFrameOffset() like above for FP if the FrameSetup flag is // needed. - if (RegInfo->hasBasePointer(MF)) { + // For funclets the BP belongs to the containing function. + if (!IsFunclet && RegInfo->hasBasePointer(MF)) { TII->copyPhysReg(MBB, MBBI, DL, RegInfo->getBaseRegister(), AArch64::SP, false); if (NeedsWinCFI) { @@ -1232,6 +1226,19 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio .setMIFlag(MachineInstr::FrameSetup); } + // SEH funclets are passed the frame pointer in X1. If the parent + // function uses the base register, then the base register is used + // directly, and is not retrieved from X1. + if (IsFunclet && F.hasPersonalityFn()) { + EHPersonality Per = classifyEHPersonality(F.getPersonalityFn()); + if (isAsynchronousEHPersonality(Per)) { + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::COPY), AArch64::FP) + .addReg(AArch64::X1) + .setMIFlag(MachineInstr::FrameSetup); + MBB.addLiveIn(AArch64::X1); + } + } + if (needsFrameMoves) { const DataLayout &TD = MF.getDataLayout(); const int StackGrowth = isTargetDarwin(MF) @@ -1450,10 +1457,7 @@ void AArch64FrameLowering::emitEpilogue(MachineFunctio bool IsWin64 = Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv()); - // Var args are accounted for in the containing function, so don't - // include them for funclets. - unsigned FixedObject = - (IsWin64 && !IsFunclet) ? alignTo(AFI->getVarArgsGPRSize(), 16) : 0; + unsigned FixedObject = getFixedObjectSize(MF, AFI, IsWin64, IsFunclet); uint64_t AfterCSRPopSize = ArgumentPopSize; auto PrologueSaveSize = AFI->getCalleeSavedStackSize() + FixedObject; @@ -1679,7 +1683,9 @@ static StackOffset getFPOffset(const MachineFunction & const auto &Subtarget = MF.getSubtarget(); bool IsWin64 = Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv()); - unsigned FixedObject = IsWin64 ? alignTo(AFI->getVarArgsGPRSize(), 16) : 0; + + unsigned FixedObject = + getFixedObjectSize(MF, AFI, IsWin64, /*IsFunclet=*/false); unsigned FPAdjust = isTargetDarwin(MF) ? 16 : AFI->getCalleeSavedStackSize(MF.getFrameInfo()); return {ObjectOffset + FixedObject + FPAdjust, MVT::i8}; @@ -2632,9 +2638,14 @@ void AArch64FrameLowering::processFunctionBeforeFrameF ++MBBI; // Create an UnwindHelp object. - int UnwindHelpFI = - MFI.CreateStackObject(/*size*/8, /*alignment*/16, false); + // The UnwindHelp object is allocated at the start of the fixed object area + int64_t FixedObject = + getFixedObjectSize(MF, AFI, /*IsWin64*/ true, /*IsFunclet*/ false); + int UnwindHelpFI = MFI.CreateFixedObject(/*Size*/ 8, + /*SPOffset*/ -FixedObject, + /*IsImmutable=*/false); EHInfo.UnwindHelpFrameIdx = UnwindHelpFI; + // We need to store -2 into the UnwindHelp object at the start of the // function. DebugLoc DL; @@ -2656,10 +2667,14 @@ int AArch64FrameLowering::getFrameIndexReferencePrefer const MachineFunction &MF, int FI, unsigned &FrameReg, bool IgnoreSPUpdates) const { const MachineFrameInfo &MFI = MF.getFrameInfo(); - LLVM_DEBUG(dbgs() << "Offset from the SP for " << FI << " is " - << MFI.getObjectOffset(FI) << "\n"); - FrameReg = AArch64::SP; - return MFI.getObjectOffset(FI); + if (IgnoreSPUpdates) { + LLVM_DEBUG(dbgs() << "Offset from the SP for " << FI << " is " + << MFI.getObjectOffset(FI) << "\n"); + FrameReg = AArch64::SP; + return MFI.getObjectOffset(FI); + } + + return getFrameIndexReference(MF, FI, FrameReg); } /// The parent frame offset (aka dispFrame) is only used on X86_64 to retrieve Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -298,6 +298,11 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const Machin switch (ExtraCode[0]) { default: return true; // Unknown modifier. + case 'L': // A memory reference to the upper word of a double word op. + O << getDataLayout().getPointerSize() << "("; + printOperand(MI, OpNo, O); + O << ")"; + return false; case 'y': // A memory reference for an X-form instruction { const char *RegName = "r0"; @@ -309,7 +314,6 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const Machin } case 'U': // Print 'u' for update form. case 'X': // Print 'x' for indexed form. - { // FIXME: Currently for PowerPC memory operands are always loaded // into a register, so we never get an update or indexed form. // This is bad even for offset forms, since even if we know we @@ -318,7 +322,6 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const Machin // tolerate 'U' and 'X' but don't output anything. assert(MI->getOperand(OpNo).isReg()); return false; - } } } Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -181,9 +181,9 @@ void RISCVFrameLowering::emitPrologue(MachineFunction adjustReg(MBB, MBBI, DL, FPReg, SPReg, StackSize - RVFI->getVarArgsSaveSize(), MachineInstr::FrameSetup); - // Emit ".cfi_def_cfa $fp, 0" + // Emit ".cfi_def_cfa $fp, -RVFI->getVarArgsSaveSize()" unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createDefCfa( - nullptr, RI->getDwarfRegNum(FPReg, true), 0)); + nullptr, RI->getDwarfRegNum(FPReg, true), -RVFI->getVarArgsSaveSize())); BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)) .addCFIIndex(CFIIndex); } Modified: vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVISelLowering.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Sat Jun 27 17:39:13 2020 (r362702) +++ vendor/llvm-project/release-10.x/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -197,6 +197,14 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetM setTruncStoreAction(MVT::f64, MVT::f16, Expand); } + if (Subtarget.is64Bit() && + !(Subtarget.hasStdExtD() || Subtarget.hasStdExtF())) { + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); + setOperationAction(ISD::STRICT_FP_TO_UINT, MVT::i32, Custom); + setOperationAction(ISD::STRICT_FP_TO_SINT, MVT::i32, Custom); + } + setOperationAction(ISD::GlobalAddress, XLenVT, Custom); setOperationAction(ISD::BlockAddress, XLenVT, Custom); setOperationAction(ISD::ConstantPool, XLenVT, Custom); @@ -876,6 +884,32 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N switch (N->getOpcode()) { default: llvm_unreachable("Don't know how to custom type legalize this operation!"); + case ISD::STRICT_FP_TO_SINT: + case ISD::STRICT_FP_TO_UINT: + case ISD::FP_TO_SINT: + case ISD::FP_TO_UINT: { + bool IsStrict = N->isStrictFPOpcode(); + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && + "Unexpected custom legalisation"); + SDValue Op0 = IsStrict ? N->getOperand(1) : N->getOperand(0); + RTLIB::Libcall LC; + if (N->getOpcode() == ISD::FP_TO_SINT || + N->getOpcode() == ISD::STRICT_FP_TO_SINT) + LC = RTLIB::getFPTOSINT(Op0.getValueType(), N->getValueType(0)); + else + LC = RTLIB::getFPTOUINT(Op0.getValueType(), N->getValueType(0)); + MakeLibCallOptions CallOptions; + EVT OpVT = Op0.getValueType(); + CallOptions.setTypeListBeforeSoften(OpVT, N->getValueType(0), true); + SDValue Chain = IsStrict ? N->getOperand(0) : SDValue(); + SDValue Result; + std::tie(Result, Chain) = + makeLibCall(DAG, LC, N->getValueType(0), Op0, CallOptions, DL, Chain); + Results.push_back(Result); + if (IsStrict) + Results.push_back(Chain); + break; + } case ISD::READCYCLECOUNTER: { assert(!Subtarget.is64Bit() && "READCYCLECOUNTER only has custom type legalization on riscv32"); Added: vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPError.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPError.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -0,0 +1,3 @@ +#include "DWPError.h" +using namespace llvm; +char DWPError::ID; Added: vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPError.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPError.h Sat Jun 27 18:34:17 2020 (r362703) @@ -0,0 +1,23 @@ +#ifndef TOOLS_LLVM_DWP_DWPERROR +#define TOOLS_LLVM_DWP_DWPERROR + +#include "llvm/Support/Error.h" +#include "llvm/Support/ErrorHandling.h" +#include + +namespace llvm { +class DWPError : public ErrorInfo { +public: + DWPError(std::string Info) : Info(std::move(Info)) {} + void log(raw_ostream &OS) const override { OS << Info; } + std::error_code convertToErrorCode() const override { + llvm_unreachable("Not implemented"); + } + static char ID; + +private: + std::string Info; +}; +} + +#endif Added: vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPStringPool.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/DWPStringPool.h Sat Jun 27 18:34:17 2020 (r362703) @@ -0,0 +1,56 @@ +#ifndef TOOLS_LLVM_DWP_DWPSTRINGPOOL +#define TOOLS_LLVM_DWP_DWPSTRINGPOOL + +#include "llvm/ADT/DenseMap.h" +#include "llvm/MC/MCSection.h" +#include "llvm/MC/MCStreamer.h" +#include + +namespace llvm { +class DWPStringPool { + + struct CStrDenseMapInfo { + static inline const char *getEmptyKey() { + return reinterpret_cast(~static_cast(0)); + } + static inline const char *getTombstoneKey() { + return reinterpret_cast(~static_cast(1)); + } + static unsigned getHashValue(const char *Val) { + assert(Val != getEmptyKey() && "Cannot hash the empty key!"); + assert(Val != getTombstoneKey() && "Cannot hash the tombstone key!"); + return (unsigned)hash_value(StringRef(Val)); + } + static bool isEqual(const char *LHS, const char *RHS) { + if (RHS == getEmptyKey()) + return LHS == getEmptyKey(); + if (RHS == getTombstoneKey()) + return LHS == getTombstoneKey(); + return strcmp(LHS, RHS) == 0; + } + }; + + MCStreamer &Out; + MCSection *Sec; + DenseMap Pool; + uint32_t Offset = 0; + +public: + DWPStringPool(MCStreamer &Out, MCSection *Sec) : Out(Out), Sec(Sec) {} + + uint32_t getOffset(const char *Str, unsigned Length) { + assert(strlen(Str) + 1 == Length && "Ensure length hint is correct"); + + auto Pair = Pool.insert(std::make_pair(Str, Offset)); + if (Pair.second) { + Out.SwitchSection(Sec); + Out.EmitBytes(StringRef(Str, Length)); + Offset += Length; + } + + return Pair.first->second; + } +}; +} + +#endif Added: vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/llvm-dwp.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/llvm-dwp.cpp Sat Jun 27 18:34:17 2020 (r362703) @@ -0,0 +1,749 @@ +//===-- llvm-dwp.cpp - Split DWARF merging tool for llvm ------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// A utility for merging DWARF 5 Split DWARF .dwo files into .dwp (DWARF +// package files). +// +//===----------------------------------------------------------------------===// +#include "DWPError.h" +#include "DWPStringPool.h" +#include "llvm/ADT/MapVector.h" +#include "llvm/ADT/Optional.h" +#include "llvm/ADT/STLExtras.h" +#include "llvm/DebugInfo/DWARF/DWARFContext.h" +#include "llvm/DebugInfo/DWARF/DWARFFormValue.h" +#include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h" +#include "llvm/MC/MCAsmBackend.h" +#include "llvm/MC/MCAsmInfo.h" +#include "llvm/MC/MCCodeEmitter.h" +#include "llvm/MC/MCContext.h" +#include "llvm/MC/MCInstrInfo.h" +#include "llvm/MC/MCObjectFileInfo.h" +#include "llvm/MC/MCObjectWriter.h" +#include "llvm/MC/MCRegisterInfo.h" +#include "llvm/MC/MCStreamer.h" +#include "llvm/MC/MCTargetOptionsCommandFlags.inc" +#include "llvm/Object/Decompressor.h" +#include "llvm/Object/ObjectFile.h" +#include "llvm/Support/DataExtractor.h" +#include "llvm/Support/Error.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/InitLLVM.h" +#include "llvm/Support/MathExtras.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/TargetRegistry.h" +#include "llvm/Support/TargetSelect.h" +#include "llvm/Support/ToolOutputFile.h" +#include "llvm/Support/WithColor.h" +#include "llvm/Support/raw_ostream.h" + +using namespace llvm; +using namespace llvm::object; + +cl::OptionCategory DwpCategory("Specific Options"); +static cl::list InputFiles(cl::Positional, cl::ZeroOrMore, + cl::desc(""), + cl::cat(DwpCategory)); + +static cl::list ExecFilenames( + "e", cl::ZeroOrMore, + cl::desc("Specify the executable/library files to get the list of *.dwo from"), + cl::value_desc("filename"), cl::cat(DwpCategory)); + +static cl::opt OutputFilename(cl::Required, "o", + cl::desc("Specify the output file."), + cl::value_desc("filename"), + cl::cat(DwpCategory)); + +static void writeStringsAndOffsets(MCStreamer &Out, DWPStringPool &Strings, + MCSection *StrOffsetSection, + StringRef CurStrSection, + StringRef CurStrOffsetSection) { + // Could possibly produce an error or warning if one of these was non-null but + // the other was null. + if (CurStrSection.empty() || CurStrOffsetSection.empty()) + return; + + DenseMap OffsetRemapping; + + DataExtractor Data(CurStrSection, true, 0); + uint64_t LocalOffset = 0; + uint64_t PrevOffset = 0; + while (const char *s = Data.getCStr(&LocalOffset)) { + OffsetRemapping[PrevOffset] = + Strings.getOffset(s, LocalOffset - PrevOffset); + PrevOffset = LocalOffset; + } + + Data = DataExtractor(CurStrOffsetSection, true, 0); + + Out.SwitchSection(StrOffsetSection); + + uint64_t Offset = 0; + uint64_t Size = CurStrOffsetSection.size(); + while (Offset < Size) { + auto OldOffset = Data.getU32(&Offset); + auto NewOffset = OffsetRemapping[OldOffset]; + Out.EmitIntValue(NewOffset, 4); + } +} + +static uint64_t getCUAbbrev(StringRef Abbrev, uint64_t AbbrCode) { + uint64_t CurCode; + uint64_t Offset = 0; + DataExtractor AbbrevData(Abbrev, true, 0); + while ((CurCode = AbbrevData.getULEB128(&Offset)) != AbbrCode) { + // Tag + AbbrevData.getULEB128(&Offset); + // DW_CHILDREN + AbbrevData.getU8(&Offset); + // Attributes + while (AbbrevData.getULEB128(&Offset) | AbbrevData.getULEB128(&Offset)) + ; + } + return Offset; +} + +struct CompileUnitIdentifiers { + uint64_t Signature = 0; + const char *Name = ""; + const char *DWOName = ""; +}; + +static Expected +getIndexedString(dwarf::Form Form, DataExtractor InfoData, + uint64_t &InfoOffset, StringRef StrOffsets, StringRef Str) { + if (Form == dwarf::DW_FORM_string) + return InfoData.getCStr(&InfoOffset); + if (Form != dwarf::DW_FORM_GNU_str_index) + return make_error( + "string field encoded without DW_FORM_string or DW_FORM_GNU_str_index"); + auto StrIndex = InfoData.getULEB128(&InfoOffset); + DataExtractor StrOffsetsData(StrOffsets, true, 0); + uint64_t StrOffsetsOffset = 4 * StrIndex; + uint64_t StrOffset = StrOffsetsData.getU32(&StrOffsetsOffset); + DataExtractor StrData(Str, true, 0); + return StrData.getCStr(&StrOffset); +} + +static Expected getCUIdentifiers(StringRef Abbrev, + StringRef Info, + StringRef StrOffsets, + StringRef Str) { + uint64_t Offset = 0; + DataExtractor InfoData(Info, true, 0); + dwarf::DwarfFormat Format = dwarf::DwarfFormat::DWARF32; + uint64_t Length = InfoData.getU32(&Offset); + // If the length is 0xffffffff, then this indictes that this is a DWARF 64 + // stream and the length is actually encoded into a 64 bit value that follows. + if (Length == 0xffffffffU) { + Format = dwarf::DwarfFormat::DWARF64; + Length = InfoData.getU64(&Offset); + } + uint16_t Version = InfoData.getU16(&Offset); + InfoData.getU32(&Offset); // Abbrev offset (should be zero) + uint8_t AddrSize = InfoData.getU8(&Offset); + + uint32_t AbbrCode = InfoData.getULEB128(&Offset); + + DataExtractor AbbrevData(Abbrev, true, 0); + uint64_t AbbrevOffset = getCUAbbrev(Abbrev, AbbrCode); + auto Tag = static_cast(AbbrevData.getULEB128(&AbbrevOffset)); + if (Tag != dwarf::DW_TAG_compile_unit) + return make_error("top level DIE is not a compile unit"); + // DW_CHILDREN + AbbrevData.getU8(&AbbrevOffset); + uint32_t Name; + dwarf::Form Form; + CompileUnitIdentifiers ID; + Optional Signature = None; + while ((Name = AbbrevData.getULEB128(&AbbrevOffset)) | + (Form = static_cast(AbbrevData.getULEB128(&AbbrevOffset))) && + (Name != 0 || Form != 0)) { + switch (Name) { + case dwarf::DW_AT_name: { + Expected EName = + getIndexedString(Form, InfoData, Offset, StrOffsets, Str); + if (!EName) + return EName.takeError(); + ID.Name = *EName; + break; + } + case dwarf::DW_AT_GNU_dwo_name: { + Expected EName = + getIndexedString(Form, InfoData, Offset, StrOffsets, Str); + if (!EName) + return EName.takeError(); + ID.DWOName = *EName; + break; + } + case dwarf::DW_AT_GNU_dwo_id: + Signature = InfoData.getU64(&Offset); + break; + default: + DWARFFormValue::skipValue(Form, InfoData, &Offset, + dwarf::FormParams({Version, AddrSize, Format})); + } + } + if (!Signature) + return make_error("compile unit missing dwo_id"); + ID.Signature = *Signature; + return ID; +} + +struct UnitIndexEntry { + DWARFUnitIndex::Entry::SectionContribution Contributions[8]; + std::string Name; + std::string DWOName; + StringRef DWPName; +}; + +static StringRef getSubsection(StringRef Section, + const DWARFUnitIndex::Entry &Entry, + DWARFSectionKind Kind) { + const auto *Off = Entry.getOffset(Kind); + if (!Off) + return StringRef(); + return Section.substr(Off->Offset, Off->Length); +} + +static void addAllTypesFromDWP( + MCStreamer &Out, MapVector &TypeIndexEntries, + const DWARFUnitIndex &TUIndex, MCSection *OutputTypes, StringRef Types, + const UnitIndexEntry &TUEntry, uint32_t &TypesOffset) { + Out.SwitchSection(OutputTypes); + for (const DWARFUnitIndex::Entry &E : TUIndex.getRows()) { + auto *I = E.getOffsets(); + if (!I) + continue; + auto P = TypeIndexEntries.insert(std::make_pair(E.getSignature(), TUEntry)); + if (!P.second) + continue; + auto &Entry = P.first->second; + // Zero out the debug_info contribution + Entry.Contributions[0] = {}; + for (auto Kind : TUIndex.getColumnKinds()) { + auto &C = Entry.Contributions[Kind - DW_SECT_INFO]; + C.Offset += I->Offset; + C.Length = I->Length; + ++I; + } + auto &C = Entry.Contributions[DW_SECT_TYPES - DW_SECT_INFO]; + Out.EmitBytes(Types.substr( + C.Offset - TUEntry.Contributions[DW_SECT_TYPES - DW_SECT_INFO].Offset, + C.Length)); + C.Offset = TypesOffset; + TypesOffset += C.Length; + } +} + +static void addAllTypes(MCStreamer &Out, + MapVector &TypeIndexEntries, + MCSection *OutputTypes, + const std::vector &TypesSections, + const UnitIndexEntry &CUEntry, uint32_t &TypesOffset) { + for (StringRef Types : TypesSections) { + Out.SwitchSection(OutputTypes); + uint64_t Offset = 0; + DataExtractor Data(Types, true, 0); + while (Data.isValidOffset(Offset)) { + UnitIndexEntry Entry = CUEntry; + // Zero out the debug_info contribution + Entry.Contributions[0] = {}; + auto &C = Entry.Contributions[DW_SECT_TYPES - DW_SECT_INFO]; + C.Offset = TypesOffset; + auto PrevOffset = Offset; + // Length of the unit, including the 4 byte length field. + C.Length = Data.getU32(&Offset) + 4; + + Data.getU16(&Offset); // Version + Data.getU32(&Offset); // Abbrev offset + Data.getU8(&Offset); // Address size + auto Signature = Data.getU64(&Offset); + Offset = PrevOffset + C.Length; + + auto P = TypeIndexEntries.insert(std::make_pair(Signature, Entry)); + if (!P.second) + continue; + + Out.EmitBytes(Types.substr(PrevOffset, C.Length)); + TypesOffset += C.Length; + } + } +} + +static void +writeIndexTable(MCStreamer &Out, ArrayRef ContributionOffsets, + const MapVector &IndexEntries, + uint32_t DWARFUnitIndex::Entry::SectionContribution::*Field) { + for (const auto &E : IndexEntries) + for (size_t i = 0; i != array_lengthof(E.second.Contributions); ++i) + if (ContributionOffsets[i]) + Out.EmitIntValue(E.second.Contributions[i].*Field, 4); +} + +static void +writeIndex(MCStreamer &Out, MCSection *Section, + ArrayRef ContributionOffsets, + const MapVector &IndexEntries) { + if (IndexEntries.empty()) + return; + + unsigned Columns = 0; + for (auto &C : ContributionOffsets) + if (C) + ++Columns; + + std::vector Buckets(NextPowerOf2(3 * IndexEntries.size() / 2)); + uint64_t Mask = Buckets.size() - 1; + size_t i = 0; + for (const auto &P : IndexEntries) { + auto S = P.first; + auto H = S & Mask; + auto HP = ((S >> 32) & Mask) | 1; + while (Buckets[H]) { + assert(S != IndexEntries.begin()[Buckets[H] - 1].first && + "Duplicate unit"); + H = (H + HP) & Mask; + } + Buckets[H] = i + 1; + ++i; + } + + Out.SwitchSection(Section); + Out.EmitIntValue(2, 4); // Version + Out.EmitIntValue(Columns, 4); // Columns + Out.EmitIntValue(IndexEntries.size(), 4); // Num Units + Out.EmitIntValue(Buckets.size(), 4); // Num Buckets + + // Write the signatures. + for (const auto &I : Buckets) + Out.EmitIntValue(I ? IndexEntries.begin()[I - 1].first : 0, 8); + + // Write the indexes. + for (const auto &I : Buckets) + Out.EmitIntValue(I, 4); + + // Write the column headers (which sections will appear in the table) + for (size_t i = 0; i != ContributionOffsets.size(); ++i) + if (ContributionOffsets[i]) + Out.EmitIntValue(i + DW_SECT_INFO, 4); + + // Write the offsets. + writeIndexTable(Out, ContributionOffsets, IndexEntries, + &DWARFUnitIndex::Entry::SectionContribution::Offset); + + // Write the lengths. + writeIndexTable(Out, ContributionOffsets, IndexEntries, + &DWARFUnitIndex::Entry::SectionContribution::Length); +} + +std::string buildDWODescription(StringRef Name, StringRef DWPName, StringRef DWOName) { + std::string Text = "\'"; + Text += Name; + Text += '\''; + if (!DWPName.empty()) { + Text += " (from "; + if (!DWOName.empty()) { + Text += '\''; + Text += DWOName; + Text += "' in "; + } + Text += '\''; + Text += DWPName; + Text += "')"; + } + return Text; +} + +static Error createError(StringRef Name, Error E) { + return make_error( + ("failure while decompressing compressed section: '" + Name + "', " + + llvm::toString(std::move(E))) + .str()); +} + +static Error +handleCompressedSection(std::deque> &UncompressedSections, + StringRef &Name, StringRef &Contents) { + if (!Decompressor::isGnuStyle(Name)) + return Error::success(); + + Expected Dec = + Decompressor::create(Name, Contents, false /*IsLE*/, false /*Is64Bit*/); + if (!Dec) + return createError(Name, Dec.takeError()); + + UncompressedSections.emplace_back(); + if (Error E = Dec->resizeAndDecompress(UncompressedSections.back())) + return createError(Name, std::move(E)); + + Name = Name.substr(2); // Drop ".z" + Contents = UncompressedSections.back(); + return Error::success(); +} + +static Error handleSection( + const StringMap> &KnownSections, + const MCSection *StrSection, const MCSection *StrOffsetSection, + const MCSection *TypesSection, const MCSection *CUIndexSection, + const MCSection *TUIndexSection, const SectionRef &Section, MCStreamer &Out, + std::deque> &UncompressedSections, + uint32_t (&ContributionOffsets)[8], UnitIndexEntry &CurEntry, + StringRef &CurStrSection, StringRef &CurStrOffsetSection, + std::vector &CurTypesSection, StringRef &InfoSection, + StringRef &AbbrevSection, StringRef &CurCUIndexSection, + StringRef &CurTUIndexSection) { + if (Section.isBSS()) + return Error::success(); + + if (Section.isVirtual()) + return Error::success(); + + Expected NameOrErr = Section.getName(); + if (!NameOrErr) + return NameOrErr.takeError(); + StringRef Name = *NameOrErr; + + Expected ContentsOrErr = Section.getContents(); + if (!ContentsOrErr) + return ContentsOrErr.takeError(); + StringRef Contents = *ContentsOrErr; + + if (auto Err = handleCompressedSection(UncompressedSections, Name, Contents)) + return Err; + + Name = Name.substr(Name.find_first_not_of("._")); + + auto SectionPair = KnownSections.find(Name); + if (SectionPair == KnownSections.end()) + return Error::success(); + + if (DWARFSectionKind Kind = SectionPair->second.second) { + auto Index = Kind - DW_SECT_INFO; + if (Kind != DW_SECT_TYPES) { + CurEntry.Contributions[Index].Offset = ContributionOffsets[Index]; + ContributionOffsets[Index] += + (CurEntry.Contributions[Index].Length = Contents.size()); + } + + switch (Kind) { + case DW_SECT_INFO: + InfoSection = Contents; + break; + case DW_SECT_ABBREV: + AbbrevSection = Contents; + break; + default: + break; + } + } + + MCSection *OutSection = SectionPair->second.first; + if (OutSection == StrOffsetSection) + CurStrOffsetSection = Contents; + else if (OutSection == StrSection) + CurStrSection = Contents; + else if (OutSection == TypesSection) + CurTypesSection.push_back(Contents); + else if (OutSection == CUIndexSection) + CurCUIndexSection = Contents; + else if (OutSection == TUIndexSection) + CurTUIndexSection = Contents; + else { + Out.SwitchSection(OutSection); + Out.EmitBytes(Contents); + } + return Error::success(); +} + +static Error *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Sat Jun 27 18:35:00 2020 Return-Path: Delivered-To: svn-src-vendor@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED1F83596AD; Sat, 27 Jun 2020 18:35:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vMqm602Rz4Jnn; Sat, 27 Jun 2020 18:35:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEE869C8D; Sat, 27 Jun 2020 18:35:00 +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 05RIZ0P0030612; Sat, 27 Jun 2020 18:35:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RIZ0r8030611; Sat, 27 Jun 2020 18:35:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006271835.05RIZ0r8030611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 27 Jun 2020 18:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362704 - vendor/llvm-project/llvmorg-10.0.1-rc2-0-g77d76b71d7d X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-project/llvmorg-10.0.1-rc2-0-g77d76b71d7d X-SVN-Commit-Revision: 362704 X-SVN-Commit-Repository: base 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.33 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, 27 Jun 2020 18:35:01 -0000 Author: dim Date: Sat Jun 27 18:35:00 2020 New Revision: 362704 URL: https://svnweb.freebsd.org/changeset/base/362704 Log: Tag llvm-project branch release/10.x llvmorg-10.0.1-rc2-0-g77d76b71d7d. Added: vendor/llvm-project/llvmorg-10.0.1-rc2-0-g77d76b71d7d/ - copied from r362703, vendor/llvm-project/release-10.x/