Bug #80475 [NEW]: JIT - "Undefined variable" errors

From: Date: Thu, 03 Dec 2020 05:03:50 +0000
Subject: Bug #80475 [NEW]: JIT - "Undefined variable" errors
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230811@lists.php.net to get a copy of this message
From:             herbert at groot dot jebbink dot nl
Operating system: Linux Debian (crostini)
PHP version:      8.0.0
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:JIT - "Undefined variable" errors

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;

  }

?>


-- 
Edit bug report at https://bugs.php.net/bug.php?id=80475&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80475&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80475&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80475&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80475&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80475&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80475&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80475&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80475&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80475&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80475&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80475&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80475&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80475&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80475&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80475&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80475&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80475&r=mysqlcfg


Thread (3 messages)

« previous php.bugs (#230811) next »