Commit Graph

8641 Commits

Author SHA1 Message Date
christos
caea1f9a8b merge conflicts 2019-10-06 23:29:42 +00:00
christos
c0269b9b8d 2019-06-17 Thomas E. Dickey <dickey@invisible-island.net>
* 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  <dickey@invisible-island.net>

	* 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  <dickey@invisible-island.net>

	* config.guess: 2019-06-10

2019-05-22  Thomas E. Dickey  <dickey@invisible-island.net>

	* config.sub: 2019-05-22
2019-10-06 23:19:26 +00:00
mrg
31fd77d90f remove ubsan_handlers_cxx.cc from sources. shouldn't be used with gcc. 2019-10-06 00:15:22 +00:00
mrg
91d03f50e2 use target size in a couple of strncpy() calls:
- load_hash() has already zeroed the structure so final nul is there.
- print_ipflog() copied final byte that was then nul'd.
2019-10-05 23:32:20 +00:00
brad
2ab41a9a50 For ZFS on NetBSD there are a number of functions called
zfs_netbsd_{create,mknod,link,etc..} that call functions called
zfs_{create,mknod,link,etc..}.  These later functions may return a
error code along with a *vpp that is NULL.  This situation was not
handled by the zfs_netbsd_* functions and would result in a panic in a
number of cases.  The simplest to trigger it was filling up a dataset
or pool resulting in a over quota condition.  An attempt to create
another file, or directory at that point would panic.
2019-10-04 23:06:19 +00:00
maya
6b43361992 We might've switched modes, re-init the move cost table again if necessary.
Fixes unlikely segfault on VAX.
2019-10-04 12:46:43 +00:00
mrg
628b66af12 turn off various warnings for various things:
- file has looks bogus maybe-uninitialized
- llvm triggers an attribute violation:
  ScheduleDAGInstrs.cpp:1430:14: error: declaration of
    'llvm::raw_ostream& llvm::operator<<(llvm::raw_ostream&, const llvm::ILPValue&)'
    with attribute 'noinline' follows inline declaration [-Werror=attributes]
- ntp and pkg_install have obvious restrict violations, should be
  fixed but i'm avoiding patching upstream code in this pass
- tftp has an array bounds that doesn't seem real issue
- sysinst's partman.c has major problem with passing the same
  string as source and dest in snprintf, as a way to strcat
  with formatting which trip restrict violations.  non trivial
  to fix so for now the warning is elided.
- Xext's XEVI.c has similar issue as partman.c

everyone and GCC 8 gets these warnings turned off for now:

	-Wno-format-truncation
	-Wno-stringop-overflow
	-Wno-stringop-truncation
	-Wno-cast-function-type

as they trip a large amount of code.  most of them should be
investigated, but the few i looked at were not finding actually
real bugs, vs instances of poor coding, so skipping for now.
2019-10-04 09:47:27 +00:00
mrg
f59299f723 give a catch() a variable. gcc 8 is picky:
atf-check.cpp:221:23: error: catching polymorphic type 'class std::runtime_error' by value [-Werror=catch-value=]
2019-10-04 09:19:18 +00:00
mrg
a83f6c1317 msg:
avoid passing the same pointer in multiple arguments for restrict
marked arguments:
- sigaction() wants separate in/out
- use memmove() not memcpy() for overlapping regions (this may fix
  a real bug in nvi -- but it seems unlikely)
- select() wants separate read/write/except
- sigprocmask() wants separate set/oset
2019-10-04 09:01:59 +00:00
mrg
5e850be408 - update README.gcc8 to include current status
- netbsd/arm64 uses 64 byte malloc alignment
- make lsan compile on sparc*, mips*, ppc and arm64 again
- add missing sparc, alpha and i386 abi compat for struct __sanitizer_addrinfo
- avoid linux includes on arm64
- avoid multiply defined __ubsan_handle_cfi_bad_type when UBSAN_CAN_USE_CXXABI
  isn't defined, and, undefine it
- bad_array_length.cc and bad_array_new.cc lose special build rules
- regen arm64 mknative
2019-10-04 08:51:32 +00:00
kamil
9425a92945 Switch kevent udata from intptr_t void*
Synchromize the struct field format with other BSDs and Darwin.

No ABI change between older and newer struct form on the ports.

The change will require no changes to most C users during the transition
period as the header keeps a caller cast.

