[LLVMbugs] [Bug 17054] New: ObjectSizeOffsetVisitor::visitArgument failes to return vaild result

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 1 21:28:43 PDT 2013


            Bug ID: 17054
           Summary: ObjectSizeOffsetVisitor::visitArgument failes to
                    return vaild result
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: manjian2006 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When I used latest chunk  to compile chromium project,it generated a deadLoop
when compiling file_util::ReadFromFD.I tried to debug,and find this bug was
caused by ObjectSizeOffsetVisitor::visitArgument.It originally looked like
SizeOffsetType ObjectSizeOffsetVisitor::visitArgument(Argument &A) {
  // no interprocedural analysis is done at the moment
  if (!A.hasByValAttr()) {
    return unknown();
  PointerType *PT = cast<PointerType>(A.getType());
  APInt Size(IntTyBits, TD->getTypeAllocSize(PT->getElementType()));
  return std::make_pair(align(Size, A.getParamAlignment()), Zero);
And I commented out
//   if (!A.hasByValAttr()) {
//     ++ObjectVisitorArgument;
//     return unknown();
//   }
Then the code was generated correctly.
The attachment is the code that causes trouble.

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/20130902/5b77ec6a/attachment.html>

More information about the llvm-bugs mailing list