pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5890: malloc error
2+ messages / 2 participants
[nested] [flat]

* BUG #5890: malloc error
@ 2011-02-16 21:53 Emmanuel <tuco@pasteur.fr>
  2011-02-16 22:46 ` Re: BUG #5890: malloc error Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Emmanuel @ 2011-02-16 21:53 UTC (permalink / raw)
  To: pgsql-bugs


The following bug has been logged online:

Bug reference:      5890
Logged by:          Emmanuel
Email address:      tuco@pasteur.fr
PostgreSQL version: 8.4.1
Operating system:   Mac OSX 10.6.6
Description:        malloc error
Details: 

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
*** set a breakpoint in malloc_error_break to debug
Abort trap

I have more than one table starting with 'pub...'
- publications
- pub_genes
- pub_org
- pub_auths

However if I precise the schema name like 'public.pub..' and press 'tab'
key, then I get list of table matching the beginning of my table name: 


legiobiblio=# select pmid from public.pub<tab>
public.pub_auths     public.pub_genes     public.pub_org      
public.publications  
legiobiblio=# select pmid from public.pub

hope my message is clear enough.

Cheers



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #5890: malloc error
  2011-02-16 21:53 BUG #5890: malloc error Emmanuel <tuco@pasteur.fr>
@ 2011-02-16 22:46 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2011-02-16 22:46 UTC (permalink / raw)
  To: Emmanuel <tuco@pasteur.fr>; +Cc: pgsql-bugs

"Emmanuel" <tuco@pasteur.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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-02-16 22:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-16 21:53 BUG #5890: malloc error Emmanuel <tuco@pasteur.fr>
2011-02-16 22:46 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox