X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C8FAC52AEB for ; Tue, 12 Jul 2005 20:59:27 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35844-02 for ; Tue, 12 Jul 2005 23:59:22 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 78294529CA for ; Tue, 12 Jul 2005 20:59:19 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j6CNxIYU005344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 12 Jul 2005 17:59:20 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j6CNxI39087099; Tue, 12 Jul 2005 17:59:18 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j6CNxI5v087098; Tue, 12 Jul 2005 17:59:18 -0600 (MDT) (envelope-from mfuhr) Date: Tue, 12 Jul 2005 17:59:18 -0600 From: Michael Fuhr To: Andrew Dunstan Cc: pgsql-hackers@postgresql.org Subject: Re: PL/Perl list value return causes segfault Message-ID: <20050712235917.GA87056@winnie.fuhr.org> References: <20050712130452.GA84564@winnie.fuhr.org> <42D41319.70107@dunslane.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42D41319.70107@dunslane.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/455 X-Sequence-Number: 70507 On Tue, Jul 12, 2005 at 02:59:37PM -0400, Andrew Dunstan wrote: > > Note that all plperl functions are called in scalar context, and it is > always wrong to return a list (as opposed to a listref). In fact, the > value received might surprise you even if it worked (it would be the > value of the last member of the list). Yeah, I knew that returning a list was contrary to what was expected, but I wanted to see what would happen. I wasn't expecting a core dump :-( Thanks for the patch. -- Michael Fuhr http://www.fuhr.org/~mfuhr/