Merge pull request #10736 from yuwata/coredump-comment
fuzz: fix oss-fuzz#8658
This commit is contained in:
commit
8a26dae88f
|
@ -11,9 +11,14 @@
|
||||||
#include "time-util.h"
|
#include "time-util.h"
|
||||||
|
|
||||||
/* Make sure not to make this smaller than the maximum coredump size.
|
/* Make sure not to make this smaller than the maximum coredump size.
|
||||||
* See COREDUMP_MAX in coredump.c */
|
* See JOURNAL_SIZE_MAX in coredump.c */
|
||||||
|
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||||
#define ENTRY_SIZE_MAX (1024*1024*770u)
|
#define ENTRY_SIZE_MAX (1024*1024*770u)
|
||||||
#define DATA_SIZE_MAX (1024*1024*768u)
|
#define DATA_SIZE_MAX (1024*1024*768u)
|
||||||
|
#else
|
||||||
|
#define ENTRY_SIZE_MAX (1024*1024*13u)
|
||||||
|
#define DATA_SIZE_MAX (1024*1024*11u)
|
||||||
|
#endif
|
||||||
#define LINE_CHUNK 8*1024u
|
#define LINE_CHUNK 8*1024u
|
||||||
|
|
||||||
struct iovec_wrapper {
|
struct iovec_wrapper {
|
||||||
|
|
|
@ -55,10 +55,15 @@
|
||||||
#define EXTERNAL_SIZE_MAX PROCESS_SIZE_MAX
|
#define EXTERNAL_SIZE_MAX PROCESS_SIZE_MAX
|
||||||
|
|
||||||
/* The maximum size up to which we store the coredump in the journal */
|
/* The maximum size up to which we store the coredump in the journal */
|
||||||
|
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||||
#define JOURNAL_SIZE_MAX ((size_t) (767LU*1024LU*1024LU))
|
#define JOURNAL_SIZE_MAX ((size_t) (767LU*1024LU*1024LU))
|
||||||
|
#else
|
||||||
|
/* oss-fuzz limits memory usage. */
|
||||||
|
#define JOURNAL_SIZE_MAX ((size_t) (10LU*1024LU*1024LU))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Make sure to not make this larger than the maximum journal entry
|
/* Make sure to not make this larger than the maximum journal entry
|
||||||
* size. See DATA_SIZE_MAX in journald-native.c. */
|
* size. See DATA_SIZE_MAX in journal-importer.h. */
|
||||||
assert_cc(JOURNAL_SIZE_MAX <= DATA_SIZE_MAX);
|
assert_cc(JOURNAL_SIZE_MAX <= DATA_SIZE_MAX);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue