diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-07-08 15:07:19 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-07-08 15:55:10 +0200 |
| commit | f5b4cca65c5bad8a1e55d9b3b06f1c55f6d69887 (patch) | |
| tree | b15feba00970f7dc0f1991378c96d5929649c1a4 /executor | |
| parent | 0219d4e7da1ac272cd25728d4ab2ef48fc953a07 (diff) | |
executor: prohibit malloc
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/executor.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/executor/executor.cc b/executor/executor.cc index 2ce50661d..f9dd22dda 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -49,6 +49,13 @@ typedef unsigned char uint8; // because some standard libraries contain "using ::exit;", but has different signature. #define exit vsnprintf +// Dynamic memory allocation reduces test reproducibility across different libc versions and kernels. +// malloc will cause unspecified number of additional mmap's at unspecified locations. +// For small objects prefer stack allocations, for larger -- either global objects (this may have +// issues with concurrency), or controlled mmaps, or make the fuzzer allocate memory. +#define malloc do_not_use_malloc +#define calloc do_not_use_calloc + // Note: zircon max fd is 256. // Some common_OS.h files know about this constant for RLIMIT_NOFILE. const int kMaxFd = 250; |
