Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27465 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6228 invoked by uid 1010); 15 Jan 2007 21:12:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6213 invoked from network); 15 Jan 2007 21:12:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2007 21:12:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=info@adaniels.nl; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=info@adaniels.nl; sender-id=unknown Received-SPF: error (pb1.pair.com: domain adaniels.nl from 82.94.235.198 cause and error) X-PHP-List-Original-Sender: info@adaniels.nl X-Host-Fingerprint: 82.94.235.198 hyak.bean-it.nl Received: from [82.94.235.198] ([82.94.235.198:51112] helo=hyak.bean-it.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/AE-33655-F3EEBA54 for ; Mon, 15 Jan 2007 16:12:32 -0500 Received: from [127.0.0.1] (bean-it.xs4all.nl [213.84.27.165]) (authenticated bits=0) by hyak.bean-it.nl (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id l0FLCKFT018892; Mon, 15 Jan 2007 22:12:21 +0100 Message-ID: <45ABEE28.60005@adaniels.nl> Date: Mon, 15 Jan 2007 22:12:08 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Antony Dovgal CC: internals@lists.php.net References: <45ABE8FF.4060400@adaniels.nl> <45ABEAD2.6090804@zend.com> In-Reply-To: <45ABEAD2.6090804@zend.com> Content-Type: multipart/alternative; boundary="------------020001080401070701010405" X-Virus-Scanned: by amavisd-new X-Spam-Status: No, score=-2.1 required=4.0 tests=BAYES_00,HTML_40_50, HTML_MESSAGE autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on hyak.bean-it.nl Subject: Re: [PHP-DEV] Newbie help: Segmentation fault From: info@adaniels.nl (Arnold Daniels) --------------020001080401070701010405 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi again, First of all thanks for your reply. It sound logical, but doesn't work unfortunately. I now get: seabert:/var/pear# phpunit Test_Standard_qconf PHPUnit 3.0.0alpha11 by Sebastian Bergmann. FFFFSegmentation fault I've got no idea where the the FFFF stands for. /** * Parse .ini content into a zend array */ PHP_FUNCTION(qconf_ini_parse) { zval *in=NULL; zval *ret=NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|z", &in, &ret) == FAILURE) { RETURN_FALSE; } if (ret != NULL) { printf('1'); } RETURN_NULL(); } If you could have a closer look I will be very grateful. Arnold Antony Dovgal schreef: > On 01/15/2007 11:50 PM, Arnold Daniels wrote: >> Hi, >> >> I could use some help on an extension I've written. It worked fine >> before, but from out the blue I started to get segmentation faults. >> I've located it down to this piece of code, but I don't do any writes >> to the code memory, so I don't get what's wrong. It seems like the >> error lies in the 'ret != NULL'. >> >> The module compiled against php 5.1.6 and runs under linux version >> 2.6.15.4 (Debian). > > - zval *ret; > + zval *ret = NULL; > --------------020001080401070701010405--