Re: [PORTS] Port Bug Report: Backend dies when run at high debug level

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [PORTS] Port Bug Report: Backend dies when run at high debug level
Дата
Msg-id 199905281635.MAA25850@candle.pha.pa.us
обсуждение исходный текст
Ответ на Port Bug Report: Backend dies when run at high debug level  (Unprivileged user <nobody>)
Список pgsql-ports
I would like to know if you can recreate this on our 6.5 snapshot on
ftp.postgresql.org.  We have redesigned the whole outfuncs interface on
6.5.


The new code is:

    appendStringInfo(str, " :resname \"%s\" :reskey %d :reskeyop %u",
                     stringStringInfo(node->resname),
                     node->reskey,
                     node->reskeyop);

and stringStringInfo is:

    #define stringStringInfo(s) (((s) == NULL) ? "<>" : (s))

so it looks like this has already been fixed.

>
> ============================================================================
>                         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.
>
> --------------------------------------------------------------------------
>
>
>


--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: Unprivileged user
Дата:
Сообщение: Port Bug Report: Backend dies when run at high debug level
Следующее
От: "Kapoor, Nishikant X"
Дата:
Сообщение: RE: [PORTS] AIX-4.2.1 binaries ? more info