[LLVMbugs] [Bug 10372] clang++ crashed when analyzing a function with returntype int, when it contains a return __null statement

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 15 13:29:33 PDT 2011


Jordy Rose <jediknil at belkadan.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |jediknil at belkadan.com
         Resolution|                            |FIXED

--- Comment #1 from Jordy Rose <jediknil at belkadan.com> 2011-07-15 15:29:32 CDT ---
The analyzer is treating __null as a pointer, but it's actually implemented as
a pointer-sized integer.

int main(int argc, char *argv[]) (CompoundStmt 0x1060439d8
</Users/jordy/Desktop/clang_bug/main.cpp:2:1, line:4:1>
  (ReturnStmt 0x1060439b8 <line:3:2, col:9>
    (ImplicitCastExpr 0x1060439a0 <col:9> 'int' <IntegralCast>
      (GNUNullExpr 0x106043988 <col:9> 'long'))))

I can't find a GNU spec for __null, so I'm going with our own docs and behavior
and changing ExprEngine to use a pointer-sized NonLoc. Should be fixed in

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