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

            Bug ID: 44497
           Summary: Verifier allows pointer to void but is caught by
                    IRReader
           Product: libraries
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Bitcode Reader
          Assignee: unassignedb...@nondot.org
          Reporter: vaivaswa...@gmail.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 23002
  --> https://bugs.llvm.org/attachment.cgi?id=23002&action=edit
Toy program to produce and verify a simple function foo

The LLVM library allows generation of a function "i32 foo (void*)" that has a
"void*" argument, and the IR is successfully verified by the verifier. But the
IR parser (correctly) flags it as an error.

This bug should be in the IR category (but that doesn't exist), so I'm filing
it under IRReader

I've attached a toy program that produces and successfully (but incorrectly)
verifies a function with "void*" argument. It can be compiled as

"g++ -g llvm_void_ptr.cpp `llvm-config --cxxflags --ldflags --system-libs
--libs core` -std=c++14".

Upon running the produced executable, it produces, verifies and prints "foo"
(the function that takes a "void*" as argument. This emitted IR is however not
parsable by "opt". The verifier should check against this and flag an error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to