|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73671 Zend assertion error in `make test` when php 7.1 is built with --enable-debug
Submitted: 2016-12-07 06:01 UTC Modified: 2019-07-15 21:34 UTC
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: tandre at ifwe dot co Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: 7.1.0 OS: Ubuntu/Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tandre at ifwe dot co
New email:
PHP Version: OS:


 [2016-12-07 06:01 UTC] tandre at ifwe dot co
Both the current master branch and the extension's 2.4.0 release are affected in php 7.1. 7.0 doesn't seem to have this assertion.

Solr declares that it returns a reference for many functions in the method signatures. However, it returns IS_OBJECT or IS_NULL in many places in php 7 (E.g. uses ZVAL_COPY for the implementation of solr_return_solr_params_object();
 (But does set the is_ref flag in php 5). (I haven't investigated why it declared itself as returning a reference, but it didn't seem to make sense for SolrQuery->addFilterQuery())

Various errors of the below form are seen:

001+ php: /usr/local/php-7.1.0-src/Zend/zend_vm_execute.h:980: ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER: Assertion `(call->func->common.fn_flags & 0x4000000) ? (
zval_get_type(&(*(ret))) == 10) : !(zval_get_type(&(*(ret))) == 10)' failed.


A patch is included, and tests passed for php 7.0 and php 7.1 built with --enable-debug. I 

Test script:
# Build php with --enable-maintainer-zts --enable-debug --enable-libxml

# in another window, run a solr server
sudo docker run -p 8983:8983 --name solr5 omars/solr53
cd solr
make clean
make test

Expected result:
`make test` should have all tests pass in php 7.1 when php is compiled with --enable-debug

Actual result:
Dozens of tests abort with zend assertion errors


solr_return_reference.patch (last revision 2016-12-07 06:02 UTC by tandre at ifwe dot co)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-15 10:37 UTC]
-Status: Open +Status: Verified -Assigned To: +Assigned To: omars
 [2016-12-15 10:37 UTC]
 [2017-10-24 05:17 UTC]
-Status: Verified +Status: Assigned
 [2017-10-24 06:30 UTC]
-Status: Assigned +Status: Open -Assigned To: omars +Assigned To:
 [2019-03-29 09:31 UTC]
-Assigned To: +Assigned To: omars
 [2019-07-15 21:34 UTC]
-Status: Assigned +Status: Closed
 [2019-07-15 21:34 UTC]
released: 2.5.0
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Sep 18 21:01:25 2020 UTC