[llvm-dev] Advice on Reducing LLVM Bitcode Programs

Chengnian Sun via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 19 00:19:36 PDT 2016


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

(1) Ensure the validity of the reduced test program.

Is it necessary to add some checks in the interestingness script to ensure
the validity of the reduced programs?

I tried to use various sanitizers to achieve this (asan, ubsan, msan).
However, I always get the following error

    ==9070==ERROR: AddressSanitizer failed to allocate 0xdfff0001000
(15392894357504) bytes at address 2008fff7000 (errno: 12)
    ==9070==ReserveShadowMemoryRange failed while trying to map
0xdfff0001000 bytes. Perhaps you're using ulimit -v

If I directly run these scripts, then the sanitizers can run smoothly.

(2) The minimality of the reduced test program.

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?

Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160419/ef1208d7/attachment.html>

More information about the llvm-dev mailing list