Re: [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path
Date: 2025-10-13 15:48:59
Message-ID: 240582.1760370539@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bryan Green <dbryan(dot)green(at)gmail(dot)com> writes:
> I noticed that the log_error() utility function has a bug in its FRONTEND
> code path. The function uses fprintf() with a va_list argument, but
> fprintf() expects individual arguments. This should
> be vfprintf() instead.

Huh, that certainly appears broken, but isn't the non-FRONTEND
case equally broken? write_stderr() doesn't expect a va_list
either. I wonder if this code is ever reached at all.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2025-10-13 15:49:31 Re: Add notification on BEGIN ATOMIC SQL functions using temp relations
Previous Message Bryan Green 2025-10-13 15:32:37 [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path