Age | Commit message (Collapse) | Author |
|
|
|
ok guenther tb millert
|
|
So redo previous commit properly:
Use random value for canary bytes; ok tb@.
|
|
|
|
shaving off into the cache but unamp them. Pages in the cache get
re-used and then a future grow of the first allocation will be
hampered. Also make realloc a no-op for small shrinkage.
ok deraadt@
|
|
The bug, present since 4.4BSD, was that a trailing dash in an option
group, when the dash is not permitted as an option letter, resulted
in the whole option group being returned as an argument, even though
the previous option in the group was already parsed as an option:
OPTS=abc ./getopt-test -a- -c arg ===>> OPT(a)ARG(-a-)ARG(-c)ARG(arg).
Instead, treat the dash as an invalid option and continue parsing
options: ===>> OPT(a)ERR(?-)OPT(c)ARG(arg).
The undesirable behaviour was that allowing the dash as an option
letter only allowed isolated dashes ("-") and trailing dashes in
groups ("-a-"), but neither middle dashes in groups ("-a-b"), even
though that already partially worked in 4.4BSD, nor leading dashes
in groups ("--a"), even though that works on all other BSDs and on
glibc. Also, while POSIX does not require that the dash can be
used as an option letter at all, arguably, it encourages that letters
either be fully supported or not supported at all. It is dubious
whether supporting an option letter in some positions but not in
others can be considered conforming.
This patch makes OpenBSD behaviour identical to FreeBSD and NetBSD,
improves compatibility with glibc (except that glibc does not support
isolated "-"), improves compatibility with DragonFly (except that
DragonFly is buggy when the dash option letter can take an optional
argument but that argument is not present), improves compatibility
with Illumos and Solaris 11 (except those do not support "-" and
mishandle "--a"), and restores 4.4BSD behaviour for "-a-b". In no
respect i'm aware of is compatibility with any other systems reduced.
For the full rationale, see my mail to tech@
on 30 Mar 2020 14:26:41 +0200.
Part of the problem was originally reported by an anonymous coward
on tech@ on 12 Mar 2020 03:40:24 +0200, additional analysis was
contributed by martijn@, and then the OP sent the final version of
the patch i'm now committing on 17 Mar 2020 19:17:56 +0200.
No licensing problem here because after the commit, the file does
not contain a single word written by the OP. Also, the OP told me
in private mail that he intends to publish the patch under the ISC
license already contained in the file and that he wishes to be known
by the pseudonym "0xef967c36".
OK martijn@, and no objection when shown on tech@,
but commit delayed to stay clear of the release.
|
|
queue -> list; mention "intrusive"; element -> member at one place;
delete a bogus remark that maybe referred to a long-gone
implementation in VAX assembly code.
Much more could be improved, but i don't want to waste too much time here.
|
|
ok schwarze
kill a Tn while here...
|
|
OK schwarze@
|
|
Starting from "Combined Table of Contents" in Doug McIlroy's
"A Research UNIX Reader" a table of which edition manuals appeared in.
Checked against manuals from bitsavers/TUHS and source from TUHS where
available.
Ingo points out there are cases where something is included but not
documented until a later release.
bcd(6) v6 v7
printf(3) v2 v4
abort(3) v5 v6
system(3) v6 v7
fmod(3) v5 v6
ok schwarze@
|
|
at the first non-option argument.
I had to read source code to figure it out.
|
|
From j@bitminer.ca with input from Andras Farkas, deraadt, joerg@netbsd
"fix however you feel best!" jmc
|
|
behavior.
noticed by hshoexer@; OK beck@
|
|
Prompted by guenther@
|
|
ok guenther jmc
|
|
requiring it (sftp-server).
Remove the /exists///// behaviour from here. The /nonexistant
behaviour remains in the kernel and needs to be shot next.
There may be ports fallout, but we doubt it.
ok beck djm
|
|
|
|
have a different calling convention than the standard function...as seen
in kdump output.
ok deraadt@ schwarze@
|
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
on error, so checking for -1 only is potentially non-portable.
Also mention that the C89 standard does not require errno to be set.
OK deraadt@ millert@
|
|
code. We now user the simple userland wrapper on top of __realpath(2).
The non-POSIX behaviour still remains, that is the next component to fix.
From a diff by beck, but I managed to chainsaw it a bit further. Tested
in snaps for a couple of days.
ok beck
|
|
|
|
it is a thin wrapper over the syscall __readlink(2). Improve the list
of possible errors.
ok millert beck jmc
|
|
_csu_finish() to _libc_preinit(), which is an .init_array function
in shared libc (and mark it INITFIRST) or a .preinit_array function
in static libc, grabbing the _dl_cb callback there from ld.so. Then
in _csu_finish(), invoke the dl_clean_boot() callback to free ld.so's
startup bits before main() gets control.
Other cleanups this permits:
- move various startup structures into .data.rel.ro
- the dl* stubs in libc can be strong and call the callbacks provided
via _dl_cb
- no longer need to conditionalize dlctl() calls on presence of _DYNAMIC
original concept and full diff ok kettenis@
ok deraadt@
|
|
checks userland-parsing vs kernel parsing, we are hoping to spot another
bug..
|
|
calling it until those are fixed.
|
|
For now, this also still uses the existing realpath implmentation
and emits a syslog if we see differening results. Once we have run
with that for a little while we will remove the old code
ok deraadt@
|
|
Fixes malloc_conceal...freezero with malloc options C and/or G.
|
|
triggered by a question from Jan Stary <hans at stare dot cz> on misc@;
OK otto@
|
|
|
|
|
|
counterparts but return memory in pages marked MAP_CONCEAL and on
free() freezero() is actually called.
|
|
patch from Peter Piwowarski <peterjpiwowarski at gmail dot com>
|
|
|
|
|
|
|
|
|
|
the wrong idiom. ok tedu@ but probably needs some tweakin
|
|
clearly stating which arguments have to be avoided, and mention the
header files defining the constants required for the checks.
Feedback and OK guenther@, OK bluhm@.
|
|
CAVEATS pointing to the new CAVEATS section in setlocale(3).
Make those in wprintf(3) and wscanf(3) more concise
since duplicate information is a bad idea.
Incompleteness of information originally pointed out by millert@.
OK millert@
|
|
by me and others indicate that it is the optimum.
|
|
making the number of pools variable. Do not document the malloc
conf settings atm, don't know yet if they will stay. Thanks to all
the testers. ok deraadt@
|
|
tested by many; ok florian@
|
|
|
|
patch from Hiltjo Posthuma <hiltjo at codemadness dot org>
|
|
|
|
now that there is essentially no malloc.conf;
text tweaked by deraadt; ok otto deraadt
|
|
libs have it, it is a function that is considered harmful, so:
Delete malloc_usable_size(). It is a function that blurs the line
between malloc managed memory and application managed memory and
exposes some of the internal workings of malloc. If an application
relies on that, it is likely to break using another implementation
of malloc. If you want usable size x, just allocate x bytes. ok
deraadt@ and other devs
|
|
PROTO_NORMAL(). Problem noted by deraadt@
|
|
|