<div dir="ltr"><div><div><div></div>I managed to address the problem. It turns out that there is a flag -mlimit controlling the memory consumption of bugpoint. The default value is 400MB, and I set it to 0. Then the sanitizers run smoothly. <br><br></div>Now I am running delta and bugpoint together to minimize the bitcode. From what I see so far, the combination is not bad. <br><br></div>A remaining problem is the comments in the bitcode files (strings starting with ';'). It will be good if I can remove them too. <br><br><br><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 19, 2016 at 12:19 AM, Chengnian Sun <span dir="ltr"><<a href="mailto:chengniansun@gmail.com" target="_blank">chengniansun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>I have found a bitcode test program that triggers a miscompilation bug in an LLVM pass. However, when I use bugpoint to reduce the program, I encounter several problems. It would be great if someone can give me some advice.</div><div><br></div><div>(1) Ensure the validity of the reduced test program. </div><div><br></div><div>Is it necessary to add some checks in the interestingness script to ensure the validity of the reduced programs? </div><div><br></div><div>I tried to use various sanitizers to achieve this (asan, ubsan, msan). However, I always get the following error </div><div><br></div><div><div>    ==9070==ERROR: AddressSanitizer failed to allocate 0xdfff0001000 (15392894357504) bytes at address 2008fff7000 (errno: 12)</div><div>    ==9070==ReserveShadowMemoryRange failed while trying to map 0xdfff0001000 bytes. Perhaps you're using ulimit -v</div></div><div><br></div><div>If I directly run these scripts, then the sanitizers can run smoothly.</div><div><br></div><div><br></div><div>(2) The minimality of the reduced test program.</div><div><br></div><div>Is the reduced test program by bugpoint minimal? I managed to reduce several programs (without using the sanitizers), however, the sizes are usually still big. I saw the test programs reduced by LLVM developers attached in bug reports, and they were usually very small, ~10 lines. Do you also use Delta to further minimize the test programs? </div><div><br></div><div>Thank you. </div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Chengnian. </div><div><br></div><div><br></div><div><br></div><div><br>
</div></font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Best Regards.<br><br>Chengnian SUN.</div>
</div>