Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59468 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92517 invoked from network); 8 Apr 2012 20:00:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Apr 2012 20:00:57 -0000 Authentication-Results: pb1.pair.com header.from=yader.hernandez@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yader.hernandez@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: yader.hernandez@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:50059] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/75-56433-87EE18F4 for ; Sun, 08 Apr 2012 16:00:56 -0400 Received: by obbeh20 with SMTP id eh20so5440420obb.29 for ; Sun, 08 Apr 2012 13:00:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=NpefHgpiIcLRzMhamSQY8k3k2ofpYVdNVJ7nsltINlw=; b=Cf7Q04Lr3QEDl9y6QeUK6MVHmgLxWKb7NCYwvB/RCr7P0D50nj+GMlmyXj27u+RhIJ WhBm9Hvj9KTaPYLK2wLIIBaJCr9omzwWH1GIUrA3gBWq9cUEL6ia58wVZ0FmvUsI2dYG JXaOaF+dx4m/+x3I7M6xlqj7IkEvs1IArFXKt5CbDLdG++9N/95Kn3Mcx+As6VnMVOLL jozw+84vTJvyC7YN8w5N9K56MWT3i4DIPUvdqOYkMiAG1HGbSC0tzI4J9SSXPU7bW2Vq x9F8qYjfJv6M4qumLJDyJcMHkeDUGDQHF7gB9epZCi6Zid9cCmX8FFLT4OiKYVN8Odiv 9UxQ== MIME-Version: 1.0 Received: by 10.60.4.170 with SMTP id l10mr6882036oel.67.1333915253153; Sun, 08 Apr 2012 13:00:53 -0700 (PDT) Sender: yader.hernandez@gmail.com Received: by 10.60.147.199 with HTTP; Sun, 8 Apr 2012 13:00:53 -0700 (PDT) In-Reply-To: References: <1333834026.4220.6.camel@guybrush> <2489245882729818767@unknownmsgid> Date: Sun, 8 Apr 2012 13:00:53 -0700 X-Google-Sender-Auth: 9EnXIrdQuOxx9zghxsw0APOgIiw Message-ID: To: Derick Rethans Cc: Xinchen Hui , PHP Internals Content-Type: multipart/alternative; boundary=e89a8fb1f862d3208304bd3058cb Subject: Re: [PHP-DEV] how do you create a private property as an array in a class From: proxilabs@gmail.com (Matthew Hernandez) --e89a8fb1f862d3208304bd3058cb Content-Type: text/plain; charset=ISO-8859-1 On Sun, Apr 8, 2012 at 2:26 AM, Derick Rethans wrote: > On Sat, 7 Apr 2012, Matthew Hernandez wrote: > > > How can I valgrind my extension? Google isn't bringing up many php > > extension topics :/ > > On the shell: > > export USE_ZEND_ALLOC=0 > export ZEND_DONT_UNLOAD_MODULES=1 > valgrind php -dextension=yourextension.so yourscript.php > > See for some more info here: > http://derickrethans.nl/valgrinding-shared-modules.html thanks, this solved the seg fault issue in no time. > > > > I can't figure out why I keep getting a seg fault: > > > > typedef struct _foo_object { > > zend_object std; > > zval *elements; > > } foo_object; > > > > static foo_object *foo_object_ptr; > > You really want to avoid real globals like this though, as it makes > things not thread-safe. > thanks, I'll avoid doing it like this. Which reminds me. Would you happen to have a "best practices" for php-extension development that I could reference? I've found a few articles around, mostly out dated. > Also, please don't top-reply on this list. > sorry. > > cheers, > Derick > > -- > http://derickrethans.nl | http://xdebug.org > Like Xdebug? Consider a donation: http://xdebug.org/donate.php > twitter: @derickr and @xdebug > --e89a8fb1f862d3208304bd3058cb--