Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: E_BAD_ACCESS with palloc/pfree in base type


  • From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
  • To: Gregory Stark <stark(at)enterprisedb(dot)com>
  • Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: E_BAD_ACCESS with palloc/pfree in base type
  • Date: Fri, 31 Aug 2007 09:52:56 -0500
  • Message-id: <5023C018-C766-42DB-A9BF-492252B5EF9D@seespotcode.net> <text/plain>


On Aug 31, 2007, at 3:02 , Gregory Stark wrote:

"Michael Glaesemann" <grzm(at)seespotcode(dot)net> writes:

    char * theDigits = malloc(sizeof(XTypeMaximumStringLength));
...
    char * subscriberNumber = malloc(XTypeMaximumStringLength);

One of those two is wrong, I suspect the first one.

Thanks, Greg. It looks like that was it. Always good to have a fresh pair of eyes.

I wonder how you define
XTypeMaximumStringLength as sizeof(<integer constant>) ought to give a
compile-time error.

It's an enum value. I do have a few compiler warnings (no errors) left to clean up, but that doesn't appear to be one of them.

Thanks again for your help!

Michael Glaesemann
grzm seespotcode net





Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group