|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45943 php5-cgi crashes when changing gettext (*.mo) file
Submitted: 2008-08-29 01:11 UTC Modified: 2008-08-30 23:32 UTC
From: atomo64 at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.6 OS: Debian GNU/Linux
Private report: No CVE-ID: None
 [2008-08-29 01:11 UTC] atomo64 at gmail dot com
[This is]

Whenever the templates/translations are changed and the .mo files regenerated, PHP instances start to crash. Most likely they do not detect file change and still treate it as old one. Restarting PHP solves this.

Actual result:
#0  0x00007fdf99718f81 in ?? () from /lib/
#1  0x00007fdf9971a0e6 in ?? () from /lib/
#2  0x00000000004c75b0 in zif_gettext (ht=17334608, return_value=0x10877d8, return_value_ptr=0xe61230, this_ptr=0xffffffff, return_value_used=-16843009)
    at /tmp/buildd/php5-5.2.6/ext/gettext/gettext.c:192
#3  0x00007fdf9596f90d in ?? () from /usr/lib/php5/20060613/
#4  0x00000000006a0059 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffa3f7e3e0) at /tmp/buildd/php5-5.2.6/Zend/zend_vm_execute.h:202
#5  0x000000000068b8c4 in execute (op_array=0x1074d58) at /tmp/buildd/php5-5.2.6/Zend/zend_vm_execute.h:92
#6  0x00007fdf9596fd96 in ?? () from /usr/lib/php5/20060613/
#7  0x0000000000667678 in zend_execute_scripts (type=32767, retval=0x0, file_count=-1544034840) at /tmp/buildd/php5-5.2.6/Zend/zend.c:1215
#8  0x0000000000621fa8 in php_execute_script (primary_file=Cannot access memory at address 0x8000a3f7d550
) at /tmp/buildd/php5-5.2.6/main/main.c:2026
#9  0x00000000006df7ed in main (argc=-1544016504, argv=0x7fffa3f80980) at /tmp/buildd/php5-5.2.6/sapi/cgi/cgi_main.c:1927

(I know suhosin is there, but it is irrelevant as the bug report was originally reported with a version of Debian's php5 package which was not built with suhosin).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-30 23:32 UTC]
That's actually bug in gettext itself. And actually "feature". It was never meant to support changing the .mo file during runtime. We can't do anything in PHP to prevent the crash, unless there's some support from gettext itself to allow this..
 [2017-01-17 10:22 UTC] michal at cihar dot com
BTW: There is quite simple testcase in the Debian BTS:

(Used as the original links get corrupted here as it's too long)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 04:01:24 2021 UTC