| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
malloc options"
Now only enabled for platforms where it's know to work and written
as a inline functions instead of a macro.
|
|
|
|
| |
__builtin_return_address(a) with a != 0.
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On free, chunks (the pieces of a pages used for smaller allocations)
are junked and then validated after they leave the delayed free
list. So after free, a chunk always contains junk bytes. This means
that if we start with the right contents for a new page of chunks,
we can *validate* instead of *write* junk bytes when (re)-using a
chunk.
With this, we can detect write-after-free when a chunk is recycled,
not justy when a chunk is in the delayed free list. We do a little
bit more work on initial allocation of a page of chunks and when
re-using (as we validate now even on junk level 1).
Also: some extra consistency checks for recallocaray(3) and fixes
in error messages to make them more consistent, with man page bits.
Plus regress additions.
|
|
|
|
| |
(sorry, otto, for not spotting in the updated diff)
|
|
|
|
|
| |
except for bootblocks. This way we have built-in leak detecction
always (if enable by malloc flags). See man pages for details.
|
|
|
|
| |
Should catch more of them and closer (in time) to the WAF. ok tb@
|
|
|
|
|
|
|
| |
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|
|
|
|
| |
of pages anymore, but also cache larger regions; ok tb@
|
|
|
|
|
|
|
|
|
|
| |
write 8 bytes at the time by using a uint64_t pointer. For an
allocation a max of 4 such uint64_t's are written spread over the
allocation. For pages sized and larger, the first page is junked in
such a way.
- Delayed free of a small chunk checks the corresponiding way.
- Pages ending up in the cache are validated upon unmapping or re-use.
In snaps for a while
|
|
|
|
| |
Prompted by guenther@
|
|
|
|
|
| |
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 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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
From "fenderq" on freenode via tj@
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
no longer has access to the content of a memmory object. It does
this by either clearing (if the object memory remains cached) or
by calling munmap(2). ok millert@, deraadt@, guenther@
|
|
|
|
| |
ok deraadt@
|
| |
|
|
|
|
| |
ok jmc@ deraadt@
|
|
|
|
| |
never occur
|
| |
|
|
|
|
|
| |
make the behaviour -> use case connection.
help from jmc and jsing
|
|
|
|
| |
help and ok from tom@ and deraadt@
|
|
|
|
|
| |
with the added feature that released memory is cleared. Much input from various
developers. ok deraadt@ tom@
|
|
|
|
|
| |
a page. This is not required by any standard and other malloc
implementation do not document (or implement) this. ok deraadt@
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
void return types 'return no value'. This is obvious and therefore
unneccessary to mention.
We spare rewind(3)'s sentence because espie@ pointed out that it's a
warning - the function masks a potential error.
This commit also adds a sentence to X509_free clarifying that it's
NULL-safe. This bit was discussed with doug@.
ok martijn@, sentiment supported by schwarze@
|
|
|
|
|
|
| |
There is long-standing consensus that err(1, NULL) is the best idiom
after failure of malloc(3) and friends.
Quirk in the manual noticed by tb@.
|
|
|
|
|
|
|
|
| |
The 'A' option elevated warnings to errors, and has been the default for some
time. Then warnings were effectively eliminated in favor of everything
being an error, but then the 'a' flag turned real errors into warnings!
Remove the 'a' option entirely. You shouldn't have used it anyway.
ok tb tdeval
|
| |
|
|
|
|
|
| |
for overflow. stop talking about old broken systems, there's little use
for such info.
|
| |
|
| |
|