Subject: Minor bug.

From: [email-masked] (Scott Kempf)
Date: Tue, 26 Oct 93 16:53:32 CDT

Dear Postgurus,

Sorry if this is mailed to the wrong place.  Last time I set mail
here I thought it would go out on the list, instead I just got a
responce saying someone may look into my problem.   This time that's
all I want.

Palloc() in the fe-pqstubs.c part of libpq doesn't check the
return value from malloc().  When memory runs out, bing,
segmentation violation.

The code:

/* ----------------
 *      palloc (frontend version)
 *      pfree (frontend version)
 * ----------------
 */
Pointer
palloc(size)
    Size size;
{
    Pointer p;
 
    p = malloc(size);
    bzero(p, size);
 
    return (p);
}

Also in the same file, it would be nice if elog() did something closer
to the elog() in the backend.  I have user defined types which call
elog() when there is trouble.  Since the code is used both in the front
end and the back end a better front end elog() is needed.

Luckly with postgres we get source, so don't worry about me.  I fixed
my version.  I just thought this would be helpful for the next release.

				Thanks much,
				Scott

---

From: [email-masked] (Paul M. Aoki)
Date: Sun, 31 Oct 93 00:06:34 PDT

[email-masked] (Scott Kempf) writes:
> to the elog() in the backend.

fair enough.  done.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki