psql Crash in -TIP

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: psql Crash in -TIP
Date: 2003-05-02 02:47:39
Message-ID: 1051843659.78976.22.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

case '/':
if (pset.db)
strncpy(buf, PQdb(pset.db), MAX_PROMPT_SIZE);
break;

In the above code segment from prompt.c (PSQL sources) it appears
PQdb(pset.db) is returning NULL for me.

(gdb) run
Starting program: /usr/home/rbt/work/postgresql/dbdocs/bin/./psql
Welcome to psql 7.4devel, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit


Program received signal SIGSEGV, Segmentation fault.
0x48169d14 in strncpy () from /usr/lib/libc.so.4
(gdb) backtrace
#0 0x48169d14 in strncpy () from /usr/lib/libc.so.4
#1 0x805151a in get_prompt (status=PROMPT_READY) at prompt.c:172
#2 0x804f073 in MainLoop (source=0x4818ddc0) at mainloop.c:178
#3 0x8050c25 in main (argc=1, argv=0xbfbffaa0) at startup.c:301
#4 0x804a43e in _start ()

--
Rod Taylor <rbt(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-05-02 03:53:33 Re: psql Crash in -TIP
Previous Message Rod Taylor 2003-05-02 02:20:34 ECPG timestamp.c