php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81007 JIT "not supported" on 32-bit x86 -- build problem?
Submitted: 2021-05-02 21:09 UTC Modified: 2021-05-05 14:57 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: php at redir dot desz dot cz Assigned: nikic (profile)
Status: Closed Package: JIT
PHP Version: 8.0.5 OS: Linux
Private report: No CVE-ID: None
 [2021-05-02 21:09 UTC] php at redir dot desz dot cz
Description:
------------
It may be a documentation or build problem, not sure which exactly -- my limited testing suggests that build process mistakenly disables JIT.

https://wiki.php.net/rfc/jit states "Currently we support x86 and x86_64 on POSIX platforms" -- I get "x86" here means 32-bit x86.

I have a 32-bit system I've built PHP 8 on (8.0.3 and 8.0.5). JIT was "unavailable" in phpinfo(), and I've found "WARNING: JIT not supported by host architecture" in config.log.

Checking "configure", I've found, that the test for said architecture is:

    case $host_cpu in
      x86*)
        ;;
      *)
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JIT not supported by host architecture" >&5
$as_echo "$as_me: WARNING: JIT not supported by host architecture" >&2;}
        PHP_OPCACHE_JIT=no
        ;;
    esac

BUT $host_cpu on my system is recognized as "i686", so the "x86*" condition never matches.

Out of curiosity, I've modified the condition to match my CPU and rebuilt PHP; now phpinfo() reports JIT as "On", opcache_get_status() says it's "enabled" and "on", and so far I haven't encountered a single problem running various scripts (I haven't measured performance yet, though). So -- is there a mistake in docs, and for some reason JIT really should not be used on 32bit systems, or a mistake in configure script?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-05-05 14:57 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2021-05-05 14:57 UTC] nikic@php.net
This should be fixed by https://github.com/php/php-src/commit/bf9dc534356ec3b372abe5f3030c3e362aa261ac, though I haven't tested it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 13:01:28 2024 UTC