millert
bf9b74c4ba
Remove unnecessary casts of 'a' to char * since 'a' is already char *.
This is a remnant from the original 4.4BSD code that had 'a' as
void * in the function args. No binary change. OK bluhm@
8 years ago
jmc
05dca7e1c5
the referred to EXAMPLES section is now in strncpy(3);
issue reported by scott cheloha
ok otto
8 years ago
otto
099c1cfdb8
MALLOC_STATS tweaks, by default not compiled in
8 years ago
otto
a197637f0f
small tweak to also check canaries if F is in effect
8 years ago
otto
8119a345a7
remove some old option letters and also make P non-settable. It has
been the default for ages, and I see no valid reason to be able to
disable it. ok natano@
8 years ago
otto
ae5357c652
Pages in the malloc cache are either reused quickly or unmapped
quickly. In both cases it does not make sense to set hints on them.
So remove that option, which is just a remainder of old times when
malloc used to hold on to pages. ok stefan@
8 years ago
tb
3968c88c54
$OpenBSD$
8 years ago
otto
992807bce2
- fix MALLOC_STATS compile
- redundant cast is redundant
8 years ago
otto
03ffdf003d
fix some void * arithmetic by casting
8 years ago
otto
1255da53a3
and recommit with fixed GC
8 years ago
otto
5d783ecc04
backout for now; flag combination GC is not ok
8 years ago
jmc
1a2414b3e4
avoid sentence splicing;
8 years ago
otto
e2ace002f9
canary corruption message changed a bit
8 years ago
otto
5656d7bf98
Also place canaries in > page sized objects (if C is in effect); ok tb@
8 years ago
bluhm
356150aae5
Remove the save_errno dance inside strerror_r(3). It is from the
time when we had national language support.
OK millert@
8 years ago
dtucker
741ef92d20
Roll back uintptr_t cast changes after discussions with tedu, otto and
others.
C11 6.5.6.9 says:
When two pointers are subtracted, both shall point to elements of the
same array object, or one past the last element of the array object; the
result is the difference of the subscripts of the two array elements.
In these cases the objects are arrays of char so the result is defined,
and we believe that the report is based on a compiler incorrectly trapping
on defined behaviour.
8 years ago
guenther
71af4d5f52
Wrap _malloc_init() so internal calls go directly
prodded by otto@
ok kettenis@ otto@
8 years ago
jmc
fa0722f382
zap trailing whitespace;
8 years ago
dtucker
db6e1f035d
Cast pointers to uintptr_t to avoid potential signedness errors.
Based on patch from yuanjie.huang at windriver.com via OpenSSH bz#2608,
with & ok millert, ok deraadt.
8 years ago
otto
c00ceb22a8
0xd0 -> 0xdb; ok deraadt@ millert@ tedu@
8 years ago
otto
8b706cc40e
optimize canary code a bit by storing offset of sizes table instead of
recomputing it all the time
8 years ago
reyk
0fd38ba8e4
Fixup the example for msgbuf_write() and imsg_read() to check the
error cases for -1 and 0 explicitly (it initially only checked for -1,
I updated it to also check for 0, and rzalamena@ figured out that 0
has to be checked in a differently).
OK millert@ rzalamena@
8 years ago
otto
1ae413d0f7
make clear the length printed is the requested length
8 years ago
jmc
ede9249779
grammar fix previous;
8 years ago
otto
41daf65553
document "chunk canary corrupted" error
8 years ago
otto
3eeb2e7bb1
stray tab
8 years ago
otto
2c67f40d2b
Beter implementation of chunk canaries: store size in chunk meta data
instead of chunk itself; does not change actual allocated size; ok tedu@
8 years ago
guenther
1a1f277cca
Delete casts to off_t and size_t that are implied by assignments
or prototypes. Ditto for some of the char* and void* casts too.
verified no change to instructions on ILP32 (i386) and LP64 (amd64)
ok natano@ abluhm@ deraadt@ millert@
8 years ago
otto
814803d97e
move page junking tp unmap(), right before we stick the region in the cache;
ok tedu@
8 years ago
jmc
ea651fa3ce
fix Dt;
8 years ago
nicm
51319d983d
Set errno more consistently, and fix a warning, ok tedu
8 years ago
tedu
acdfcc40f1
rm
8 years ago
tedu
80b2ef3b15
oops, name file after main function
8 years ago
tedu
3e338df556
it doesn't say anything yet, but start adding a man page
8 years ago
nicm
1e41004f15
Make the key sizes and offsets arrays const, ok tedu
8 years ago
tedu
0146b434d2
jmc says you can never have too many functions in one man page, so list
the SHA512/256 functions as well.
8 years ago
tedu
676996bb23
remove caveats that are either misleading or unhelpful.
ok jmc naddy
8 years ago
tedu
aeb17a716b
Add functions for SHA512/256. The standard says you're supposed to start
with different magic numbers, so we need to add some functions instead
of just asking the user to truncate as desired. Sigh.
SHA512 is quite a bit faster than SHA256 on 64 bit CPUs,
but 256 bit hashes are usually quite sufficient. Best of both.
ok deraadt tom
8 years ago
bcook
2fb1937540
add iOS support for getentropy
from Jacob Berkman, ok beck@
8 years ago
beck
87d4db25c4
Remove the libcrypto/crypto directory
8 years ago
otto
7f29e95497
Less lock contention by using more pools for mult-threaded programs.
tested by many (thanks!) ok tedu, guenther@
8 years ago
tedu
6c73827bf7
black magic for sparc page size can go
8 years ago
guenther
487debcae6
Use a constant format string and output the variable part with %s
ok krw@ millert@
8 years ago
guenther
98ac59d5a1
Use O_CLOEXEC when opening fds local to a function
ok jca@ krw@
8 years ago
guenther
4c8fdca0ed
Don't call lstat() before readlink() just to see if it's a symlink,
as readlink() will tell you that more cheaply.
ok millert@
8 years ago
guenther
b73a72cf6b
Pull in <stdio.h> for NULL
ok deraadt@
8 years ago
guenther
d798523e75
Pull in <time.h> for clock_gettime()
ok deraadt@
8 years ago
otto
8b9a47cd4e
wrterror() is fatal, delete dead code; ok tom@ natano@ tedu@
8 years ago
jmc
25a95fab09
add a bit of spacing to previous, to keep the notes about deprecated
functions out the way of the main body;
ok guenther
8 years ago
guenther
502002cd1a
Reduce qabs() and qdiv() to aliases of llabs() and lldiv().
Merge the manual pages and call them deprecated there.
ok and manpage tweak jmc@, ok natano@
8 years ago