OverflowError: Python int too large to convert to C long

Bug #1951409 reported by Tom Cook
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Meliae doesn't play nicely with PyGObject. As well as #1883514, it is trivial to produce a "Python int too large to convert to C long". Code to reproduce the problem:

=== Begin Dockerfile ===
FROM python:3.9-bullseye

RUN apt update
RUN apt install -y libgirepository1.0-dev
RUN pip install meliae PyGObject

COPY test.py /
ENTRYPOINT ["/usr/local/bin/python3", "/test.py"]
=== End Dockerfile ===

=== Begin test.py ===
from gi.repository import GObject
import meliae.scanner

x = GObject.Object()
with open('tst', 'wb') as f:
=== End test.py ===

$ docker built . -t gobject-test
$ docker run gobject-test
OverflowError: Python int too large to convert to C long

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/test.py", line 6, in <module>
  File "/usr/local/lib/python3.6/site-packages/meliae/scanner.py", line 141, in dump_all_objects
    dump_all_referenced(outf, all_objs, is_pending=True)
  File "/usr/local/lib/python3.6/site-packages/meliae/scanner.py", line 71, in dump_all_referenced
    _scanner.dump_object_info(outf, next, recurse_depth=0)
SystemError: <built-in function dump_object_info> returned a result with an error set

I've confirmed this on Python 3.6 and 3.10.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.