mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
[bugpoint] Increase the default memory limit for subprocesses to 300MB.
Summary: Currently shared library builds (BUILD_SHARED_LIBS=ON in cmake) fail three bugpoint tests (BugPoint/remove_arguments_test.ll, BugPoint/crash-narrowfunctiontest.ll, and BugPoint/metadata.ll). If I run the bugpoint commands that llvm-lit runs with without -silence-passes I see errors such as this: opt: error while loading shared libraries: libLLVMSystemZInfo.so: failed to map segment from shared object: Cannot allocate memory It seems that the increased size of the binaries in a shared library build is causing the subprocess to exceed the 100MB memory limit. This patch therefore increases the default limit to a level at which these tests pass. Reviewers: dsanders Reviewed By: dsanders CC: llvm-commits, rafael Differential Revision: http://llvm-reviews.chandlerc.com/D2013 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193420 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
50c5b4680d
commit
69f4280b54
@ -50,7 +50,7 @@ TimeoutValue("timeout", cl::init(300), cl::value_desc("seconds"),
|
|||||||
static cl::opt<int>
|
static cl::opt<int>
|
||||||
MemoryLimit("mlimit", cl::init(-1), cl::value_desc("MBytes"),
|
MemoryLimit("mlimit", cl::init(-1), cl::value_desc("MBytes"),
|
||||||
cl::desc("Maximum amount of memory to use. 0 disables check."
|
cl::desc("Maximum amount of memory to use. 0 disables check."
|
||||||
" Defaults to 100MB (800MB under valgrind)."));
|
" Defaults to 300MB (800MB under valgrind)."));
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
UseValgrind("enable-valgrind",
|
UseValgrind("enable-valgrind",
|
||||||
@ -152,7 +152,7 @@ int main(int argc, char **argv) {
|
|||||||
if (sys::RunningOnValgrind() || UseValgrind)
|
if (sys::RunningOnValgrind() || UseValgrind)
|
||||||
MemoryLimit = 800;
|
MemoryLimit = 800;
|
||||||
else
|
else
|
||||||
MemoryLimit = 100;
|
MemoryLimit = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
BugDriver D(argv[0], FindBugs, TimeoutValue, MemoryLimit,
|
BugDriver D(argv[0], FindBugs, TimeoutValue, MemoryLimit,
|
||||||
|
Loading…
Reference in New Issue
Block a user