Don't Try to Redzone the Tables
This commit is contained in:
parent
0cc481ef66
commit
a07037b784
@ -289,11 +289,6 @@ MEM_STATIC void* ZSTD_cwksp_reserve_table(ZSTD_cwksp* ws, size_t bytes) {
|
|||||||
void* end = (BYTE *)alloc + bytes;
|
void* end = (BYTE *)alloc + bytes;
|
||||||
void* top = ws->allocStart;
|
void* top = ws->allocStart;
|
||||||
|
|
||||||
#if defined (ADDRESS_SANITIZER) && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE)
|
|
||||||
/* over-reserve space */
|
|
||||||
end = (BYTE *)end + 2 * ZSTD_CWKSP_ASAN_REDZONE_SIZE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DEBUGLOG(5, "cwksp: reserving %p table %zd bytes, %zd bytes remaining",
|
DEBUGLOG(5, "cwksp: reserving %p table %zd bytes, %zd bytes remaining",
|
||||||
alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes);
|
alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes);
|
||||||
assert((bytes & (sizeof(U32)-1)) == 0);
|
assert((bytes & (sizeof(U32)-1)) == 0);
|
||||||
@ -308,9 +303,6 @@ MEM_STATIC void* ZSTD_cwksp_reserve_table(ZSTD_cwksp* ws, size_t bytes) {
|
|||||||
ws->tableEnd = end;
|
ws->tableEnd = end;
|
||||||
|
|
||||||
#if defined (ADDRESS_SANITIZER) && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE)
|
#if defined (ADDRESS_SANITIZER) && !defined (ZSTD_ASAN_DONT_POISON_WORKSPACE)
|
||||||
/* Move alloc so there's ZSTD_CWKSP_ASAN_REDZONE_SIZE unused space on
|
|
||||||
* either size. */
|
|
||||||
alloc = (BYTE *)alloc + ZSTD_CWKSP_ASAN_REDZONE_SIZE;
|
|
||||||
__asan_unpoison_memory_region(alloc, bytes);
|
__asan_unpoison_memory_region(alloc, bytes);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user