php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80475 JIT - "Undefined variable" errors
Submitted: 2020-12-03 05:03 UTC Modified: 2020-12-27 04:22 UTC
From: herbert at groot dot jebbink dot nl Assigned:
Status: No Feedback Package: JIT
PHP Version: 8.0.0 OS: Linux Debian (crostini)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: herbert at groot dot jebbink dot nl
New email:
PHP Version: OS:

 

 [2020-12-03 05:03 UTC] herbert at groot dot jebbink dot nl
Description:
------------
I have with JIT "Undefined variable" errors in a big application that does not give this error without JIT, 

It happens when there is a global statement of a variable that does not exists, but if I use this construction in a small example script then it works with JIT

./configure --with-apxs2=/usr/bin/apxs2 --with-mysql-sock=/run/mysqld/mysqld.sock --enable-mbstring --enable-exif --enable-ftp --with-zip --enable-soap --with-mysqli --with-pdo-mysql --with-curl --with-openssl --with-zlib --with-bz2 --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --with-tidy --with-xsl --with-sodium --enable-shmop --with-pspell --with-pear

memory_limit = 2048M
display_errors = on
error_reporting = E_ALL
zend_extension=opcache.so
opcache.enable=1
opcache.enable_cli=1
opcache.jit_buffer_size=128M
extension=memcached.so
extension=yaml.so
zend_extension=xdebug.so
xdebug.mode=debug


Test script:
---------------
<?php

  myFunc ('abc');
  myFunc ('xyz');

  function myFunc ($index) {

    global $myVar;
    
    $myVar [$index] = TRUE;

  }

?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-03 10:58 UTC] cmb@php.net
-Package: Unknown/Other Function +Package: JIT
 [2020-12-14 13:04 UTC] dmitry@php.net
-Status: Open +Status: Feedback
 [2020-12-14 13:04 UTC] dmitry@php.net
Do you see the same problem without xdebug? (this may be some xdebug/JIT incompatibility).

We need a reproduction case to understand and fix this.
 [2020-12-27 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: Fri Dec 27 01:01:28 2024 UTC