Re: Assert failed in snprintf.c
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jaime Casanova <jaime.casanova@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-10-01T14:48:30Z
Lists: pgsql-hackers
Jaime Casanova <jaime.casanova@2ndquadrant.com> writes: > sqlsmith made it again, attached is the query (run against regression > database) that makes the assert fail and the backtrace. > this happens in head only (or at least 11 is fine). Ah. Looks like the has_column_privilege stuff is incautious about whether it's handed a valid table OID: regression=# select has_column_privilege(42::oid, 'z'::text, 'q'::text); server closed the connection unexpectedly In older branches I get regression=# select has_column_privilege(42::oid, 'z'::text, 'q'::text); ERROR: column "z" of relation "(null)" does not exist but that's only because glibc's snprintf is forgiving about getting a NULL pointer for %s. On some other platforms it'd end in SIGSEGV. Will fix, thanks for report! regards, tom lane
Commits
-
Fix corner-case failures in has_foo_privilege() family of functions.
- fd81fae67fa0 9.4.20 landed
- dad4df0fc8a1 9.5.15 landed
- 01c7a87df98c 9.3.25 landed
- 7eed72333731 10.6 landed
- 6d73983be61a 9.6.11 landed
- 419cc8add5fb 11.0 landed
- 3d0f68dd3061 12.0 landed