davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
199 stars 58 forks source link

TypeError in _get_new_value_for_vararg #92

Open davidmalcolm opened 7 years ago

davidmalcolm commented 7 years ago

After updating my clone of gcc-python-plugin with the fix for #51, I have a new error.

This is running on the same code as in #51: https://github.com/mongodb/mongo-python-driver/ at git hash 80b8cfef.

{{{/home/vagrant/gcc-python-plugin/gcc-with-cpychecker -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ibson -I/usr/include/python2.7 -c pymongo/_cmessagemodule.c -o build/temp.linux-x86_64-2.7/pymongo/_cmessagemodule.o pymongo/_cmessagemodule.c: In function ‘_cbson_get_more_message’: pymongo/_cmessagemodule.c:464:26: error: Unhandled Python exception raised calling 'execute' method Traceback (most recent call last): File "/home/vagrant/gcc-python-plugin/libcpychecker/init.py", line 79, in execute self._check_refcounts(fun) File "/home/vagrant/gcc-python-plugin/libcpychecker/init.py", line 85, in _check_refcounts dump_json=self.dump_json) File "/home/vagrant/gcc-python-plugin/libcpychecker/refcounts.py", line 4361, in check_refcounts maxtrans) File "/home/vagrant/gcc-python-plugin/libcpychecker/refcounts.py", line 4216, in impl_check_refcounts limits=limits) File "/home/vagrant/gcc-python-plugin/libcpychecker/absinterp.py", line 3076, in iter_traces depth + 1): File "/home/vagrant/gcc-python-plugin/libcpychecker/absinterp.py", line 3076, in iter_traces depth + 1): File "/home/vagrant/gcc-python-plugin/libcpychecker/absinterp.py", line 3076, in iter_traces depth + 1): File "/home/vagrant/gcc-python-plugin/libcpychecker/absinterp.py", line 3076, in iter_traces depth + 1): File "/home/vagrant/gcc-python-plugin/libcpychecker/absinterp.py", line 3040, in iter_traces transitions = curstate.get_transitions() File "/home/vagrant/gcc-python-plugin/libcpychecker/absinterp.py", line 2092, in get_transitions return self._get_transitions_for_stmt(stmt) File "/home/vagrant/gcc-python-plugin/libcpychecker/absinterp.py", line 2108, in _get_transitions_for_stmt return self._get_transitions_for_GimpleCall(stmt) File "/home/vagrant/gcc-python-plugin/libcpychecker/absinterp.py", line 2279, in _get_transitions_for_GimpleCall return meth(stmt, *args) File "/home/vagrant/gcc-python-plugin/libcpychecker/refcounts.py", line 1139, in impl_PyArg_ParseTuple v_fmt, v_varargs, with_size_t=False) File "/home/vagrant/gcc-python-plugin/libcpychecker/refcounts.py", line 1103, in _handle_PyArg_function _handle_successful_parse(fmt) File "/home/vagrant/gcc-python-plugin/libcpychecker/refcounts.py", line 1094, in _handle_successful_parse v_new = _get_new_value_for_vararg(unit, exptype) File "/home/vagrant/gcc-python-plugin/libcpychecker/refcounts.py", line 1083, in _get_new_value_for_vararg check_isinstance(exptype, gcc.PointerType) File "/home/vagrant/gcc-python-plugin/gccutils/init.py", line 637, in check_isinstance raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) TypeError: (gcc.PointerType(dereference=gcc.IntegerType(name=gcc.TypeDecl('char'))), gcc.PointerType(dereference=gcc.IntegerType(name=gcc.TypeDecl('char'))), <libcpychecker.formatstrings.NullPointer instance at 0x33c90e0>) / (gcc.PointerType(dereference=gcc.IntegerType(name=gcc.TypeDecl('char'))), gcc.PointerType(dereference=gcc.IntegerType(name=gcc.TypeDecl('char'))), <libcpychecker.formatstrings.NullPointer instance at 0x33c90e0>) is not an instance of <type 'gcc.PointerType'>}}}

I'll attach full log.

davidmalcolm commented 7 years ago

Imported from trac issue 52. Created by emptysquare on 2013-06-25T14:44:23, last modified: 2013-06-25T14:44:23