php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40817 gettext crash with an old (from php5.1.4/netbsd3) .mo file
Submitted: 2007-03-15 11:08 UTC Modified: 2007-03-15 15:34 UTC
From: loic dot hoguin at diplomatie dot gouv dot fr Assigned:
Status: Not a bug Package: Gettext related
PHP Version: 5.2.1 OS: NetBSD 4.0.2_BETA2
Private report: No CVE-ID: None
 [2007-03-15 11:08 UTC] loic dot hoguin at diplomatie dot gouv dot fr
Description:
------------
Apache child process crashed when using a messages.mo file which was generated on november 2006. Rebuilding the file fixed the problem, so maybe the file was malformed ; however, gettext should not crash the process if the file is bad.

NetBSD 4.0_BETA2
Apache 2.0.59
PHP 5.2.1

It was on a fresh install on a new server.

The php.ini had just the extensions added and the error messages display deactivated.


[PHP Modules]
ctype, curl, date, filter, gd, gettext, hash, libxml, mbstring, mysql, openssl, pcre, pgsql, Reflection, session, SimpleXML, SPL, standard, tokenizer, xml, xmlreader, xmlwriter, zlib

configure: --with-regex=system --without-mysql --without-sqlite --without-iconv --disable-posix --disable-dom --disable-pdo --disable-json --enable-xml

I also have a messages.mo which crash the process.

Expected result:
----------------
An error instead of a crash.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-15 12:35 UTC] mike@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2007-03-15 14:55 UTC] loic dot hoguin at diplomatie dot gouv dot fr
Here's the backtrace. Sorry I can't activate the debug mode right now.

(gdb) bt
#0  0x00007f7ffc6af381 in _citrus_memory_stream_getln ()
   from /usr/lib/libc.so.12
#1  0x00007f7ffb1058f0 in _gettext_parse_plural () from /usr/lib/libintl.so.0
#2  0x00007f7ffb1046b6 in dcngettext () from /usr/lib/libintl.so.0
#3  0x00007f7ffa701630 in zif_gettext ()
   from /usr/pkg/lib/php/20040412/gettext.so

Tell me if you need something else.
 [2007-03-15 15:34 UTC] tony2001@php.net
The backtrace clearly shows that the problem is not in PHP.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Aug 11 00:01:26 2020 UTC