Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14257 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75117 invoked by uid 1010); 1 Jan 2005 14:30:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 75098 invoked from network); 1 Jan 2005 14:30:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jan 2005 14:30:22 -0000 X-Host-Fingerprint: 64.233.184.202 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.202:50663] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTP id 9F/0B-39595-EF3B6D14 for ; Sat, 01 Jan 2005 09:30:22 -0500 Received: by wproxy.gmail.com with SMTP id 36so273105wri for ; Sat, 01 Jan 2005 06:30:19 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=M8U6evToUuAppBAcGFDhcyPRzFoPAU1KmeBkTGXPGgU4j1TztBhuL2+qBnc5L2CJm1i+dpOCP9ZummYo61a1y+yEc+1/cm4keUWYwrLP29FcCULSVgrLy8KtYGBATQgHaVyv9Zf5FGjDfI4C/EMlfhB1OIcspuTq5KqToz3ILG8= Received: by 10.54.17.42 with SMTP id 42mr399524wrq; Sat, 01 Jan 2005 06:30:19 -0800 (PST) Received: by 10.54.59.28 with HTTP; Sat, 1 Jan 2005 06:30:19 -0800 (PST) Message-ID: <4e89b42605010106303c1650ed@mail.gmail.com> Date: Sat, 1 Jan 2005 09:30:19 -0500 Reply-To: Wez Furlong To: Alan Knowles Cc: internals@lists.php.net In-Reply-To: <41D64D24.4060407@akbkhome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <41D64D24.4060407@akbkhome.com> Subject: Re: [PHP-DEV] dl() usage for cli php5 From: kingwez@gmail.com (Wez Furlong) This is still the broken shutdown order problem I've been moaning about for some time; we're unloading the modules before we call the dtors. If you unset or assign to null all references to objects in your extension before the script ends, you should end up with no segfault. --Wez. On Sat, 01 Jan 2005 15:11:32 +0800, Alan Knowles wrote: > I'm getting segfaults at shutdown when using dl() with my extension - > works perfectly if it's in php.ini (or if I run when compiled with > --enable-debug > > a) is this a known issue? > b) is it fixable for cli usage? > > I'm guessing this is because modules are destroyed before the objects > that they created are . looking at main/main.c > :php_request_shutdown_for_hook() - a temporary fix may be to check for > sapi == cli and skip the zend_deactivate_modules, and add it to the > sapi_deactivate_cli.. > > Regards > Alan > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >