php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69566 Conditional jump or move depends on uninitialised value in extension trait
Submitted: 2015-05-03 21:38 UTC Modified: -
From: jbboehr at gmail dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 5.6.8 OS: Ubuntu 14.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jbboehr at gmail dot com
New email:
PHP Version: OS:

 

 [2015-05-03 21:38 UTC] jbboehr at gmail dot com
Description:
------------
I've been trying to make a trait in a PHP extension, and there doesn't seem to be any APIs for it, but I did manage to get it working, however when running
TEST_PHP_ARGS=-m make test

I'm getting this:
==12138== Conditional jump or move depends on uninitialised value(s)
==12138==    at 0x86FF52: zend_fixup_trait_method (zend_compile.c:4102)
==12138==    by 0x8A9BB7: zend_hash_apply_with_argument (zend_hash.c:666)
==12138==    by 0x87AE1E: zend_do_bind_traits (zend_compile.c:4369)
==12138==    by 0x8E2273: ZEND_BIND_TRAITS_SPEC_HANDLER (zend_vm_execute.h:1163)
==12138==    by 0x8D988A: execute_ex (zend_vm_execute.h:363)
==12138==    by 0x89C9B2: zend_execute_scripts (zend.c:1341)
==12138==    by 0x82B739: php_execute_script (main.c:2597)
==12138==    by 0x94F0E4: do_cli (php_cli.c:994)
==12138==    by 0x446BE5: main (php_cli.c:1378)
==12138== 

It still compiles and passes the tests, but I'm worried about undefined handling.

Test script:
---------------
Unfortunately, it's in an extension, so to reproduce compile https://github.com/jbboehr/php-psr and run
TEST_PHP_ARGS=-m make test



Patches

extension_trait_issue (last revision 2015-05-03 21:38 UTC by jbboehr at gmail dot com)

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-04 02:37 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6b5ca7202fe95240c0ecc17861c050683547a816
Log: Fixed #69566 in master
 [2015-05-04 02:37 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2016-07-20 11:38 UTC] davey@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6b5ca7202fe95240c0ecc17861c050683547a816
Log: Fixed #69566 in master
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC