mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 08:47:56 +01:00
fuzz: shrink xz WORK_BUFFER_ARRAY_SIZE
This commit is contained in:
1 parent
569a91892e
commit
e8ec21976c
1 file changed
+7
-3
@@ -71,12 +71,16 @@ It should print "PASS", amongst other information, and exit(0).
|
|||||||
#include "../../../release/c/wuffs-unsupported-snapshot.c"
|
#include "../../../release/c/wuffs-unsupported-snapshot.c"
|
||||||
#include "../fuzzlib/fuzzlib.c"
|
#include "../fuzzlib/fuzzlib.c"
|
||||||
|
|
||||||
// 4 MiB.
|
// 64 KiB.
|
||||||
#define DST_BUFFER_ARRAY_SIZE 4194304
|
#define DST_BUFFER_ARRAY_SIZE 65536
|
||||||
|
|
||||||
// Wuffs allows either statically or dynamically allocated work buffers. This
|
// Wuffs allows either statically or dynamically allocated work buffers. This
|
||||||
// program exercises static allocation.
|
// program exercises static allocation.
|
||||||
#define WORK_BUFFER_ARRAY_SIZE WUFFS_XZ__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE
|
//
|
||||||
|
// We hard-code 64 MiB, as WUFFS_XZ__DECODER_WORKBUF_LEN_MAX_INCL_WORST_CASE
|
||||||
|
// can be over 4 GiB. Using it can cause "relocation truncated to fit:
|
||||||
|
// R_X86_64_PC32 against symbol etc" compiler errors.
|
||||||
|
#define WORK_BUFFER_ARRAY_SIZE 67108864
|
||||||
#if WORK_BUFFER_ARRAY_SIZE > 0
|
#if WORK_BUFFER_ARRAY_SIZE > 0
|
||||||
uint8_t g_work_buffer_array[WORK_BUFFER_ARRAY_SIZE];
|
uint8_t g_work_buffer_array[WORK_BUFFER_ARRAY_SIZE];
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in new issue
Block a user