Lgtm<span></span><br><br>On Thursday, October 24, 2013, Daniel Sanders  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi jyasskin,<br>
<br>
Currently shared library builds (BUILD_SHARED_LIBS=ON in cmake) fail three<br>
bugpoint tests (BugPoint/remove_arguments_test.ll,<br>
BugPoint/crash-narrowfunctiontest.ll, and BugPoint/metadata.ll).<br>
<br>
If I run the bugpoint commands that llvm-lit runs with without -silence-passes<br>
I see errors such as this:<br>
    opt: error while loading shared libraries: libLLVMSystemZInfo.so: failed to<br>
    map segment from shared object: Cannot allocate memory<br>
<br>
It seems that the increased size of the binaries in a shared library build is<br>
causing the subprocess to exceed the 100MB memory limit. This patch therefore<br>
increases the default limit to a level at which these tests pass.<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D2013" target="_blank">http://llvm-reviews.chandlerc.com/D2013</a><br>
<br>
Files:<br>
  tools/bugpoint/bugpoint.cpp<br>
<br>
Index: tools/bugpoint/bugpoint.cpp<br>
===================================================================<br>
--- tools/bugpoint/bugpoint.cpp<br>
+++ tools/bugpoint/bugpoint.cpp<br>
@@ -49,8 +49,8 @@<br>
<br>
 static cl::opt<int><br>
 MemoryLimit("mlimit", cl::init(-1), cl::value_desc("MBytes"),<br>
-             cl::desc("Maximum amount of memory to use. 0 disables check."<br>
-                      " Defaults to 100MB (800MB under valgrind)."));<br>
+            cl::desc("Maximum amount of memory to use. 0 disables check."<br>
+                     " Defaults to 300MB (800MB under valgrind)."));<br>
<br>
 static cl::opt<bool><br>
 UseValgrind("enable-valgrind",<br>
@@ -152,7 +152,7 @@<br>
     if (sys::RunningOnValgrind() || UseValgrind)<br>
       MemoryLimit = 800;<br>
     else<br>
-      MemoryLimit = 100;<br>
+      MemoryLimit = 300;<br>
   }<br>
<br>
   BugDriver D(argv[0], FindBugs, TimeoutValue, MemoryLimit,<br>
</blockquote>