mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Reduce memory needed by ASAN morgue
This commit is contained in:
parent
d5a37de435
commit
ed485391da
5 changed files with 34 additions and 10 deletions
|
@ -594,7 +594,10 @@ static void __asan_deallocate(char *p, long kind) {
|
|||
WRITE64BE(p + c - 8, kind);
|
||||
__asan_poison((uintptr_t)p, c - 8, kind);
|
||||
if (weaken(dlfree)) {
|
||||
weaken(dlfree)(__asan_morgue_add(p));
|
||||
if (c <= FRAMESIZE) {
|
||||
p = __asan_morgue_add(p);
|
||||
}
|
||||
weaken(dlfree)(p);
|
||||
}
|
||||
} else {
|
||||
__asan_report_heap_fault(p, n);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* @param mode may be _IOFBF, _IOLBF, or _IONBF
|
||||
* @param buf may optionally be non-NULL to set the stream's underlying
|
||||
* buffer, which the stream will own, but won't free, otherwise the
|
||||
* buffer which the caller still owns and won't free, otherwise the
|
||||
* existing buffer is used
|
||||
* @param size is ignored if buf is NULL
|
||||
* @return 0 on success or -1 on error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue