davidmalcolm / gcc-python-plugin

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

NotImplementedError from checker (Don't know how to cope with exprcode: <type 'gcc.RealCst'>) #63

Closed davidmalcolm closed 7 years ago

davidmalcolm commented 7 years ago

I saw this NotImplementedError when running the checker on gdb. {{{ ../../archer/gdb/python/py-value.c: In function ‘valpy_float’: ../../archer/gdb/python/py-value.c:1098:10: error: Unhandled Python exception raised calling 'execute' method Traceback (most recent call last): File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/init.py", line 64, in execute self._check_refcounts(fun) File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/init.py", line 68, in _check_refcounts self.show_possible_null_derefs) File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/refcounts.py", line 2838, in check_refcounts limits=limits) File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2716, in iter_traces depth + 1): File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2716, in iter_traces depth + 1): File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2716, in iter_traces depth + 1): File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2680, in iter_traces transitions = curstate.get_transitions() File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 1828, in get_transitions return self._get_transitions_for_stmt(stmt) File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 1855, in _get_transitions_for_stmt return self._get_transitions_for_GimpleAssign(stmt) File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2308, in _get_transitions_for_GimpleAssign value = self.eval_rhs(stmt) File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2300, in eval_rhs % (stmt.exprcode, stmt.exprcode, stmt.loc)) NotImplementedError: Don't know how to cope with exprcode: <type 'gcc.RealCst'> (<type 'gcc.RealCst'>) at ../../archer/gdb/python/py-value.c:1098 }}}

davidmalcolm commented 7 years ago

Imported from trac issue 23. Created by tromey on 2012-01-05T09:21:41, last modified: 2012-01-05T18:30:09

davidmalcolm commented 7 years ago

Trac comment by dmalcolm on 2012-01-05 18:30:09:

Fixed in e953afafe6f13f8e2c07265073024f793b7a5083