php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45843 Collator::getLocale crash
Submitted: 2008-08-17 14:57 UTC Modified: 2008-09-16 01:00 UTC
From: felipensp at gmail dot com Assigned: stas (profile)
Status: No Feedback Package: I18N and L10N related
PHP Version: 5.3CVS-2008-08-17 (CVS) OS: FreeBSD
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: felipensp at gmail dot com
New email:
PHP Version: OS:

 

 [2008-08-17 14:57 UTC] felipensp at gmail dot com
Description:
------------
[felipe@PCBSD ~/php5]$ gdb -q sapi/cli/php
(gdb) r -r '$c = collator::create("EN-US-ODESSA"); 
var_dump($c->getLocale(Locale::VALID_LOCALE));'
Starting program: /usr/home/felipe/php5/sapi/cli/php -r '$c = 
collator::create("EN-US-ODESSA"); 
var_dump($c->getLocale(Locale::VALID_LOCALE));'
warning: Unable to get location for thread creation breakpoint: 
generic error
[New LWP 100136]
[New Thread 0xd4e000 (LWP 100136)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xd4e000 (LWP 100136)]
0x0000000000860215 in zend_object_store_get_object 
(zobject=0xd7b088, tsrm_ls=0x0) 
at /usr/home/felipe/php5/Zend/zend_objects_API.c:261
261             return 
EG(objects_store).object_buckets[handle].bucket.obj.object;
(gdb) bt
#0  0x0000000000860215 in zend_object_store_get_object 
(zobject=0xd7b088, tsrm_ls=0x0) 
at /usr/home/felipe/php5/Zend/zend_objects_API.c:261
#1  0x00000000005407c1 in zif_collator_get_locale (ht=1, 
return_value=0xd7b008, return_value_ptr=0x0, this_ptr=0xd7b088, 
return_value_used=1,
    tsrm_ls=0x0) 
at /usr/home/felipe/php5/ext/intl/collator/collator_locale.c:52
#2  0x0000000000863fe5 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x10e8088, tsrm_ls=0xd456c0) at zend_vm_execute.h:315
#3  0x000000000086516d in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER 
(execute_data=0x10e8088, tsrm_ls=0xd456c0) at zend_vm_execute.h:428
#4  0x0000000000862cdb in execute (op_array=0xd7bcc0, 
tsrm_ls=0xd456c0) at zend_vm_execute.h:104
#5  0x000000000081e1e8 in zend_eval_string (
    str=0x7fffffffea96 "$c = collator::create(\"EN-US-ODESSA\"); 
var_dump($c->getLocale(Locale::VALID_LOCALE));", retval_ptr=0x0,
    string_name=0xbcb87c "Command line code", tsrm_ls=0xd456c0) 
at /usr/home/felipe/php5/Zend/zend_execute_API.c:1112
#6  0x000000000081e410 in zend_eval_string_ex (
    str=0x7fffffffea96 "$c = collator::create(\"EN-US-ODESSA\"); 
var_dump($c->getLocale(Locale::VALID_LOCALE));", retval_ptr=0x0,
    string_name=0xbcb87c "Command line code", handle_exceptions=1, 
tsrm_ls=0xd456c0) 
at /usr/home/felipe/php5/Zend/zend_execute_API.c:1147
#7  0x00000000008d3853 in main (argc=3, argv=0x7fffffffe818) 
at /usr/home/felipe/php5/sapi/cli/php_cli.c:1169


Reproduce code:
---------------
Reproducible with:
ext/intl/tests/collator_create.phpt
ext/intl/tests/collator_get_locale.phpt


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-06 15:52 UTC] jani@php.net
Assigned to the ext/intl maintainer.
 [2008-09-08 20:10 UTC] stas@php.net
Couldn't reproduce on Linux with ICU 3.6. This place:

#1  0x00000000005407c1 in zif_collator_get_locale (ht=1, 
return_value=0xd7b008, return_value_ptr=0x0, this_ptr=0xd7b088, 
return_value_used=1,
    tsrm_ls=0x0) 
at /usr/home/felipe/php5/ext/intl/collator/collator_locale.c:52
#2  0x0000000000863fe5 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x10e8088, tsrm_ls=0xd456c0) at zend_vm_execute.h:315

looks strange - how comes tsrm_ls becomes 0? It's engine code, not extension code, so I'm afraid there's some problem in the build maybe? 
 [2008-09-16 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC