Re: Why the asprintf patch is still breaking the buildfarm

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Florian Weimer <fweimer(at)redhat(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Manlio Perillo <manlio(dot)perillo(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why the asprintf patch is still breaking the buildfarm
Date: 2013-10-23 12:53:34
Message-ID: 25198.1382532814@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Florian Weimer <fweimer(at)redhat(dot)com> writes:
> Do you care about the snprintf behavior on very large buffers (larger
> than INT_MAX)? Then there's further complication, and it's an area
> where glibc behavior is likely to change in the future (because it is
> claimed that C99 and POSIX conflict, and glibc implements neither behavior).

We do not. Note that the buffer enlargement behavior is designed not to
let "len" exceed INT_MAX; it'll say "out of memory" instead.

Given that vsnprintf is defined to return int, buffers larger than INT_MAX
would be a real can of worms, one that we'd best not open.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-10-23 13:47:26 Re: Why the asprintf patch is still breaking the buildfarm
Previous Message Noah Misch 2013-10-23 12:38:23 Re: Commitfest II CLosed