[LLVMbugs] [Bug 15078] New: LLVM parser crashes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jan 26 16:41:03 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15078

             Bug #: 15078
           Summary: LLVM parser crashes
           Product: tools
           Version: 3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-as
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: marcin.osowski at students.mimuw.edu.pl
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9928
  --> http://llvm.org/bugs/attachment.cgi?id=9928
File that causes parser crashes.

LLVM parser crashes on this input:

@vtable = internal constant [1 x i8*] [i8* @main]

define i32 @main() {
entryBlock:
  ret i32 0
}


It's a very short file, has just 6 lines, but crashes lli, llvm-as, opt, and
probably everything else, since it happens in parser module. The line with
@vtable causes problem.




Stacktrace:
$ llvm-as cls.ll
0  libLLVM-3.0.so  0x000000353b8149bf
1  libLLVM-3.0.so  0x000000353b814e26
2  libpthread.so.0 0x0000003928e0efe0
3  libLLVM-3.0.so  0x000000353be9e82d
llvm::LLParser::ParseFunctionHeader(llvm::Function*&, bool) + 2317
4  libLLVM-3.0.so  0x000000353beacaa6 llvm::LLParser::ParseDefine() + 38
5  libLLVM-3.0.so  0x000000353bead068 llvm::LLParser::ParseTopLevelEntities() +
600
6  libLLVM-3.0.so  0x000000353bead1b8 llvm::LLParser::Run() + 24
7  libLLVM-3.0.so  0x000000353beb3613 llvm::ParseAssembly(llvm::MemoryBuffer*,
llvm::Module*, llvm::SMDiagnostic&, llvm::LLVMContext&) + 1747
8  libLLVM-3.0.so  0x000000353beb3e9b llvm::ParseAssemblyFile(std::string
const&, llvm::SMDiagnostic&, llvm::LLVMContext&) + 523
9  llvm-as         0x00000000004019dd
10 libc.so.6       0x0000003928621735 __libc_start_main + 245
11 llvm-as         0x000000000040251d
Stack dump:
0.    Program arguments: llvm-as cls.ll 
Segmentation fault (core dumped)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list