[LLVMbugs] [Bug 2892] New: crash on redefinition of builtin

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Oct 13 23:11:01 PDT 2008


           Summary: crash on redefinition of builtin
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu

clang asserts on the following input:
void __builtin_object_size();

int a[10];

int f0() {
  return __builtin_object_size(&a); // expected-error {{too few arguments to
this is because although we emit an error on the redefinition of the builtin,
we continue parsing. However, the builtin code which hand checks builtin object
size expects the number of arguments to have already been checked.

Its not clear what the right fix is. Its easy to fix in the builtin code,
however, it is also nice to rely on builtins always obeying certain invariants.
Perhaps we should disallow redefinition of builtins?

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