Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B4CFD1337B5C for ; Wed, 16 Feb 2011 18:47:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 11443-09 for ; Wed, 16 Feb 2011 22:46:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DEE3E1337B4E for ; Wed, 16 Feb 2011 18:46:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p1GMkqAQ006009; Wed, 16 Feb 2011 17:46:52 -0500 (EST) To: "Emmanuel" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5890: malloc error In-reply-to: <201102162153.p1GLr9hB068759@wwwmaster.postgresql.org> References: <201102162153.p1GLr9hB068759@wwwmaster.postgresql.org> Comments: In-reply-to "Emmanuel" message dated "Wed, 16 Feb 2011 21:53:09 +0000" Date: Wed, 16 Feb 2011 17:46:52 -0500 Message-ID: <6008.1297896412@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/145 X-Sequence-Number: 29417 "Emmanuel" 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 > 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