Giter Site home page Giter Site logo

Comments (2)

TimWolla avatar TimWolla commented on May 29, 2024

Found while working on #11293.

from php-src.

nielsdos avatar nielsdos commented on May 29, 2024

This turns out to be a regression, regressed in #8373.
In particular, we'll fail in zend_get_attribute_value that was called from validate_attribute to read the target.
That's because of this check:

php-src/Zend/zend_ast.c

Lines 807 to 811 in d407266

// Preloading will attempt to resolve constants but objects can't be stored in shm
// Aborting here to store the const AST instead
if (CG(in_compilation)) {
return FAILURE;
}

Note that we are in compilation, so the check will be true and we'll fail to resolve the enum.
If I change that check to if (CG(compiler_options) & ZEND_COMPILE_PRELOAD) { it works, but I guess that'll break in preloading... I'll check.
EDIT: of course it does
EDIT 2: checking both compiler_options and in_compilation, like so if (CG(in_compilation) && CG(compiler_options) & ZEND_COMPILE_PRELOAD) { makes all ext/opcache tests pass, now checking preloading...
EDIT 3: as expected, doesn't work, probably the check should happen at a difference place?

from php-src.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.