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 > 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. Also, please don't top-reply on this list. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php