Re: Check for failed memory allocations in libpq

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Allen <daveallen(at)acm(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Check for failed memory allocations in libpq
Date: 2003-07-31 14:05:25
Message-ID: 1206.1059660325@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Dave Allen <daveallen(at)acm(dot)org> writes:
> Attached is a patch (against 7.3.4) to check the return values of some
> calls (malloc, realloc, etc.) for failed memory allocations in libpq.

You sure you aren't just trading one misbehavior for another? The
change in PQmakeEmptyPGresult, for example, just moves the core dump
somewhere else, unless you find reasonable fallbacks for *all* its
callers (including applications you don't have the source code for,
but in any case including every one of the calls in libpq).

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andreas Pflug 2003-07-31 14:30:17 Re: [Fwd: Re: ruleutils with pretty-print option]
Previous Message Tom Lane 2003-07-31 13:43:21 Re: Proof-of-concept for initdb-time shared_buffers selection