https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66310

--- Comment #23 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Ok I see it.

In fbuf.c (fbuf_alloc):

      /* Round up to nearest multiple of the current buffer length.  */
      newlen = ((u->fbuf->pos + len) / u->fbuf->len + 1) *u->fbuf->len;
      u->fbuf->buf = xrealloc (u->fbuf->buf, newlen);
      u->fbuf->len = newlen;

We are rounding up to make sure we have enough buffer. The size newlen is
calculated to 2147484160 which exceeds the limit of 2147483647 and xrealloc
fails.

Reply via email to