php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77313 instanceof_class segfault
Submitted: 2018-12-17 15:58 UTC Modified: 2018-12-30 04:22 UTC
From: php-bugs at xpaw dot me Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 7.3.0 OS: Debian 9
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php-bugs at xpaw dot me
New email:
PHP Version: OS:

 

 [2018-12-17 15:58 UTC] php-bugs at xpaw dot me
Description:
------------
After upgrading to PHP 7.3.0 (from 7.2), I've been experiencing random segfaults, which I can not point to any specific code, here's one of the traces:

#0  instanceof_class (ce=<optimized out>, instance_ce=0x6e75722f7261762f) at ./Zend/zend_operators.c:2296
#1  instanceof_function (instance_ce=<optimized out>, ce=0x56300b0a7bb0) at ./Zend/zend_operators.c:2338
#2  0x0000563009843a69 in zend_check_type (is_return_type=<optimized out>, scope=<optimized out>, default_value=<optimized out>, cache_slot=<optimized out>, ce=<optimized out>, arg=0x7fed8001d490, type=<optimized out>) at ./Zend/zend_execute.c:906
#3  zend_verify_arg_type (cache_slot=<optimized out>, default_value=<optimized out>, arg=<optimized out>, arg_num=<optimized out>, zf=<optimized out>) at ./Zend/zend_execute.c:948
#4  ZEND_RECV_SPEC_UNUSED_HANDLER () at ./Zend/zend_vm_execute.h:2352
#5  execute_ex (ex=0x6e75722f7261762f) at ./Zend/zend_vm_execute.h:55566
#6  0x00005630098469fa in zend_execute (op_array=op_array@entry=0x7fed80071000, return_value=return_value@entry=0x7fed6c6bd8e0) at ./Zend/zend_vm_execute.h:60834
#7  0x00005630097b7bd3 in zend_execute_scripts (type=0x8001d440, type@entry=0x8, retval=0x7fed6c6bd8e0, retval@entry=0x0, file_count=file_count@entry=0x3) at ./Zend/zend.c:1568
#8  0x0000563009756678 in php_execute_script (primary_file=0x7ffcd8854b90) at ./main/main.c:2630
#9  0x0000563009612a9a in main (argc=<optimized out>, argv=<optimized out>) at ./sapi/fpm/fpm/fpm_main.c:1950


Sadly I can't provide a test script because this crash doesn't happen very often and I don't know what code triggers it (on a rather popular site).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-12-17 18:22 UTC] php-bugs at xpaw dot me
I looked at that crash with php's gdbinit and zbacktrace lead back to this code:

	public static function SetDatabase( \PDO $Database )
	{
		self::$Database = $Database;
	}

and SetDatabase got called with a PDO object.
 [2018-12-21 03:23 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2018-12-21 03:23 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2018-12-30 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC