Repository navigation
JIT tests fail on aarch64 for 8.5beta2 using clang 19, 20, 21 #19601
Copy link
Copy link
Closed
Labels
Description
Description
Building new beta 2 failed lots of JIT tests on arrch64 for Alpinelinux
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #81272: Segfault in var[] after array_slice with JIT [ext/opcache/tests/bug81272.phpt]
GH-16186 001 (Non-tracing JIT uses Closure scope) [ext/opcache/tests/gh16186_001.phpt]
GH-16186 002 (Non-tracing JIT uses Closure scope) [ext/opcache/tests/gh16186_002.phpt]
JIT ASSIGN_OBJ: Assign undefined vatiable to property [ext/opcache/tests/jit/assign_obj_002.phpt]
JIT BOOL_NOT: 001 Memory leak in case of reference to bool [ext/opcache/tests/jit/bool_not_001.phpt]
Bug #77857 (Wrong result if executed with JIT) [ext/opcache/tests/jit/bug77857.phpt]
Bug #79888 (Incorrect execution with JIT enabled) [ext/opcache/tests/jit/bug79888.phpt]
Bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code) [ext/opcache/tests/jit/bug80634.phpt]
Bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involving bitshifts) [ext/opcache/tests/jit/bug80745.phpt]
Bug #80786: PHP crash using JIT [ext/opcache/tests/jit/bug80786.phpt]
Bug #80802: zend_jit_fetch_indirect_var assert failure with tracing JIT [ext/opcache/tests/jit/bug80802.phpt]
Bug #80839: PHP problem with JIT [ext/opcache/tests/jit/bug80839.phpt]
Bug #80839: PHP problem with JIT [ext/opcache/tests/jit/bug80861.phpt]
Bug #80959: infinite loop in building cfg during JIT compilation [ext/opcache/tests/jit/bug80959.phpt]
Bug #80839: PHP problem with JIT [ext/opcache/tests/jit/bug81051.phpt]
Bug #81225: Wrong result with pow operator with JIT enabled [ext/opcache/tests/jit/bug81225.phpt]
Bug #81225: Wrong result with pow operator with JIT enabled [ext/opcache/tests/jit/bug81225_2.phpt]
Bug #81226: Integer overflow behavior is different with JIT enabled [ext/opcache/tests/jit/bug81226.phpt]
Bug #81249: Intermittent property assignment failure with JIT enabled [ext/opcache/tests/jit/bug81249.phpt]
Bug #81255: Memory leak in PHPUnit with functional JIT [ext/opcache/tests/jit/bug81255.phpt]
Bug #81256: Assertion `zv != ((void *)0)' failed for "preload" with JIT [ext/opcache/tests/jit/bug81256.phpt]
Bug #81409: Incorrect JIT code for ADD with a reference to array [ext/opcache/tests/jit/bug81409.phpt]
JIT CAST: 001 [ext/opcache/tests/jit/cast_001.phpt]
JIT DEFINED: 001 [ext/opcache/tests/jit/defined_001.phpt]
JIT FETCH_DIM_R: 005 [ext/opcache/tests/jit/fetch_dim_r_005.phpt]
JIT: FETCH_OBJ 005 [ext/opcache/tests/jit/fetch_obj_005.phpt]
GH-12380: JIT+private array property access inside closure accesses private property in child class [ext/opcache/tests/jit/gh12380.phpt]
GH-14082 (Segmentation fault on unknown address 0x600000000018 in ext/opcache/jit/zend_jit.c) [ext/opcache/tests/jit/gh14082.phpt]
GH-15490: use-after-free when traversing call graph [ext/opcache/tests/jit/gh15490.phpt]
GH-16984 (function JIT overflow bug) [ext/opcache/tests/jit/gh16984.phpt]
GH-17190 (Assertion failure ext/opcache/jit/ir/ir_gcm.c) [ext/opcache/tests/jit/gh17190.phpt]
GH-18898 (SEGV zend_jit_op_array_hot with property hooks and preloading) - jit 1235 [ext/opcache/tests/jit/gh18898_1.phpt]
GH-18898 (SEGV zend_jit_op_array_hot with property hooks and preloading) - jit 1233 [ext/opcache/tests/jit/gh18898_2.phpt]
GH-18899 (JIT function crash when emitting undefined variable warning and opline is not set yet) [ext/opcache/tests/jit/gh18899.phpt]
Bug GH-8461 001 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8461-001.phpt]
Bug GH-8461 002 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8461-002.phpt]
Bug GH-8461 003 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8461-003.phpt]
Bug GH-8461 004 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8461-004.phpt]
Bug GH-8461 005 (JIT does not account for function re-compile) [ext/opcache/tests/jit/gh8461-005.phpt]
Bug GH-8461 006 (JIT does not account for function re-compile) [ext/opcache/tests/jit/gh8461-006.phpt]
Bug GH-8461 007 (JIT does not account for function re-compile) [ext/opcache/tests/jit/gh8461-007.phpt]
Bug GH-8461 008 (JIT does not account for function re-compile) [ext/opcache/tests/jit/gh8461-008.phpt]
Bug GH-8591 001 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8591-001.phpt]
Bug GH-8591 002 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8591-002.phpt]
Bug GH-8591 003 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8591-003.phpt]
Bug GH-8591 004 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8591-004.phpt]
Bug GH-8591 001 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8591-005.phpt]
Bug GH-8591 001 (JIT does not account for class re-compile) [ext/opcache/tests/jit/gh8591-006.phpt]
JIT HOT_FUNC: 002 [ext/opcache/tests/jit/hot_func_002.phpt]
JIT: ignored opcodes [ext/opcache/tests/jit/ignored_opcodes.phpt]
Leading zero in opcache.jit option [ext/opcache/tests/jit/ini_leading_zero.phpt]
JIT INIT_FCALL: 003 incorrect init fcall guard (fail with tracing JIT and --repeat 3) [ext/opcache/tests/jit/init_fcall_003.phpt]
JIT HOT LOOP: 002 [ext/opcache/tests/jit/loop_002.phpt]
JIT MOD: 003 [ext/opcache/tests/jit/mod_003.phpt]
JIT MUL: 005 exception and SEND optimization [ext/opcache/tests/jit/mul_005.phpt]
oss-fuzz #64727 [ext/opcache/tests/jit/oss-fuzz-64727.phpt]
oss-fuzz #65498 [ext/opcache/tests/jit/oss-fuzz-65498.phpt]
Register Alloction 004: Check guard before register load [ext/opcache/tests/jit/reg_alloc_004.phpt]
JIT Trampoline 001: trampoline cleanup [ext/opcache/tests/jit/trampoline_001.phpt]
JIT Trampoline 002: trampoline cleanup [ext/opcache/tests/jit/trampoline_002.phpt]
PHP Version
8.5beta2
Operating System
Alpinelinux
Activity
andypost commentedon Aug 26, 2025
probably related #19569
iluuu1994 commentedon Aug 26, 2025
What does the diff say?
andypost commentedon Aug 26, 2025
Mostly returns empty line like
andypost commentedon Aug 26, 2025
I'm building it using clang 20.1.8
andypost commentedon Aug 26, 2025
maybe this one more informative
ndossche commentedon Aug 26, 2025
Is this ZTS or no? If you use --enable-debug-assertions, do you get an assertion about the TSRM?
What was the last version that worked? May be related to opcache now being bundled, my gut tells me this is related to thread local storage.
andypost commentedon Aug 26, 2025
none-zts, gonna add
--enable-debug-assertionsas it fails only on arch64andypost commentedon Aug 26, 2025
@nielsdos sadly this argument has no effect
a bit more
ndossche commentedon Aug 26, 2025
And you added that flag to the configure command, right?
Well I guess this needs a proper debug session. I only ever debugged Alpine+Aarch64 under emulation, which works but is extremely slow. I can maybe take a look tomorrow evening but can't make promises.
andypost commentedon Aug 26, 2025
Yes, added to configure so tomorrow I will try clang19 and gcc (alpine moved to 15.2 but there's some issues building so maybe it's not an option)
iluuu1994 commentedon Aug 26, 2025
Do the processes crash? Maybe you can run them with Valgrind in CI (
run-tests.php -m)? So we an idea of what's going on.andypost commentedon Aug 26, 2025
I see no crashes, is it enough to add
-mto run tests? or needs to install something special?iluuu1994 commentedon Aug 26, 2025
Just Valgrind. Yes, that should be it. Note that it's extremely slow, so you want to restrict to the failing tests.
2 remaining items
andypost commentedon Aug 26, 2025
started, but with
--enable-debug0assertionppc64le also started to fail https://gitlab.alpinelinux.org/alpine/aports/-/jobs/1987524andypost commentedon Aug 26, 2025
will check tomorrow with fresh head as somehow valgrind is not used(
EDIT tests running here https://gitlab.alpinelinux.org/alpine/aports/-/jobs/1987681
andypost commentedon Aug 26, 2025
locally in docker x86-84 fails too
ignored_opcodes.zip
[-]JIT tests fail on aarch64 for 8.5beta2[/-][+]JIT tests fail on aarch64 for 8.5beta2 using clang 19, 20, 21[/+]andypost commentedon Aug 28, 2025
used to build with gcc 15.4 and all tests are passed, so the issue in clang
iluuu1994 commentedon Aug 28, 2025
Oh, ok. May be related to 73b98a3 then.
TAILCALL VM
arnaud-lb commentedon Sep 1, 2025
Fixed, thank you @andypost!
Fix JIT stack setup on aarch64/clang
andypost commentedon Sep 1, 2025
Thank you! now tests on aarch64 running somehow faster)