Discussed with core@ and there were no objections for this move.
2019-10-03 22:16:52 +00:00
christos
35a16a55bf realloc(ptr, 0) != { free(ptr); return NULL; }
http://www.open-std.org/jtc1/sc22/wg14/www/docs/summary.htm#dr_400
2019-10-03 16:10:23 +00:00
christos
da174a1fe9 PR/54594: Martin Husemann: bind may crash at startup
Use memcpy(3) instead of assuming casting "uint8_t *" to "uint64_t *" and
de-referencing works.
2019-10-02 15:43:15 +00:00
christos
0ce1e4fd59 Fix core-dump register fetching. 2019-10-02 15:15:09 +00:00
skrll
c3fbc82630 Remove garbage. Maybe something is wrong with mknative or mrg's script? 2019-10-02 10:34:48 +00:00
mrg
41cead3c75 mknative-gcc for GCC 8.3 and all ports. 2019-10-02 07:14:31 +00:00
mrg
c79e82c597 make most of this compile:
- sanitizer_procmaps_netbsd.cc is obsolete.
- fix merge botches where upstrem has as slightly different version
  is upstream than prior local
- libstdc++ default is now gnu++17
- ubsan needs UBSAN_CAN_USE_CXXABI set
- properly use $G_RTL_BASE_H not (empty) $RTL_BASE_H
- libbackend HH gains new generated insn-modes-inline.h, and read-md.c
  gains the HH dep.
2019-10-02 06:51:59 +00:00
mrg
06250edab5 avoid multiple tm_file headers being listed and breaking builds. 2019-10-02 05:58:03 +00:00
mrg
415bf64101 don't undef SDB_DEBUGGING_INFO. obsolete (and triggers a warning.)
disable isInDeadlySignal() for now.
fix some compile errors in asan and lsan.
2019-10-02 05:04:58 +00:00
mrg
013d491e47 recycle README.gcc7 as README.gcc8 and give it a fresh clean 2019-10-02 04:23:58 +00:00
mrg
78e1884efe remove obsolete code and merge botch. 2019-10-02 03:46:21 +00:00
mrg
9c540241b2 remove obsolete gcc 4.9 or1k code. 2019-10-02 02:59:46 +00:00
mrg
e66a3c37e9 - use /usr/include/gcc-8
- update sanitizer makefiles

also, reduce diffs to upstream:
- remove or1k support
- re-order various lines to match upstream
- move regex map code into file-prefix-map.[ch]
2019-10-02 02:54:34 +00:00
mrg
200c7aa165 retire or1k gcc 4.9 code. 2019-10-02 02:50:38 +00:00
mrg
eb6947af76 merge GCC 8.3.
XXX: our change for e500 has moved into 'powerpcspe' port, which has
XXX: been marked deprecated in GCC 8.  this may affect what ppc ports
XXX: can update to GCC 8 easily, and we may need to add support for
XXX: 'powerpcspe' while we can.
2019-10-01 22:44:18 +00:00
mrg
78fc770276 regen for GCC 8.3 and our changes. 2019-10-01 22:41:59 +00:00
mrg
251c9c162b merge debug/file prefix/merge stuff with upstream, which has gained
a lot of the same features.  builds, but may not actually run right.
adjust for add_path()'s SYSTEM -> INC_SYSTEM.
2019-10-01 21:17:27 +00:00
mrg
ee69d28dd0 final GCC 8.3 sanitizer merge, untested. 2019-10-01 21:13:43 +00:00
christos
817e9a7e0a merge conflicts 2019-10-01 16:06:15 +00:00
christos
4c1a0b8852 Friday, September 20, 2019, by mcr@sandelman.ca
A huge thank you to Denis, Francois-Xavier and Guy who did much of the heavy lifting.
  Summary for 4.9.3 tcpdump release
    Fix buffer overflow/overread vulnerabilities:
      CVE-2017-16808 (AoE)
      CVE-2018-14468 (FrameRelay)
      CVE-2018-14469 (IKEv1)
      CVE-2018-14470 (BABEL)
      CVE-2018-14466 (AFS/RX)
      CVE-2018-14461 (LDP)
      CVE-2018-14462 (ICMP)
      CVE-2018-14465 (RSVP)
      CVE-2018-14881 (BGP)
      CVE-2018-14464 (LMP)
      CVE-2018-14463 (VRRP)
      CVE-2018-14467 (BGP)
      CVE-2018-10103 (SMB - partially fixed, but SMB printing disabled)
      CVE-2018-10105 (SMB - too unreliably reproduced, SMB printing disabled)
      CVE-2018-14880 (OSPF6)
      CVE-2018-16451 (SMB)
      CVE-2018-14882 (RPL)
      CVE-2018-16227 (802.11)
      CVE-2018-16229 (DCCP)
      CVE-2018-16301 (was fixed in libpcap)
      CVE-2018-16230 (BGP)
      CVE-2018-16452 (SMB)
      CVE-2018-16300 (BGP)
      CVE-2018-16228 (HNCP)
      CVE-2019-15166 (LMP)
      CVE-2019-15167 (VRRP)
    Fix for cmdline argument/local issues:
      CVE-2018-14879 (tcpdump -V)
