From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Subject: BUG #16837: Invalid memory access on \h in psql
Date: Tue, 26 Jan 2021 07:00:00 +0000
Message-ID: <16837-479bcd56040c71b3@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16837
Logged by: Alexander Lakhin
Email address: exclusion@gmail.com
PostgreSQL version: 13.1
Operating system: Ubuntu 20.04
Description:
When executing in psql (under valgrind):
\h\
valgrind detects the following error:
==00:00:00:00.000 3226182==
==00:00:00:04.045 3226182== Conditional jump or move depends on
uninitialised value(s)
==00:00:00:04.045 3226182== at 0x1396CB: helpSQL (help.c:600)
==00:00:00:04.045 3226182== by 0x120705: exec_command_help
(command.c:1507)
==00:00:00:04.045 3226182== by 0x1252CD: exec_command (command.c:351)
==00:00:00:04.045 3226182== by 0x1258A3: HandleSlashCmds
(command.c:222)
==00:00:00:04.045 3226182== by 0x13B166: MainLoop (mainloop.c:502)
==00:00:00:04.045 3226182== by 0x1238B3: process_file (command.c:3921)
==00:00:00:04.045 3226182== by 0x14357A: main (startup.c:400)
==00:00:00:04.045 3226182== Uninitialised value was created by a heap
allocation
==00:00:00:04.045 3226182== at 0x483B7F3: malloc (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==00:00:00:04.045 3226182== by 0x4AB2A1C: initPQExpBuffer
(pqexpbuffer.c:94)
==00:00:00:04.045 3226182== by 0x13D9CE: psql_scan_slash_option
(psqlscanslash.l:563)
==00:00:00:04.045 3226182== by 0x1206B6: exec_command_help
(command.c:1493)
==00:00:00:04.045 3226182== by 0x1252CD: exec_command (command.c:351)
==00:00:00:04.045 3226182== by 0x1258A3: HandleSlashCmds
(command.c:222)
==00:00:00:04.045 3226182== by 0x13B166: MainLoop (mainloop.c:502)
==00:00:00:04.045 3226182== by 0x1238B3: process_file (command.c:3921)
==00:00:00:04.045 3226182== by 0x14357A: main (startup.c:400)
==00:00:00:04.045 3226182==
{
<insert_a_suppression_name_here>
Memcheck:Cond
fun:helpSQL
fun:exec_command_help
fun:exec_command
fun:HandleSlashCmds
fun:MainLoop
fun:process_file
fun:main
}
No help available for "\".
Try \h with no arguments to see available help.
psql is started with the following command line:
valgrind --leak-check=no --track-origins=yes --time-stamp=yes
--read-var-info=yes \
--gen-suppressions=all --suppressions=src/tools/valgrind.supp \
--trace-children=yes $PGROOT/usr/local/pgsql/bin/psql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, exclusion@gmail.com
Subject: Re: BUG #16837: Invalid memory access on \h in psql
In-Reply-To: <16837-479bcd56040c71b3@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox