Commit Graph

287164 Commits

Author SHA1 Message Date
rillig 6aa88d9625 lint: add test for newly added message about static array size 2021-04-14 18:27:11 +00:00
rillig b40d5c12d2 make: let the compiler decide whether to inline string functions
On x86_64, this reduces the binary size by 2 kB.
2021-04-14 17:39:11 +00:00
rillig 56af7cb8e9 make: turn run-time string concatenation into compile-time
No functional change.
2021-04-14 17:24:48 +00:00
rillig d6aef06ed9 make: remove unnecessary modifier ':U' for certain fixed expressions
No functional change, since the expression is evaluated using
VARE_WANTRES, not using VARE_UNDEFERR.
2021-04-14 17:20:48 +00:00
rillig 278b3755f7 make: reduce memory allocations in the modifiers ':D' and ':U' 2021-04-14 16:59:34 +00:00
mlelstv 0e3291df0d Add DIOCGDISKINFO compat. 2021-04-14 16:26:23 +00:00
rillig e7ab8fe199 make: rename members of ModifyWord_LoopArgs
No functional change.
2021-04-14 16:12:26 +00:00
rillig be9afdd585 make: clean up pattern flags for the modifiers ':S' and ':C'
No special handling is necessary for C90 since none of the struct
members is a const_member.

The prefix 'Var' is not necessary since this type does not apply to a
variable but only to a modifier.

No functional change.
2021-04-14 15:41:08 +00:00
christos c5e4c84a3f support parsing c99's static class for array size expressions. 2021-04-14 13:34:08 +00:00
christos bed36db058 lto-common.c needs the stack protector treatment 2021-04-14 12:20:59 +00:00
mrg 384b30b1ad more -fcommon. 2021-04-14 09:29:40 +00:00
mrg 8b5e691ee5 build lfs_node.c with -O3 on ia64 to avoid assembler overflow issues. 2021-04-14 08:31:24 +00:00
mrg 403c2981b5 for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.
2021-04-14 08:07:49 +00:00
nia b936cc7999 OpenSSL man pages have moved 2021-04-14 07:56:23 +00:00
nia de6863b74f intro.3: add a few 2021-04-14 07:52:53 +00:00
dholland 5cb406aa2a Add a ddb disassembler for riscv.
builds, but not really tested yet.
2021-04-14 06:32:20 +00:00
ryo fdfe41cfc9 Fix the problem "pcictl pci0 list" causes "panic: trap_el1h_error" on rockpro64.
The panic occures in bus_space_barrier() in rk3399_pcie.c:rkpcie_conf_read().
We expected bus_space_peek_4() to trap and recover in the path
trap_el1h_sync() -> data_abort_handler(), but In fact, the read is delayed
until bus_space_barrier(), and we get an SError interrupt (trap_el1h_error)
instead of a Synchronous Exception (trap_el1h_sync).

To catch this correctly, An implicit barrier in bus_space_peek have been added,
and trap the SError interrupt to recover from.
2021-04-14 05:43:09 +00:00
christos 7ddbe09f70 regen 2021-04-14 02:45:58 +00:00
christos f2d4a2706f use the first element of the array instead 2021-04-14 02:45:40 +00:00
mrg a16a1d25de dtrace systrace.c issue fixed by christos (thanks!)
mips issue is related to memset.c miscompiling and does not
appear with -ffreestanding (thanks joerg & simonb.)
2021-04-14 01:19:13 +00:00
christos 51ba1c5af8 regen 2021-04-13 23:57:23 +00:00
christos b643daa87d regen 2021-04-13 22:46:13 +00:00
christos 9f090a2c68 Elide [NUM] in arguments for systrace, use the first address of the array
and cast to intptr_t instead.
2021-04-13 22:45:32 +00:00
mrg b62893b8db note amd64 dtrace issue is only warning for now.
note that i386 has problems in -current.
2021-04-13 22:24:56 +00:00
christos 828129de16 Pass -isystem and -imacro ccp flags to lint 2021-04-13 22:23:42 +00:00
christos 72044c4d9b Allow type attributes after function pointer parameters 2021-04-13 22:22:02 +00:00
christos f7e8f455fd add a test for a type attribute after a param function pointer 2021-04-13 22:21:19 +00:00
mrg d4aea844cb apply -Wno-error=array-bounds for GCC 10.
these trigger "pointer to end of array" issues, and i'm not
entirely sure what is happening in the code generated for the
two "INDIR" system calls from syscalls.master.
2021-04-13 19:16:51 +00:00
tsutsui 32d08392cf Make LCD BrightnessUp/BrightnessDown work on C7x0/860.
Patch from steleto:
 https://gist.github.com/steleto/10f62a074bff0c188fcc10c14ef40b5a
