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

Re: BUG #5890: malloc error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Emmanuel" <tuco(at)pasteur(dot)fr>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5890: malloc error
Date: 2011-02-16 22:46:52
Message-ID: 6008.1297896412@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Emmanuel" <tuco(at)pasteur(dot)fr> writes:
> Operating system:   Mac OSX 10.6.6

> When I type a select query and then push the 'tab' key for table name
> completion (without) schema name, if there more than one table starting with
> the same prefix, I get this error:

> legiobiblio=# select pmid from pub<tab>
> psql(41402) malloc: *** error for object 0x4: pointer being freed was not
> allocated

This is a known and oft-reported bug in OS X's libedit --- it stomps on
memory that doesn't belong to it anytime the number of possible
completions is exactly 9 + 10*N, for any N>=0.  Complain to Apple:
the fix was applied upstream quite some time ago, and they are being
derelict by not adopting it.  In the meantime, you might consider
building psql with readline instead of libedit.  (Note you need real GNU
readline, as /usr/lib/libreadline.dylib is just a link to libedit.)

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Robert HaasDate: 2011-02-17 01:41:47
Subject: Re: BUG #5883: Error when mixing SPI_returntuple with returning regular HeapTuple
Previous:From: EmmanuelDate: 2011-02-16 21:53:09
Subject: BUG #5890: malloc error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group