[llvm-bugs] [Bug 46183] New: Reading block address array from LLVM assembly file changes the target block

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 3 06:00:46 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46183

            Bug ID: 46183
           Summary: Reading block address array from LLVM assembly file
                    changes the target block
           Product: new-bugs
           Version: 10.0
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: timothy.werquin at guardsquare.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 23569
  --> https://bugs.llvm.org/attachment.cgi?id=23569&action=edit
The LLVM assembly file that reproduces the issue

I have an LLVM assembly file which will be read incorrectly by LLVM.
The array of block addresses `bbAdresses` contains several targets in the main
function. But when read by llvm-as and then disassembled by llvm-dis, all
elements of the array will point to the unnamed basic block.

So just doing `llvm-as -o - broken.ll | llvm-dis -o -` will output the
incorrect array.
When compiling the file using `clang` it will produce an infinite loop as the
targets of all indirect branches have been changed to the same basic block.

I tested using both the brew clang-8 toolchain and the default Apple clang
version 11.0.0

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200603/91afd531/attachment-0001.html>


More information about the llvm-bugs mailing list