[LLVMbugs] [Bug 12243] New: Segfault on invalid debug info

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Mar 11 15:42:22 PDT 2012


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

             Bug #: 12243
           Summary: Segfault on invalid debug info
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: hammacher at cs.uni-saarland.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8186
  --> http://llvm.org/bugs/attachment.cgi?id=8186
test case triggering the segfault (2 lines)

I triggered this bug when automatically reducing the metadata for bug 8185
testcase.
When trying to read an unsigned constant value from a MDNode that has "null" on
the respective position, llc crashes.
All other methods around use dyn_cast_or_null to case the MDNode operand to the
Constant value, but the "getUInt64Field" method just uses dyn_cast.

Attached is a test case for the segfault, and a patch replacing the dyn_cast by
dyn_cast_or_null.

-- 
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