|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56850 binary_assign/binary_assign_objdim doesn't work and segfaults
Submitted: 2006-02-20 17:50 UTC Modified: 2013-07-18 01:36 UTC
From: elias at adaptiveinstance dot com Assigned: pollita (profile)
Status: Closed Package: operator (PECL)
PHP Version: 5.0.5 OS: linux
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: elias at adaptiveinstance dot com
New email:
PHP Version: OS:


 [2006-02-20 17:50 UTC] elias at adaptiveinstance dot com
I cannot compile any version of the operator extension (0.1 - 0.3). During compilation the following error occurs multiple times:

'struct _zend_op' has no member named 'code'

i've rewritten the 'code' member to 'opcode' and then it compiled.

--file: operator.c, line: 177
#define PHP_OPERATOR_DECODE(opline)					(opline->code)

#define PHP_OPERATOR_DECODE(opline)					(opline->opcode)

Reproduce code:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-20 17:53 UTC] elias at adaptiveinstance dot com
oh, the change above are for RELEASE_0_3
 [2006-02-20 18:35 UTC] elias at adaptiveinstance dot com
stupid /me. compiles fine but does not work :)
 [2006-02-20 22:45 UTC]
Thanks for spotting the code/opcode typo.  I've fixed that in CVS, can you elaborate on the "doesn't work" part of your bug report?

Maybe a reproducing script?
 [2006-02-21 15:14 UTC] elias at adaptiveinstance dot com
>>> test summary:
FAIL Basic binary assign ops [tests/binary_assign.phpt]
PASS Basic comparison ops [tests/compare.phpt]
SKIP Extended comparison ops [tests/compare2.phpt]
PASS Inc/Dec ops [tests/incdec.phpt]
PASS Basic unary ops [tests/unary.phpt]

>>> binary_assign.phpt:
string(8) "PHP with"
string(20) "PHP with overloading"
Fatal error: Unsupported operand types in /tmp/operator-0.3/tests/binary_assign.php on line 56

i've ommited the fatal error causing operators but the script returns unexpected results and segfaults with most combinations operators. doing two consecutive assignments on one object is a safe way to generate a segfault.

current binary_assign_objdim.phpt is not testable because it  segfaults. further it breaks on "unsupported operand types" error if i comment out one of the operator assignment lines.
 [2013-07-18 01:36 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: pollita
 [2013-07-18 01:36 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Jun 08 15:04:07 2023 UTC