... - Mailing list pgsql-bugs

From Michael G. Reed
Subject ...
Date
Msg-id Pine.GSO.4.10.9905271735540.5051-100000@banana-jr.fw5540.net
Whole thread Raw
List pgsql-bugs
-----BEGIN PGP SIGNED MESSAGE-----

============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


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


System Configuration
- ---------------------
  Architecture (example: Intel Pentium)         : sun4u

  Operating System (example: Linux 2.0.26 ELF)  : SunOS sun0 5.6 Generic_105181-12 sun4u sparc SUNW,Ultra-4


  PostgreSQL version (example: PostgreSQL-6.4.2)  :   PostgreSQL-6.4.2

  Compiler used (example:  gcc 2.8.0)           : gcc 2.8.1


Please enter a FULL description of your problem:
- ------------------------------------------------

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



Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
- ----------------------------------------------------------------------

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



If you know how this problem might be fixed, list the solution below:
- ---------------------------------------------------------------------

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

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBN028n08Qx019l0ClAQF/gQP/cEIZ1SEgRGDmV5JnQbOdBpLkYyZ67BwR
iL4vApsPfBX50g8P59HG1FxOglPLT1/cOyMfO2LKfbRVzwecGEaL4A7ui8euZvve
2XrEAjuHm0q84GV01EPN8oOShPrkKcsuLRmHnOqwM0VgBSgch7/aRdOocbqYbCFx
rHxHwMVqzJs=
=/z2T
-----END PGP SIGNATURE-----


pgsql-bugs by date:

Previous
From: Unprivileged user
Date:
Subject: General Bug Report: Server hangs,with backends still running on accept() failure
Next
From: Unprivileged user
Date:
Subject: General Bug Report: prefix stringsearch doesn't return results