#35575 [Fbk]: gettext call segfaults with memory allocation error
| From: | tony2001@php.net | Date: | Tue, 06 Dec 2005 21:48:11 +0000 |
| Subject: | #35575 [Fbk]: gettext call segfaults with memory allocation error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-89851@lists.php.net to get a copy of this message | ||
ID: 35575
Updated by: tony2001@php.net
Reported By: tokul at users dot sourceforge dot net
Status: Feedback
Bug Type: Gettext related
Operating System: OpenBSD 3.8
PHP Version: 5CVS-2005-12-06 (snap)
New Comment:
JFYI: the reproduce script works perfectly fine on Linux and outputs:
Test
Previous Comments:
------------------------------------------------------------------------
[2005-12-06 22:41:39] tony2001@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
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.
------------------------------------------------------------------------
[2005-12-06 22:37:39] tokul at users dot sourceforge dot net
Description:
------------
If gettext extension manages to locate .mo file, script breaks with
memory allocation error.
php compiled with --disable-all --enable-cli --with-gettext
same error in 5.0.4 and 5.1.1.
do you need php.core file?
Reproduce code:
---------------
bindtextdomain('test','./');
textdomain('test');
setlocale(LC_ALL, 'ru_RU.UTF-8');
putenv('LC_ALL=ru_RU.UTF-8');
echo _("Test");
Expected result:
----------------
Test
Actual result:
--------------
tail of kdump
-----
15066 php CALL mmap(0,0x4395ef38,0x1,0x2,0x3,0,0,0)
15066 php RET mmap -1 errno 12 Cannot allocate memory
15066 php CALL mmap(0,0x4395f000,0x3,0x1002,0xffffffff,0,0,0)
15066 php RET mmap -1 errno 12 Cannot allocate memory
15066 php PSIG SIGSEGV SIG_DFL code 1 addr=0x58e64 trapno=1
15066 php NAMI "php.core"
-----
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35575&edit=1