2019-10-01 16:04:24 +00:00
christos
bb7460091b merge conflicts 2019-10-01 16:02:11 +00:00
christos
4a71e5f388 Sunday, July 22, 2018
Summary for 1.9.1 libpcap release
    Mention pcap_get_required_select_timeout() in the main pcap man page
    Fix pcap-usb-linux.c build on systems with musl
    Fix assorted man page and other documentation issues
    Plug assorted memory leaks
    Documentation changes to use https:
    Changes to how time stamp calculations are done
    Lots of tweaks to make newer compilers happier and warning-free and
        to fix instances of C undefined behavior
    Warn if AC_PROG_CC_C99 can't enable C99 support
    Rename pcap_set_protocol() to  pcap_set_protocol_linux().
    Align pcap_t private data on an 8-byte boundary.
    Fix various error messages
    Use 64-bit clean API in dag_findalldevs()
    Fix cleaning up after some errors
    Work around some ethtool ioctl bugs in newer Linux kernels (GitHub
        issue #689)
    Add backwards compatibility sections to some man pages (GitHub issue
        #745)
    Fix autotool configuration on AIX and macOS
    Don't export bpf_filter_with_aux_data() or struct bpf_aux_data;
        they're internal-only and subject to change
    Fix pcapng block size checking
    On macOS, don't build rpcapd or test programs any fatter than they
        need to be
    Fix reading of capture statistics for Linux USB
    Fix packet size values for Linux USB packets (GitHub issue #808)
    Check only VID in VLAN test in filterss (GitHub issue #461)
    Fix pcap_list_datalinks on 802.11 devices on macOS
    Fix overflows with very large snapshot length in pcap file
    Improve parsing of rpcapd configuration file (GitHub issue #767)
    Handle systems without strlcpy() or strlcat() better
    Fix crashes and other errors with invalid filter expressions
    Fix use of uninitialized file descriptor in remote capture
    Fix some CMake issues
    Fix some divide-by-zero issues with the filter compiler
    Work around a GNU libc bug in pcap_nametonetaddr()
    Add support for DLT_LINUX_SLL2
    Fix handling of the packet-count argument for Myricom SNF devices
    Fix --disable-rdma in configure script (GitHub issue #782)
    Fix compilation of TurboCap support (GitHub issue #764)
    Constify first argument to pcap_findalldevs_ex()
    Fix a number of issues when running rpcapd as an inetd-style daemon
    Fix CMake issues with D-Bus libraries
    In rpcapd, clean up termination of a capture session
    Redo remote capture protocol negotiation
    In rpcapd, report the same error for "invalid user name" and
        "invalid password", to make brute-forcing harder
    For remote captures, add an error code for "the server requires TLS"
    Fix pcap_dump_fopen() on Windows to avoid clashes between
        {Win,N}Pcap and application C runtimes
    Fix exporting of functions from Windows DLLs (GitHub issue #810)
    Fix building as part of Npcap
    Allow rpcapd to rebind more rapidly
    Fix building shared libpcap library on midipix (midipix.org)
    Fix hack to detect UTF-16LE adapter names on Windows not to go past
        the end of the string
    Fix handling of "wireless WAN" (mobile phone network modems) on
        Windows with WinPcap/Npcap (GitHub issue #824)
    Have pcap_dump_open_append() create the dump file if it doesn't
        exists (GitHub issue #247)
    Fix the maxmum snapshot length for DLT_USBPCAP
    Use -fPIC when building for 64-bit SPARC on Linux (GitHub issue #837)
    Fix CMake 64-bit library installation directory on some Linux
        distributions
    Boost the TPACKET_V3 timeout to the maximum if a timeout of 0 was
        specified
    Five CVE-2019-15161, CVE-2019-15162, CVE-2019-15163, CVE-2019-15164, CVE-2019-15165
    Fixes for CVE-2018-16301, errors in pcapng reading.
    PCAPNG reader applies some sanity checks before doing malloc().
2019-10-01 16:00:25 +00:00
mrg
c08ccaef18 merge GCC 8.3.0 pass 2. still will not compile yet. these
files are yet to merge:

C gcc/config/rs6000/rs6000.c
C libsanitizer/lsan/lsan_allocator.cc
C libsanitizer/sanitizer_common/sanitizer_internal_defs.h
2019-10-01 11:49:12 +00:00
mrg
3f8cba227b merge GCC 8.3.0 pass 1. will not compile yet. thare are still
about 25 files with merge issues.
2019-10-01 10:38:15 +00:00
mrg
14f5a3b000 import GCC 8.3. it includes these new features:
- many optimisations improved: inter-procedural, profile-directed,
  LTO, loops including user-controllable unroll support, and more.
- columns numbers added to line numbers in dwarf
- gcov extended significantly
- many sanitizer updates
- many new warning messages
- many better hints and more useful error messages
- minor ABI changes on x86-64 libstdc++, and some c++17 modes
- draft c++2a features
- better c++17 experimental support
- Armv8.4-A supported, better 8.2-A and 8.3-A support, including
  32 bit arm port.  cortex a-55, a-75 and a-55.a-75 combo support.
- in the GCC bugzilla, 8.1 shows 1149 bugs fixed, 8.2 shows 100, and
  8.3 shows 158.
2019-10-01 09:36:01 +00:00
mrg
90bf43e918 convert HAVE_GCC == 7 to HAVE_GCC >= 7. 2019-09-30 00:06:02 +00:00
mrg
21303c93e9 convert HAVE_GCC == 7 to HAVE_GCC >= 7. 2019-09-29 23:44:58 +00:00
christos
5c69aad9bb Validate register number before fetching/storing it (Gopikrishnan Sidhardhan) 2019-09-26 20:11:10 +00:00
mrg
36ac495d2b merge gcc 7.4 into gcc.old part 3 (last?) 2019-09-26 08:02:28 +00:00
mrg
1debfc3d3f merge gcc 7.4 into gcc.old part 2. 2019-09-26 05:55:33 +00:00
mrg
ac10021d3f merge gcc 7.4 into gcc.old. 2019-09-26 05:51:13 +00:00
mrg
3ad841b2f6 import GCC 7.4 as gcc.old 2019-09-26 05:45:16 +00:00
maya
146714e767 Adjust .PATH 2019-09-24 21:33:48 +00:00
kamil
2bb9aadb1b Add missing ; 2019-09-24 21:03:29 +00:00
kamil
6d130c780a Add a bunch of meta files from git and hg to ignore from CVS imports
This will allow interop of src/ with git and hg without malforming repos.
2019-09-24 21:01:50 +00:00
maya
8f9881e2e6 Update build logic for mesa 19.1.7.
A lot of files are now living outside of dist, since they're not in the
distributed sources: they're generated, usually by python/meson.

The remaining changes are due to files being moved around.
2019-09-24 19:29:41 +00:00
maya
f8483c1cb1 Unless we add --sysroot, the netbsd src tree headers won't be used.
Do so, so we don't rely on the build machine to have <endian.h> for
this macro check.

Using ${CPPFLAGS} rather than my own encoding of --sysroot, since it
already includes it.

Tested by agc, thanks.
2019-09-24 19:19:49 +00:00
maya
33a768ce2e Ignore our default core file pattern rather than one of another system.
"core" shows up as a path sometimes.
2019-09-24 17:23:06 +00:00
maya
ced12a6e27 Now that expat_config.h uses a header that is OS-specific, using the HOST_CC
breaks for some setups which lack it (netbsd<8, possibly other things).

Use the compiler targetting netbsd that uses netbsd headers to figure out
PACKAGE_VERSION to avoid this problem.
2019-09-23 17:20:41 +00:00
kamil
7c33168b4c Add LSan and UBSan specific preprocessor macros
__SANITIZE_LEAK__ patch:
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html

__SANITIZE_UNDEFINED__
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01286.html

GCC upstream does not see value in feature parity with LLVM sanitizers.
For the time being this will be a NetBSD specific extension.

__SANITIZE_LEAK__ is needed for __NO_LEAKS in <sys/cdefs.h>
__SANITIZE_UNDEFINED__ is planned to be reused in the kernel headers.
2019-09-22 23:34:13 +00:00