Re: [HACKERS] an older problem? hash table out of memory

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] an older problem? hash table out of memory
Date: 1999-05-04 17:21:52
Message-ID: 199905041721.NAA00646@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
> >> The "hashtable out of memory" problem is reproducible, however.
> >> I'm on it.
>
> > Historically, no one knows much about the hash routines.
>
> Well, I've been learning some unpleasant truths :-(. Hope to have
> some fixes to commit in the next few days.
>
> The immediate cause of one coredump I saw was that someone who was
> overenthusiastically replacing sprintf's with snprintf's had written
>
> snprintf(tempname, strlen(tempname), ...);

Here they are. Can you properly fix them? Looks like good news that I
found one of the ones you found. The others may be OK:

./backend/commands/view.c: snprintf(buf, strlen(viewName) + 5, "_RET%s", viewName);
./backend/executor/nodeHash.c: snprintf(tempname, strlen(tempname), "HJ%d.%d", (int) MyProcPid, hjtmpcnt);
./backend/libpq/pqcomm.c: snprintf(PQerrormsg + strlen(PQerrormsg), ERROR_MSG_LENGTH,

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-05-04 17:23:09 Re: [HACKERS] numeric data type on 6.5
Previous Message Bruce Momjian 1999-05-04 16:55:40 Re: [HACKERS] pg_dump bug (was Re: [SQL] Slow Inserts Again)