and also confirmed by me on SL-C700.

Worth to pullup to netbsd-9.
2021-04-13 13:18:50 +00:00
christos 0cf983201b - fix memory leak
- xxx questionable allocation
- remove casts
- use sizeof(*var)
- bcopy -> memcpy/memmove
2021-04-13 13:13:03 +00:00
mrg e43c684a44 with dtrace enabled, there is at least one remaining issue for amd64. 2021-04-13 10:10:25 +00:00
mrg 28c64a7060 ignore a "should be impossible" uninitialised variable error. 2021-04-13 09:28:42 +00:00
mrg 33786a4719 XXX: ignore warning about overlapping buffers for sprintf(). 2021-04-13 09:20:55 +00:00
mrg 3a792618ec sparc and amd64 successfully finished their atf runs. 2021-04-13 08:57:39 +00:00
mrg 3cc337c4a3 more -fcommon for sources not ready yet 2021-04-13 08:55:06 +00:00
mrg 968c7bf770 update the status of GCC. summary: mostly looking good.
- all targets build or can be attempted
- arm64 needs __aarch64_swp1_acq in both libgcc and libkern
- earmv4 works, earmv7hf works, all arm32 builds, rest untested
- hppa, most/all m68k, alpha, and most ppc builds, none tested
- ia64 kernel runs as well as before, userland fails to build
- i386 runs, seems mostly fine except lib/libc/sys/t_ptrace_wait
  resume test is hung, and cpu-spinning in a zombie
- sun2 grew again, too large but builds besides RAMDISK not fitting
- mips seems problematic.  some kernels fail some work, userland
  has problems with both static and dynamic n32 and n64 programs
- sh3el seems ok in gxemul/landisk, sh3eb not tested
- vax seems OK in simh (same c++ exception issues)

all ports kernels have been tested to build (though perhaps with
some uncommited changes only needed for some, while most changes
are commited, about 15 are not but many ports build without them.)
2021-04-13 08:22:40 +00:00
mrg 4caf7d9e65 avoid duplicating symbols in libterminfo. 2021-04-13 08:06:38 +00:00
mrg ade90e4afe make this match the builtin prototypes. 2021-04-13 08:06:11 +00:00
mrg 0972d30524 apply -fcommon here as well. 2021-04-13 07:53:59 +00:00
mrg bf1baa2579 some platforms trip -fcommon here too. we should fix this. 2021-04-13 07:53:19 +00:00
mrg 1effc6f09c more -O0 for vax 2021-04-13 06:30:36 +00:00
mrg 97b36aa771 more GCC 10 fixes.
mDNSResponder: another wrong return local address

dhcp: ignore a seemingly impossible stringop overflow

hpacel: avoid maybe uninitialised error that is wrong.

rsh: avoid impossible malloc(0)

udf: cast pointers through (uintptr_t) to fool invalid boundary checks
2021-04-13 06:25:48 +00:00
mrg 6274000239 avoid potential uninitialised variable use. 2021-04-13 05:58:45 +00:00
mrg cb095f8494 GCC 10 does not like casting from one identical anonymous enum
to another enum.  supply some quietening cast.
2021-04-13 05:28:16 +00:00
yamaguchi c37c0ccd03 Reschedule softint to process packets enqueued to ppoediscinq
while doing pppoe_data_input

And added a empty check for ppoeinq, for safety
2021-04-13 05:04:54 +00:00
yamaguchi 17130f8c6e Added missing counter clear when a pppoe state changes to PADI_SENT 2021-04-13 05:00:06 +00:00
mrg f5c1005436 apply some -Wno- to ignore several new warnings with GCC 10.
ntp: ignore truncation beyond api sizes, and ignore wrongly
guessed underflow

tmux: ignore maybe uninitialised warning for impossible case

libbfd: signed/unsigned variables assigned in the same statement

dri/gallium: -Wno-builtin-declaration-mismatch for u_atomic.c as
it implements backend functions with different in-C-machine but
same-in-real-machine types

libXfont/libXfont2: signed/unsigned variables assigned in the same
statement

i915drm: ignore impossible maybe uninitialised warnings

sysinst: ignore an invalid string truncation issue
2021-04-13 04:58:59 +00:00
yamaguchi da3e5318c2 Added a NULL check for parent interface of pppoe 2021-04-13 04:57:15 +00:00
yamaguchi d0bd5f49aa Hold the lock for pppoe while referencing sc_id
that is an item of struct pppoe_softc
2021-04-13 04:53:22 +00:00
mrg 0559215e96 use -fcommon here. 2021-04-13 04:52:00 +00:00