Commit Graph

288507 Commits

Author SHA1 Message Date
rillig c8d33d92f3 lint: fix endless loop on unfinished comment at EOF
Found using afl.
2021-06-19 20:25:57 +00:00
rillig 921647eafa lint: fix assertion after malformed for loop
Found using afl.
2021-06-19 19:59:01 +00:00
rillig 8873496543 lint: fix assertion failure in struct with unnamed member
Found using afl.
2021-06-19 19:49:15 +00:00
thorpej f0deae8ee4 Don't use a bunch of switch() statements in the core logic drivers to select
the PCI interrupt initialization routine.  Instead, register said routines
by systype in a link set, and look them up and invoke them in a new function
alpha_pci_intr_init().
2021-06-19 16:59:07 +00:00
thorpej d36ffd4ac0 No need to include pci_kn8ae.h here. 2021-06-19 16:43:11 +00:00
thorpej c8f4d10dca No need to include pci_kn300.h here. 2021-06-19 16:36:35 +00:00
thorpej ad2ab7a1ac Remove the "first" argument from pci_kn8ae_pickintr(), instead using
a real once control in that function. Removes a needless divergence from
other "pickintr" routines.
2021-06-19 16:29:03 +00:00
thorpej 2f97fd3282 Remove the "first" argument from pci_kn300_pickintr(). It's redundant with
information we already have, and is a needless divergence from other
"pickintr" routines.
2021-06-19 16:13:40 +00:00
rillig e4ad66c589 lint: fix assertion failure after malformed statement
Found using afl.
2021-06-19 16:05:07 +00:00
rillig 0c0b119a5d lint: fix crash in malformed initialization 2021-06-19 15:51:11 +00:00
rillig 1150940a6c lint: replace undefined behavior with assertion failure
Triggered by this malformed code:

	struct{int;
2021-06-19 15:23:57 +00:00
rillig 03b53d4d6d lint: fix assertion failure after syntax error in declaration
The code to trigger this case is:

	(s)(int(int););

This only happens with BSD yacc, but not with Bison since they differ in
error handling.
2021-06-19 14:28:04 +00:00
rillig ce2c9e15e8 lint: in debug mode, print name of the "storage class"
This helps in tracking down the internal errors related to declarations,
found by running afl.
2021-06-19 14:08:45 +00:00
christos e2325e1f91 Add external attribute dumping and restoring support from FreeBSD.
Does not fully work yet, attributes are being saved and restored correctly,
but don't appear in the restored files somehow.
2021-06-19 13:56:34 +00:00
jmcneill 61337cea22 Do not try to initialize PMU if ID_AA64DFR0_EL1 reports a non-standard
PMU implementation.
2021-06-19 13:40:00 +00:00
jmcneill 7121c61d8a CNTV_CTL_EL0 is a 64-bit register 2021-06-19 13:38:21 +00:00
rillig 8906844d84 lint: fix internal error for unfinished declaration
A translation unit that contains just 'void x' without the trailing
semicolon had crashed lint1 before:

assertion "dcs->d_ctx == AUTO" failed in declare at decl.c:2049

Found using afl.
2021-06-19 11:01:23 +00:00
rillig 148d425b99 lint: fix endless loop when scanning string or character literals
If the code contains an unfinished string or character literal at the
EOF, the lexer got into an endless loop.  Curiously, inpc() returned 0
in such a case instead of the common EOF.

Found by making lint1 with CC=afl-gcc and then running:

afl-fuzz \
    -m 200 \
    -i in_dir \
    -o lint1 \
    $src/usr.bin/xlint/lint1/lint1 @@ /dev/null
2021-06-19 08:57:24 +00:00
rillig 6054740bd7 lint: revert fix for endless loop in lexer for string literals
String literals may contain null bytes, and these must be passed further
on.

This reintroduces the endless loop in the lexer, but that must be fixed
in another way that doesn't destroy the error handling.
2021-06-19 08:37:18 +00:00
rillig 3ce615eb20 tests/lint: add test cases for lexical analysis 2021-06-19 08:30:08 +00:00
mrg 5be704ed29 switch m68000, m68k and 32 bit arm to GCC 10. just sh3 left!
special thanks to rin for fixing arm32.
2021-06-19 06:19:35 +00:00
mlelstv 60e0dfc569 Relax identification of interfaces and endpoints. Now also attaches
headsets like Jabra Evolve 75.
2021-06-19 05:50:48 +00:00
tsutsui 56bb4f15d0 The modules and rescue sets are also required on upgrade.
Should be pulled up to netbsd-9 and netbsd-8.
2021-06-19 00:54:27 +00:00
tsutsui e3c0c034ba Remove netstat(1) calls to print resolver info on upgrade using miniroot.
netstat(1) was removed from miniroot 25 years ago.
 http://cvsweb.netbsd.org/bsdweb.cgi/src/distrib/miniroot/list#rev1.5
2021-06-19 00:00:26 +00:00
tsutsui 17794e1c77 Replace RELEASE and VERSION strings proplery.
sun2 and sun3 don't use MI src/distrib/miniroot/list so this should
have been sync'ed with it.
http://cvsweb.netbsd.org/bsdweb.cgi/src/distrib/miniroot/list#rev1.36
>> Use proper release version strings ("9.1" rather than "91") in banners.
>>
>> Also define and use "MACHINE" variable to describe port names
>> (no uname(1) or sysctl(8) in miniroot binary list by default).

Should be pulled up to netbsd-9.
2021-06-18 23:55:20 +00:00
macallan 8f6fb76507 do ii2 locking dance in psoc_dump() 2021-06-18 23:00:47 +00:00
macallan be8eeb4c2e use opt_psoc.h, suppress some debug output in !PSOC_DEBUG 2021-06-18 22:57:18 +00:00
macallan 5178a7ba18 use opt_lmu.h
while there, remove an obsolete comment
2021-06-18 22:52:04 +00:00
macallan af2416e37d defflag LMU_DEBUG and PSOC_DEBUG 2021-06-18 22:24:51 +00:00
thorpej 4506b2d539 Wrap a couple of long lines. 2021-06-18 22:18:10 +00:00
thorpej 5bcb872839 Sprinkle some static. 2021-06-18 22:17:53 +00:00
mrg b85d94cb40 don't install the libuv.pc file for pic (but private) libs as well.
avoids triggering a makefs warning when building a file system out
of the DESTDIR directly, using the METALOG files etc:

makefs: Can't open `././libuv.pc' for reading: No such file or directory

(the file was installed, and the obsoleted.)
2021-06-18 22:12:02 +00:00
riastradh eace48406f EEE: embrace, extend, extinguish; or eastern equine encephalitis 2021-06-18 21:58:20 +00:00
mrg f253073ae0 make this build with GCC 10.
change makefs flags from:
   density=2048
to:
   density=3072,bsize=4096,fsize=512,optimization=space

so that everything fits again.  add some comment GCC flags
that may help reduce size a little more.
2021-06-18 20:30:58 +00:00
rillig 914e17dbfb lint: fix hang on unfinished string literal at end-of-file
The input file that triggered this bug was:

	a"b"c"d

Found using afl.
2021-06-18 20:29:00 +00:00
christos 806070a644 fix sun2 build 2021-06-18 13:57:52 +00:00
nia 21eaac5cba June 19 is Juneteenth in USA 2021-06-18 13:13:44 +00:00
rillig 33a45172e8 make: clean up access to character iterator
Having both p[0] and *p intermixed was inconsistent.

No functional change.
2021-06-18 12:54:17 +00:00
christos 747b089bcb PR/56260: Alex Richardson: Out-of-bounds stack read in lib/libc/gen/vis.c
Also sync with other FreeBSD changes.
2021-06-18 10:57:14 +00:00
mrg 2c8db19d81 remove obsolete files. 2021-06-18 06:34:00 +00:00
rillig c221219687 tests/make: add test for circular dependency in .ORDER 2021-06-17 15:25:33 +00:00
christos 309a1eb039 replace our merged version with upstream. 2021-06-17 12:53:43 +00:00
riastradh 8c3b7b40bb tests/net/if_wg: Only expect this to fail once!
Not sure how that happened, weird artefact of applying fuzzy patch
twice or something.
2021-06-17 12:45:58 +00:00
christos e8238f606f use the linker script provided by the package 2021-06-17 12:38:53 +00:00
riastradh 8166eec586 tests/net/if_wg: Mark as flaky (PR kern/56252). 2021-06-17 12:16:09 +00:00
nia 8d791e8417 U.S.S.R no longer exists 2021-06-17 11:48:19 +00:00
nia b0051e6da9 November 20 is International Transgender Day of Remembrance
Officially recongized in Ontario, Canada. Originates from the murder
of Rita Hester in Allston, Massachusetts, on November 28, 1998.
2021-06-17 11:45:22 +00:00
nia 6dc2f20fe2 1985: first ARM silicon and first Amiga 2021-06-17 11:32:34 +00:00
rin 6144bd9496 Unbreak build; new libfido2 requires OpenBSD-compatible freezero(). 2021-06-17 06:20:56 +00:00
msaitoh ed657d33bd Use unsigned to avoid undefined behavior. Found by kUBSan. 2021-06-17 02:05:47 +00:00