Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107567 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7021 invoked from network); 17 Oct 2019 15:55:53 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 17 Oct 2019 15:55:53 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id A461D2C0451 for ; Thu, 17 Oct 2019 06:40:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.0.0.0/16 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) Received: from mail.kd2.org (citrouille.kd2.org [IPv6:2001:41d0:1:f66e::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 17 Oct 2019 06:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bohwaz.net; s=mail; h=Message-ID:From:Date:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:To; bh=/d4fVgNXVDDTFmMnC2VGtZRgImEDQBytAlQ/56IEqMM=; b=kkUl1ZIpGG9QAi19kiZgr6sK0zcSMBKE94I1/JJsHO1WaoJb5mC4xBceK3I1bT5spJNZbZ8rOk2iNfyPe7VkZCVwjRwP3YIlKqsBwgIRwU1N5jf91wDddq5kZDSyyYgCaH4NHwMHQswi/w1Rp5fQYoidtTmWrK+O5sAuTvYCNec=; Received: from narragoon by mail.kd2.org with local (Exim 4.84_2) (envelope-from ) id 1iL60z-0004Kc-Bk for internals@lists.php.net; Thu, 17 Oct 2019 15:40:29 +0200 To: internals@lists.php.net X-PHP-Originating-Script: 0:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 17 Oct 2019 15:40:29 +0200 Message-ID: <47720230f492ca3ee03d77239b80cf32@bohwaz.net> X-Sender: php@bohwaz.net User-Agent: Roundcube Webmail/1.1.5 X-Envelope-From: Subject: Help with memory leak on zend_call_function From: php@bohwaz.net (BohwaZ/PHP) Hi all, I am working on this PR: https://github.com/php/php-src/pull/4797 It implements the ability to set a userland callback function that would allow or deny SQL queries in SQLite using its internal authorizer logic. This is a native feature of SQLite that is currently missing from the PHP extension. It's quite straightforward, but I could not find much documentation on zend_call_function and fci/fcc. So I just tried to find existing examples that did the same (calling a userland function callback from the C extension) and mostly used the one from libxml. So it works well, but I'm stuck on a memory leak, even though I'm using zend_fcall_info_args_clear. I'm not sure what's going on here and why. So if someone could take a look or point me in the right direction, that would be great :) Thanks!