[LLVMbugs] [Bug 11644] New: clang should throw std::bad_array_new_length when the allocation size for new overflows

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 22 16:01:02 PST 2011


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

             Bug #: 11644
           Summary: clang should throw std::bad_array_new_length when the
                    allocation size for new overflows
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


C++11 has a new exception type: std::bad_array_new_length.  And per the
standard, "If the value of that expression is less than zero or such that the
size of the allocated object would exceed the implementation-defined limit, no
storage is obtained and the new-expression terminates by throwing an exception
of a type that would match a handler (15.3) of type std::bad_array_new_length".
 Our current behavior is likely good enough in most cases, but it isn't
strictly compliant.

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