Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid Clearing Tables Even When Changing CParams #1780

Merged
merged 21 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
17b6da2
Track Usable Table Space in Compression Workspace
felixhandte Sep 3, 2019
14c5471
Introduce `ZSTD_indexResetPolicy_e` Enum
felixhandte Sep 10, 2019
0492b9a
Accept `ZSTD_indexResetPolicy_e` Param in `ZSTD_reset_matchState()`
felixhandte Sep 10, 2019
5b10bb5
Rename `ZSTD_compResetPolicy_e` Values and Add Comment
felixhandte Sep 10, 2019
ad16eda
`ZSTD_reset_matchState` Optionally Doesn't Restart Indexing
felixhandte Sep 10, 2019
1b28e80
Remove Fast Continue Path in `ZSTD_resetCCtx_internal()`
felixhandte Sep 10, 2019
9968a53
Remove No-Longer-Used Continuation Functions
felixhandte Sep 10, 2019
f31ef28
Only Reset Indexing in `ZSTD_resetCCtx_internal()` When Necessary
felixhandte Sep 10, 2019
edb3ad0
Comments
felixhandte Sep 10, 2019
13e29a5
Shrink Clean Table Area When Copying Table Contents into Context
felixhandte Sep 11, 2019
1999b2e
Update DEBUGLOG Statements
felixhandte Sep 11, 2019
bc020ee
Also Shrink Clean Table Area When Reducing Indices
felixhandte Sep 11, 2019
7c57e2b
Zero `h3size` When `h3log` is 0
felixhandte Sep 11, 2019
ed4c2c6
Add Fuzzer Test Case for Index Reduction
felixhandte Sep 11, 2019
5707c8a
Speed Up Test a Little
felixhandte Sep 11, 2019
ff67c62
Fix Compilation Error (`uint32_t` -> `size_t`)
felixhandte Sep 11, 2019
194c542
Fix Memory Leak in Test
felixhandte Sep 11, 2019
a10c191
`__msan_poison()` Workspace When Preparing for Re-Use
felixhandte Sep 11, 2019
51d9066
Add Assertions to Confirm that Workspace Pointers are Correctly Ordered
felixhandte Sep 11, 2019
20c6907
Shrink Table Valid End During Alloc Alignment / Phase Change
felixhandte Sep 11, 2019
72ea79c
Don't Include `sanitizer/msan_interface.h`, Since Not All Platforms P…
felixhandte Sep 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions lib/common/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,39 @@ extern "C" {
#define MEM_STATIC_ASSERT(c) { enum { MEM_static_assert = 1/(int)(!!(c)) }; }
MEM_STATIC void MEM_check(void) { MEM_STATIC_ASSERT((sizeof(size_t)==4) || (sizeof(size_t)==8)); }

/* detects whether we are being compiled under msan */
#if defined (__has_feature)
# if __has_feature(memory_sanitizer)
# define MEMORY_SANITIZER 1
# endif
#endif

#if defined (MEMORY_SANITIZER)
/* Not all platforms that support msan provide sanitizers/msan_interface.h.
* We therefore declare the functions we need ourselves, rather than trying to
* include the header file... */

#include <stdint.h> /* intptr_t */

/* Make memory region fully initialized (without changing its contents). */
void __msan_unpoison(const volatile void *a, size_t size);

/* Make memory region fully uninitialized (without changing its contents).
This is a legacy interface that does not update origin information. Use
__msan_allocated_memory() instead. */
void __msan_poison(const volatile void *a, size_t size);

/* Returns the offset of the first (at least partially) poisoned byte in the
memory range, or -1 if the whole range is good. */
intptr_t __msan_test_shadow(const volatile void *x, size_t size);
#endif

#if defined (MEMORY_SANITIZER)
# define MEM_SKIP_MSAN __attribute__((no_sanitize("memory")))
#else
# define MEM_SKIP_MSAN
#endif


/*-**************************************************************
* Basic Types
Expand Down
Loading