#45843 [Asn->Fbk]: Collator::getLocale crash

From: Date: Mon, 08 Sep 2008 20:10:40 +0000
Subject: #45843 [Asn->Fbk]: Collator::getLocale crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-128782@lists.php.net to get a copy of this message
ID: 45843 Updated by: stas@php.net Reported By: felipensp at gmail dot com -Status: Assigned +Status: Feedback Bug Type: I18N and L10N related Operating System: FreeBSD PHP Version: 5.3CVS-2008-08-17 (CVS) Assigned To: stas New Comment: 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? Previous Comments: ------------------------------------------------------------------------ [2008-09-06 15:52:01] jani@php.net Assigned to the ext/intl maintainer. ------------------------------------------------------------------------ [2008-08-17 14:57:20] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45843&edit=1

« previous php.bugs (#128782) next »