Bug #74124 [NEW]: Seg fault when running code using the ps (postscript) extension

From: Date: Sat, 18 Feb 2017 19:54:03 +0000
Subject: Bug #74124 [NEW]: Seg fault when running code using the ps (postscript) extension
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207438@lists.php.net to get a copy of this message
From: ian at gumstix dot com Operating system: Xubuntu 16.04.2 PHP version: 7.1.2 Package: Reproducible crash Bug Type: Bug Bug description:Seg fault when running code using the ps (postscript) extension Description: ------------ When running the unit test for my application, some code that uses the ps PECL extension crashes with a seg fault. gdb backtrace is below. Test script: --------------- The code that generates the error is proprietary, and I don't have a test script yet that will produce the error. I'll update the bug if I manage to get one. Actual result: -------------- (gdb) run vendor/bin/phpunit path/to/my/directory Starting program: /usr/bin/php vendor/bin/phpunit path/to/my/directory [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". PHPUnit 4.8.35 by Sebastian Bergmann and contributors. ... Program received signal SIGSEGV, Segmentation fault. zend_mm_alloc_small (bin_num=<optimized out>, size=<optimized out>, heap=0x7ffff3800040) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_alloc.c:1261 1261 /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_alloc.c: No such file or directory. (gdb) backtrace #0 zend_mm_alloc_small (bin_num=<optimized out>, size=<optimized out>, heap=0x7ffff3800040) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_alloc.c:1261 #1 zend_mm_alloc_heap (size=<optimized out>, heap=0x7ffff3800040) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_alloc.c:1332 #2 _emalloc (size=<optimized out>) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_alloc.c:2417 #3 0x000055555579b89d in _safe_emalloc (nmemb=nmemb@entry=24, size=<optimized out>, offset=offset@entry=0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_alloc.c:2472 #4 0x00005555557a4aec in zend_compile_params (ast=ast@entry=0x7fffdcfd2578, return_type_ast=return_type_ast@entry=0x0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:5118 #5 0x00005555557acaaf in zend_compile_func_decl (result=result@entry=0x0, ast=ast@entry=0x7fffdcfd36b8) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:5619 #6 0x00005555557abc7a in zend_compile_stmt (ast=0x7fffdcfd36b8) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:7838 #7 0x00005555557ac757 in zend_compile_stmt_list (ast=ast@entry=0x7fffdcfd1860) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:5022 #8 0x00005555557abb46 in zend_compile_stmt (ast=ast@entry=0x7fffdcfd1860) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:7782 #9 0x00005555557ab2a9 in zend_compile_class_decl (ast=ast@entry=0x7fffdcfd3700) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:6029 #10 0x00005555557abc88 in zend_compile_stmt (ast=ast@entry=0x7fffdcfd3700) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:7850 #11 0x00005555557ae3fa in zend_compile_top_stmt (ast=0x7fffdcfd3700) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:7756 #12 0x00005555557ae43f in zend_compile_top_stmt (ast=0x7fffdcfd1018) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_compile.c:7751 #13 0x0000555555785ecd in zend_compile (type=type@entry=2) at Zend/zend_language_scanner.l:601 #14 0x0000555555787376 in compile_file (file_handle=0x7fffffff95a0, type=2) at Zend/zend_language_scanner.l:635 #15 0x00007fffea09a3d8 in ?? () from /usr/lib/php/20160303/phar.so #16 0x00007ffff32d12ac in ?? () from /usr/lib/php/20160303/opcache.so #17 0x00007ffff32d32a9 in persistent_compile_file () from /usr/lib/php/20160303/opcache.so #18 0x000055555578756b in compile_filename (type=type@entry=2, filename=filename@entry=0x7ffff3814510) at Zend/zend_language_scanner.l:662 #19 0x00005555558259ea in zend_include_or_eval (inc_filename=0x7ffff3814510, type=2) ---Type <return> to continue, or q <return> to quit--- at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute.c:2846 #20 0x000055555585fbcf in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER () at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:35461 #21 0x000055555580ac1b in execute_ex (ex=<optimized out>) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:429 #22 0x00005555557b1d4f in zend_call_function (fci=fci@entry=0x7fffffff98e0, fci_cache=<optimized out>, fci_cache@entry=0x7fffffff98b0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:828 #23 0x00005555557dfaa9 in zend_call_method (object=0x7ffff38c7818, obj_ce=<optimized out>, fn_proxy=<optimized out>, function_name=0x7ffff38d6f68 "composer\\autoload\\classloader::loadclass\001", function_name_len=<optimized out>, retval_ptr=retval_ptr@entry=0x0, param_count=1, arg1=0x7ffff3814420, arg2=0x0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_interfaces.c:101 #24 0x00005555556bdbae in zif_spl_autoload_call (execute_data=<optimized out>, return_value=<optimized out>) at /build/php7.1-jn_ZrU/php7.1-7.1.2/ext/spl/php_spl.c:420 #25 0x00005555557b1c4b in zend_call_function (fci=fci@entry=0x7fffffff9b80, fci_cache=<optimized out>, fci_cache@entry=0x7fffffff9b50) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:842 #26 0x00005555557b22a1 in zend_lookup_class_ex (name=name@entry=0x7fffddb26950, key=0x7fffde9b18a8, use_autoload=use_autoload@entry=1) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:1001 #27 0x00005555557b2c58 in zend_fetch_class_by_name (class_name=0x7fffddb26950, key=<optimized out>, fetch_type=0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:1436 #28 0x000055555580f779 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER () at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:2096 #29 0x000055555580ac1b in execute_ex (ex=<optimized out>) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:429 #30 0x00005555557b1d4f in zend_call_function (fci=fci@entry=0x7fffffff9dd0, fci_cache=<optimized out>, fci_cache@entry=0x7fffffff9da0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:828 #31 0x00005555557dfaa9 in zend_call_method (object=0x7ffff38c7818, obj_ce=<optimized out>, fn_proxy=<optimized out>, function_name=0x7ffff38d6f68 "composer\\autoload\\classloader::loadclass\001", function_name_len=<optimized out>, retval_ptr=retval_ptr@entry=0x0, param_count=1, arg1=0x7ffff3814270, arg2=0x0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_interfaces.c:101 #32 0x00005555556bdbae in zif_spl_autoload_call (execute_data=<optimized out>, return_value=<optimized out>) at /build/php7.1-jn_ZrU/php7.1-7.1.2/ext/spl/php_spl.c:420 #33 0x00005555557b1c4b in zend_call_function (fci=fci@entry=0x7fffffffa070, fci_cache=<optimized out>, fci_cache@entry=0x7fffffffa040) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:842 ---Type <return> to continue, or q <return> to quit--- #34 0x00005555557b22a1 in zend_lookup_class_ex (name=name@entry=0x7fffdcc74410, key=0x7fffdcd39870, use_autoload=use_autoload@entry=1) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:1001 #35 0x00005555557b2c58 in zend_fetch_class_by_name (class_name=0x7fffdcc74410, key=<optimized out>, fetch_type=fetch_type@entry=512) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:1436 #36 0x0000555555860cf7 in ZEND_NEW_SPEC_CONST_HANDLER () at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:3199 #37 0x000055555580ac1b in execute_ex (ex=<optimized out>) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:429 #38 0x00005555557b1d4f in zend_call_function (fci=fci@entry=0x7fffffffa2f0, fci_cache=<optimized out>, fci_cache@entry=0x7fffffffa2c0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_execute_API.c:828 #39 0x00005555556a8c64 in reflection_method_invoke (execute_data=<optimized out>, return_value=0x7ffff3813cb0, variadic=<optimized out>) at /build/php7.1-jn_ZrU/php7.1-7.1.2/ext/reflection/php_reflection.c:3325 #40 0x00005555558635dc in ZEND_DO_FCALL_SPEC_RETVAL_USED_HANDLER () at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:1097 #41 0x000055555580ac1b in execute_ex (ex=<optimized out>) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:429 #42 0x0000555555865a60 in zend_execute (op_array=0x7ffff3884000, op_array@entry=0x7fffde3dcc80, return_value=return_value@entry=0x7ffff3813bf0) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend_vm_execute.h:474 #43 0x00005555557c1723 in zend_execute_scripts (type=type@entry=8, retval=0x7ffff3813bf0, retval@entry=0x0, file_count=file_count@entry=3) at /build/php7.1-jn_ZrU/php7.1-7.1.2/Zend/zend.c:1475 #44 0x000055555575e520 in php_execute_script (primary_file=0x7fffffffc960) at /build/php7.1-jn_ZrU/php7.1-7.1.2/main/main.c:2537 #45 0x0000555555867ce7 in do_cli (argc=3, argv=0x555555bdf440) at /build/php7.1-jn_ZrU/php7.1-7.1.2/sapi/cli/php_cli.c:993 #46 0x000055555563a92c in main (argc=3, argv=0x555555bdf440) at /build/php7.1-jn_ZrU/php7.1-7.1.2/sapi/cli/php_cli.c:1381 -- Edit bug report at https://bugs.php.net/bug.php?id=74124&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74124&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74124&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74124&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74124&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74124&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74124&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74124&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74124&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74124&r=support Expected behavior: https://bugs.php.net/fix.php?id=74124&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74124&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74124&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74124&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74124&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74124&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74124&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74124&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74124&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74124&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74124&r=mysqlcfg

« previous php.bugs (#207438) next »