Fatal RPython error: ParseStringOverflowError

Issue #2176 resolved
Will Gardner created an issue

Doing some data processing I get a Fatal RPython error when attempting to call:

def num(s):
    """
    Simple function for converting a string to an int or float.
    :param s: str
    :return int|float|None
    """
    try:
        return int(s)
    except (TypeError, ValueError):
        try:
            return float(s)
        except (TypeError, ValueError):
            return None

with the string '18446744073625060068' (Specifically it occurs at return int(s)). This seems to occur after the JIT kicks in and doesn't occur when it's been run elsewhere (Although the remote location it's been run on is running a very old version of PyPy).

Exact error output is:

RPython traceback:
  ...
Fatal RPython error: ParseStringOverflowError

I encounter this issue every time I process this particular dataset on my laptop.

Comments (7)

  1. Maciej Fijalkowski

    Hi

    This looks like a serious error, I can't seem to be able to reproduce it easily, can you tell me how to run this function properly? (running it in a loop with the provided number, with or without constantness of the string does not seem to crash it)

  2. Will Gardner reporter

    Hi Maciej,

    Unfortunately I cannot disclose the full code, I will try to come up with a way to reliably reproduce it without the full code.

  3. Log in to comment