Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite recursion #163

Open
dvarrazzo opened this issue Jan 2, 2019 · 0 comments
Open

Infinite recursion #163

dvarrazzo opened this issue Jan 2, 2019 · 0 comments

Comments

@dvarrazzo
Copy link
Contributor

Analysing the function:

RAISES_NEG static int
_psyco_curs_prefetch(cursorObject *self)
{
    int i = 0;

    if (self->pgres == NULL) {
        Dprintf("_psyco_curs_prefetch: trying to fetch data");
        do {
            i = pq_fetch(self, 0);
            Dprintf("_psycopg_curs_prefetch: result = %d", i);
        } while(i == 1);
    }

    Dprintf("_psyco_curs_prefetch: result = %d", i);
    return i;
}

the following traceback is returned:

psycopg/cursor_type.c: In function ‘_psyco_curs_prefetch’:
psycopg/cursor_type.c:665:12: error: Unhandled Python exception raised calling 'execute' method
     return i;
            ^
Traceback (most recent call last):
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/__init__.py", line 95, in execute
    self._check_refcounts(fun)
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/__init__.py", line 101, in _check_refcounts
    dump_json=self.dump_json)
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/refcounts.py", line 4414, in check_refcounts
    maxtrans)
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/refcounts.py", line 4267, in impl_check_refcounts
    limits=limits)
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 3047, in iter_traces
    depth + 1):
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 3047, in iter_traces
    depth + 1):
[...]
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 3047, in iter_traces
    depth + 1):
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 3011, in iter_traces
    transitions = curstate.get_transitions()
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 2049, in get_transitions
    return self._get_transitions_for_stmt(stmt)
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt
    return self._get_transitions_for_GimpleAssign(stmt)
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 2605, in _get_transitions_for_GimpleAssign
    None)]
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 1925, in mktrans_assignment
    new = self.use_next_stmt_node()
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 1949, in use_next_stmt_node
    return self.update_stmt_node(new_stmt_node)
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 1931, in update_stmt_node
    new = self.copy()
  File "/home/piro/dev/fs/gcc-python-plugin/libcpychecker/absinterp.py", line 1416, in copy
    self.region_for_var.copy(),
  File "/usr/lib/python2.7/collections.py", line 206, in copy
    return self.__class__(self)
  File "/usr/lib/python2.7/collections.py", line 69, in __init__
    self.__update(*args, **kwds)
  File "/usr/lib/python2.7/_abcoll.py", line 564, in update
    if isinstance(other, Mapping):
  File "/usr/lib/python2.7/abc.py", line 132, in __instancecheck__
    if subclass is not None and subclass in cls._abc_cache:
  File "/usr/lib/python2.7/_weakrefset.py", line 75, in __contains__
    return wr in self.data
RuntimeError: maximum recursion depth exceeded in cmp
@dvarrazzo dvarrazzo changed the title Infinite recursion in Infinite recursion Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant