Edit report at https://bugs.php.net/bug.php?id=81648&edit=1
ID: 81648
Comment by: emiel at crisp dot nl
Reported by: hhoechtl at 1drop dot de
Summary: SIGSEGV on Symfony controller annotations
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Debian 10
PHP Version: 8.0.13
Block user comment: N
Private report: N
New Comment:
Presumably same issue here on 8.1.1, using tideways
Simple test case:
# cat x.php
<?php
#[Attribute(Attribute::TARGET_METHOD)]
class X {
public function __construct(int $i) {
}
}
class Y {
#[X(123)]
public static function x() {
}
}
$refClass = new ReflectionClass('Y');
$refMethod = $refClass->getMethod('x');
$refAttributes = $refMethod->getAttributes();
foreach ($refAttributes as $refAttribute) {
$attribute = $refAttribute->newInstance();
}
# php x.php
fish: Job 2, 'php x.php' terminated by signal SIGSEGV (Address boundary error)
(gdb) run x.php
Starting program: /usr/bin/php x.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00005555558c94b3 in zend_observer_fcall_end ()
(gdb) bt
#0 0x00005555558c94b3 in zend_observer_fcall_end ()
#1 0x0000555555897ab7 in execute_ex ()
#2 0x000055555582333c in zend_call_function ()
#3 0x000055555582370d in zend_call_known_function ()
#4 0x000055555570e362 in ?? ()
#5 0x00005555556691fb in ?? ()
#6 0x000055555566a159 in ?? ()
#7 0x00005555558a0bad in zend_execute ()
#8 0x0000555555831ab5 in zend_execute_scripts ()
#9 0x00005555557ced7a in php_execute_script ()
#10 0x000055555591a56e in ?? ()
#11 0x0000555555674098 in ?? ()
#12 0x00007ffff76480b3 in __libc_start_main (main=0x555555673c90, argc=2, argv=0x7fffffffe418,
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
stack_end=0x7fffffffe408) at ../csu/libc-start.c:308
#13 0x000055555567423e in _start ()
Indeed running without tideways extension does not trigger it
Previous Comments:
------------------------------------------------------------------------
[2021-11-29 11:11:23] cmb@php.net
Ah! Re-opening then.
------------------------------------------------------------------------
[2021-11-29 09:49:22] beberlei@php.net
@cmb Just to clarify, this is a PHP bug caused by the interaction of a zend_observer and Attributes.
Tideways extension (and others) are just the trigger.
------------------------------------------------------------------------
[2021-11-24 16:45:23] cmb@php.net
Thanks! Closing as not a bug (in PHP) then.
------------------------------------------------------------------------
[2021-11-24 15:10:04] hhoechtl at 1drop dot de
You are right. It was caused by the tideways module. I'll inform the author.
------------------------------------------------------------------------
[2021-11-24 14:23:41] nikic@php.net
Maybe related to bug #81430 (does disabling whichever APM extension you're using fix this?)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=81648
--
Edit this bug report at https://bugs.php.net/bug.php?id=81648&edit=1