diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-07-22 12:28:13 +0200 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-07-22 16:21:10 +0200 |
commit | 6279f164d3f4ca9b74852a38037288fff4af8cfd (patch) | |
tree | e5a5ecd8107dc0c986b7d4689b38cfa3f06dcaff /driver | |
parent | 186cc54245686d3d57ebe7db6256edb3d5debd5e (diff) | |
download | jazzer-api-6279f164d3f4ca9b74852a38037288fff4af8cfd.tar.gz |
Lower default -Xmx setting
The -Xmx setting does not account for the following additional heap
usage that is included in the RSS limit maintained by libFuzzer:
- Metaspace, which contains Java class metadata and is on the order of
25 MB for the Jazzer examples.
- Jazzer coverage counters
By lowering the default -Xmx setting, we make it less likely that
a target crashes with a libFuzzer OOM.
Diffstat (limited to 'driver')
-rw-r--r-- | driver/jvm_tooling.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/jvm_tooling.cpp b/driver/jvm_tooling.cpp index a0ccb6ac..7cd84faf 100644 --- a/driver/jvm_tooling.cpp +++ b/driver/jvm_tooling.cpp @@ -197,7 +197,7 @@ JVM::JVM(const std::string &executable_path) { JavaVMOption{.optionString = const_cast<char *>(class_path.c_str())}); // Set the maximum heap size to a value that is slightly smaller than // libFuzzer's default rss_limit_mb. This prevents erroneous oom reports. - options.push_back(JavaVMOption{.optionString = (char *)"-Xmx2040m"}); + options.push_back(JavaVMOption{.optionString = (char *)"-Xmx1800m"}); options.push_back(JavaVMOption{.optionString = (char *)"-enableassertions"}); // Preserve and emit stack trace information even on hot paths. // This may hurt performance, but also helps find flaky bugs. |