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

            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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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()) {
    ++ObjectVisitorArgument;
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to