[LLVMbugs] [Bug 15831] New: Python bindings don't report errors in get_size

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 23 09:02:07 PDT 2013


            Bug ID: 15831
           Summary: Python bindings don't report errors in get_size
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: magnus.reftel at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

In plain libclang, the clang_Type_getSizeOf function returns either a size or a
negative enum value taken from CXTypeLayoutError. The Python wrapper, get_size,
simply casts the value to an unsigned 64-bit integer. This means that if
get_size is called for a variable whose size isn't known (e.g. a
variable-length array), then a very large number (0xffffffffffffffc, in the
case of a VLA) is returned instead of an error.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130423/3b67525a/attachment.html>

More information about the llvm-bugs mailing list