Re: more on out-of-memory - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: more on out-of-memory
Date
Msg-id 49DB007D.7000108@enterprisedb.com
Whole thread Raw
In response to more on out-of-memory  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> His question was: is it possible that we're handing a NULL pointer to a
> %s on fprintf?  The involved code looks like this:
> 
>         fprintf(stderr,
>             "%s: %lu total in %ld blocks; %lu free (%ld chunks); %lu used\n",
>             set->header.name, totalspace, nblocks, freespace, nchunks,
>             totalspace - freespace);

Note that glibc prints "(null)" if you pass NULL for %s. Others don't.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Closing some 8.4 open items
Next
From: Heikki Linnakangas
Date:
Subject: Re: More message encoding woes