Commit 927053fa authored by mmoroz's avatar mmoroz Committed by Commit bot

[sqlite3] Limit max number of memory pages for fuzzing builds.

R=shess@chromium.org
BUG=675446

Review-Url: https://codereview.chromium.org/2609473004
Cr-Commit-Position: refs/heads/master@{#467984}
parent 824d3f76
...@@ -137,6 +137,16 @@ if (!use_system_sqlite) { ...@@ -137,6 +137,16 @@ if (!use_system_sqlite) {
"SQLITE_MAX_SQL_LENGTH=128000000", "SQLITE_MAX_SQL_LENGTH=128000000",
"SQLITE_PRINTF_PRECISION_LIMIT=1280000", "SQLITE_PRINTF_PRECISION_LIMIT=1280000",
] ]
# During fuzz testing, valid SQL queries generated by fuzzing engine may
# lead to large memory allocations. If that happens, fuzzer reports an
# out-of-memory error. However, such errors are not valid bugs.
# To avoid hitting those irrelevant OOMs, we limit max number of memory
# pages, so fuzzer will not crash when reaching the limit.
# Apply this for fuzzing builds only, not for all builds with sanitizers.
if (use_libfuzzer || use_afl) {
defines += [ "SQLITE_MAX_PAGE_COUNT=16384" ]
}
} }
include_dirs = [ "amalgamation" ] include_dirs = [ "amalgamation" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment