Port Bug Report: Backend dies when run at high debug level

Поиск
Список
Период
Сортировка
От Unprivileged user
Тема Port Bug Report: Backend dies when run at high debug level
Дата
Msg-id 199905281611.MAA95585@hub.org
обсуждение исходный текст
Ответы Re: [PORTS] Port Bug Report: Backend dies when run at high debug level  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-ports
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Michael Reed
Your email address      : reed@itd.nrl.navy.mil

Category                : runtime: back-end
Severity                : serious

Summary: Backend dies when run at high debug level

System Configuration
--------------------
  Operating System   : Solaris 2.6

  PostgreSQL version : 6.4.2

  Compiler used      : gcc 2.8.1

Hardware:
---------
SunOS sun0 5.6 Generic_105181-12 sun4u sparc SUNW,Ultra-4
Sun Ultra 450 (2x300Mhz, 512MB).  Also verified on Sun Ultra 2 (2x167Mhz, 256MB)


Versions of other tools:
------------------------
gmake 3.75, bison 1.25, flex 2.5.4

--------------------------------------------------------------------------

Problem Description:
--------------------
Backend server dies unexpectedly when running at high debug level.
Problem not seen with no debug level specified.


--------------------------------------------------------------------------

Test Case:
----------
Run server at debug '10' on any solaris 2.6 platform (verified on
multiple machine types).


--------------------------------------------------------------------------

Solution:
---------
Traced it to a SEGV in postgresql-6.4.2/src/backend/nodes/outfuncs.c
in the function _outResdom (line 671).  The node->resname pointer was
NULL leading to an explosion of the sprintf statement (kinda hard to
do a sprintf of a string with a null pointer as the argument :-) Quick
hack to fix is:

        sprintf(buf, "\"%s\"", node->resname ? node->resname : ""); /* fix for
SELECT col AS

instead of:

        sprintf(buf, "\"%s\"", node->resname); /* fix for SELECT col AS

Why/how we are actually getting a NULL pointer in that field I didn't
track down (since this hack fixed the problem).

Tried to email this report to the mailing list, but it bounced.

--------------------------------------------------------------------------


В списке pgsql-ports по дате отправления:

Предыдущее
От: Unprivileged user
Дата:
Сообщение: Port Bug Report:
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PORTS] Port Bug Report: Backend dies when run at high debug level