[php-src] Issue #8064: imagettfbbox call causes Apache segfault
| From: | epsilot | Date: | Wed, 09 Feb 2022 14:24:44 +0000 |
| Subject: | [php-src] Issue #8064: imagettfbbox call causes Apache segfault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239584@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8064
Comment Author: epsilot
Unfortunately, we faced with segfault issue even for simple script. This is a little bit strange
since we haven't changed anything. Maybe the reason is that we have significantly higher server
load at the evening.
#### gdb core dump
```
Thread 1 (Thread 0x7fcdd793b880 (LWP 22238)):
#0 0x00007fcdbd200ddd in gdImageStringFTEx () from /lib64/libgd.so.103
No symbol table info available.
#1 0x00007fcdbd201c5b in gdImageStringFT () from /lib64/libgd.so.103
No symbol table info available.
#2 0x00007fcdd778c390 in php_imagettftext_common.isra.0 () from /usr/lib64/php/modules/gd.so
No symbol table info available.
#3 0x00007fcdca83b402 in execute_ex () from /etc/httpd/modules/libphp.so
No symbol table info available.
#4 0x00007fcdca8419bd in zend_execute () from /etc/httpd/modules/libphp.so
No symbol table info available.
#5 0x00007fcdca7d4560 in zend_execute_scripts () from /etc/httpd/modules/libphp.so
No symbol table info available.
#6 0x00007fcdca7701a1 in php_execute_script () from /etc/httpd/modules/libphp.so
No symbol table info available.
#7 0x00007fcdca8b7df8 in php_handler () from /etc/httpd/modules/libphp.so
No symbol table info available.
#8 0x0000561ea237ef40 in ap_run_handler ()
No symbol table info available.
#9 0x0000561ea237f489 in ap_invoke_handler ()
No symbol table info available.
#10 0x0000561ea23940da in ap_process_async_request ()
No symbol table info available.
#11 0x0000561ea23943c2 in ap_process_request ()
No symbol table info available.
#12 0x0000561ea2390552 in ap_process_http_connection ()
No symbol table info available.
#13 0x0000561ea2388570 in ap_run_process_connection ()
No symbol table info available.
#14 0x00007fcdcdfbf7ef in child_main () from /etc/httpd/modules/mod_mpm_prefork.so
No symbol table info available.
#15 0x00007fcdcdfbfa35 in make_child () from /etc/httpd/modules/mod_mpm_prefork.so
No symbol table info available.
#16 0x00007fcdcdfc06ce in prefork_run () from /etc/httpd/modules/mod_mpm_prefork.so
No symbol table info available.
#17 0x0000561ea236334e in ap_run_mpm ()
No symbol table info available.
#18 0x0000561ea235c0a6 in main ()
No symbol table info available.
```
> You may be able to work around that by [increasing the stack
> size](https://stackoverflow.com/questions/2279052/increase-stack-size-in-linux-with-setrlimit#2279099).
> It's at least worth a try, to verify that it is actually a stack overflow.
Thank you! We are going to try it tomorrow. I'll return with results.