[LLVMbugs] [Bug 12259] New: clang should limit the length of an operator-> sequence

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 12 17:54:04 PDT 2012


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

             Bug #: 12259
           Summary: clang should limit the length of an operator->
                    sequence
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rjmccall at apple.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Clang will happily infinite-loop on malevolent code like the following:

template <class T> struct A { A<T*> operator->() const; };
void test(A a) { a->foo; }

The standard doesn't impose a minimum maximum for the length of this delegation
sequence, but I think it'd be reasonable to limit it to something like 1024
operators.

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