Bug #77498 [NEW]: Custom extension Segmentation fault when declare static property

From: Date: Tue, 22 Jan 2019 03:17:50 +0000
Subject: Bug #77498 [NEW]: Custom extension Segmentation fault when declare static property
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219119@lists.php.net to get a copy of this message
From: liujingfeng dot a at yuewen dot com Operating system: Linux PHP version: 7.3.1 Package: Compile Failure Bug Type: Bug Bug description:Custom extension Segmentation fault when declare static property Description: ------------ Declare custom extension: PHP_MINIT_FUNCTION(foobar) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "FooBar", foobar_methods); foo_bar_ce = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_long(foo_bar_ce, ZEND_STRL("test"), 1, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC TSRMLS_CC); return SUCCESS; } Test script: --------------- <?php class Test extends FooBar { } Actual result: -------------- Segmentation fault (gdb) bt #0 0x000055890ea15213 in zval_get_type (pz=0x0) at /data/website/php-7.3.1/Zend/zend_types.h:411 #1 0x000055890ea18f54 in zend_do_inheritance (ce=0x7f486b40e018, parent_ce=0x5589112786b0) at /data/website/php-7.3.1/Zend/zend_inheritance.c:904 #2 0x000055890e993961 in do_bind_inherited_class (op_array=0x7f486b479300, opline=0x7f486b485000, class_table=0x5589111552a0, parent_ce=0x5589112786b0, compile_time=1 '\001') at /data/website/php-7.3.1/Zend/zend_compile.c:1151 #3 0x000055890e993be3 in zend_do_early_binding () at /data/website/php-7.3.1/Zend/zend_compile.c:1202 #4 0x000055890e9a7403 in zend_compile_top_stmt (ast=0x7f486b47b230) at /data/website/php-7.3.1/Zend/zend_compile.c:8154 #5 0x000055890e9a7394 in zend_compile_top_stmt (ast=0x7f486b47b018) at /data/website/php-7.3.1/Zend/zend_compile.c:8142 #6 0x000055890e96c587 in zend_compile (type=2) at Zend/zend_language_scanner.l:602 #7 0x000055890e96c6da in compile_file (file_handle=0x7fffb1caf210, type=8) at Zend/zend_language_scanner.l:636 #8 0x000055890e7b6dc9 in phar_compile_file (file_handle=0x7fffb1caf210, type=8) at /data/website/php-7.3.1/ext/phar/phar.c:3344 #9 0x000055890e9c4bb1 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /data/website/php-7.3.1/Zend/zend.c:1562 #10 0x000055890e933f3f in php_execute_script (primary_file=0x7fffb1caf210) at /data/website/php-7.3.1/main/main.c:2630 #11 0x000055890ea97fd7 in do_cli (argc=2, argv=0x558911154ec0) at /data/website/php-7.3.1/sapi/cli/php_cli.c:997 #12 0x000055890ea98f4a in main (argc=2, argv=0x558911154ec0) at /data/website/php-7.3.1/sapi/cli/php_cli.c:1389 -- Edit bug report at https://bugs.php.net/bug.php?id=77498&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77498&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77498&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77498&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77498&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77498&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77498&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77498&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77498&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77498&r=support Expected behavior: https://bugs.php.net/fix.php?id=77498&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77498&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77498&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77498&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77498&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77498&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77498&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77498&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77498&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77498&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77498&r=mysqlcfg

« previous php.bugs (#219119) next »