|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63420 PHP-GTK crashes when loading glade extension
Submitted: 2012-11-02 12:48 UTC Modified: 2017-10-24 23:13 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: nikodu01 at live dot fr Assigned:
Status: Suspended Package: PHP-GTK related
PHP Version: Irrelevant OS: Ubuntu 11.10
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-11-02 12:48 UTC] nikodu01 at live dot fr
Version : PHP 5.4.8 & PHP-GTK Git

When loading the extension we got a sigsev

Test script:
dl( '' );

Expected result:
Load library 

Actual result:
Program received signal SIGSEGV, Segmentation fault.
0x000000000080c5dd in zend_initialize_class_data (ce=0x1b0fcc0, 
nullify_handlers=0 '\000', tsrm_ls=0x1b) at /src/build/php-
6748			int n = zend_hash_num_elements(CG(class_table));
(gdb) bt
#0  0x000000000080c5dd in zend_initialize_class_data (ce=0x1b0fcc0, 
nullify_handlers=0 '\000', tsrm_ls=0x1b) at /src/build/php-
#1  0x00000000008342cc in do_register_internal_class 
(orig_class_entry=0x7fffffffa5d0, ce_flags=0, tsrm_ls=0x1b) at /src/build/php-
#2  0x00000000008345f0 in zend_register_internal_class 
(orig_class_entry=0x7fffffffa5d0, tsrm_ls=0x1b) at /src/build/php-
#3  0x0000000000834494 in zend_register_internal_class_ex 
(class_entry=0x7fffffffa5d0, parent_ce=0x0, parent_name=0x0, tsrm_ls=0x1b)
    at /src/build/php-5.4.8/Zend/zend_API.c:2439
#4  0x00007fffef0d4da8 in phpg_register_class (class_name=0x7fffef1028b7 
"Glade", class_methods=0x7fffef38e280 <glade_methods>, parent=0x0, ce_flags=0, 
    prop_info=0x0, create_obj_func=0x0, gtype=0, tsrm_ls=0x1b) at 
#5  0x00007fffef0d3685 in phpg_glade0_register_classes (tsrm_ls=0x1b) at 
#6  0x00007fffef0d36f4 in phpg_glade_register_classes (tsrm_ls=0x1b) at 
#7  0x00007fffef0d2050 in php_gtk_xinit_libglade (module_number=27, 
tsrm_ls=0xfbf090) at /src/build/php-gtk-121102/./ext/libglade/php_libglade.c:33
#8  0x00007fffef0d3d89 in php_gtk_startup_extension (ext=0x7fffef38e240 
<libglade_ext_entry>, module_number=27) at /src/build/php-gtk-
#9  0x00007fffef0d3e5b in php_gtk_startup_extensions (ext=0x7fffef38eb78 
<php_gtk_extensions+8>, ext_count=2, module_number=27)
    at /src/build/php-gtk-121102/main/php_gtk.c:293
#10 0x00007fffef0e6b84 in php_gtk_startup_all_extensions (module_number=27) at 
#11 0x00007fffef0d3b40 in zm_activate_gtk (type=2, module_number=27, 
tsrm_ls=0xfbf090) at /src/build/php-gtk-121102/main/php_gtk.c:211
#12 0x000000000069b3f4 in php_load_extension (filename=0x7ffff7e8d550 
"", type=2, start_now=0, tsrm_ls=0xfbf090)
    at /src/build/php-5.4.8/ext/standard/dl.c:248
#13 0x000000000069b46e in php_dl (file=0x7ffff7e8d550 "", type=2, 
return_value=0x7ffff7eb0bd8, start_now=0, tsrm_ls=0xfbf090)
    at /src/build/php-5.4.8/ext/standard/dl.c:263
#14 0x000000000069af40 in zif_dl (ht=1, return_value=0x7ffff7eb0bd8, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0, tsrm_ls=0xfbf090)
    at /src/build/php-5.4.8/ext/standard/dl.c:85
#15 0x000000000086c289 in execute_internal (execute_data_ptr=0x7ffff7f96d28, 
return_value_used=0, tsrm_ls=0xfbf090) at /src/build/php-
#16 0x00000000005466b6 in atlunix_zend_execute_internal 
(execute_data_ptr=0x7ffff7f96d28, return_value_used=0, tsrm_ls=0xfbf090)
    at /src/build/php-5.4.8/ext/atlunix/main/atlunix.c:404
#17 0x000000000086ea87 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7ffff7f96d28, tsrm_ls=0xfbf090) at /src/build/php-
#18 0x000000000087730a in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0x7ffff7f96d28, tsrm_ls=0xfbf090) at /src/build/php-
#19 0x000000000086ca40 in execute (op_array=0x11d36a0, tsrm_ls=0xfbf090) at 
#20 0x000000000082a79c in zend_execute_scripts (type=8, tsrm_ls=0xfbf090, 
retval=0x0, file_count=3) at /src/build/php-5.4.8/Zend/zend.c:1309
#21 0x0000000000779e66 in php_execute_script (primary_file=0x7fffffffe430, 
tsrm_ls=0xfbf090) at /src/build/php-5.4.8/main/main.c:2482
#22 0x0000000000992a12 in do_cli (argc=2, argv=0x7fffffffe7e8, tsrm_ls=0xfbf090) 
at /src/build/php-5.4.8/sapi/cli/php_cli.c:988
#23 0x0000000000993ced in main (argc=2, argv=0x7fffffffe7e8) at /src/build/php-


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-02 14:35 UTC]
-Summary: SIGSEV on load +Summary: PHP Execution doesn't terminate when using circular references and mnemonics -Status: Open +Status: Feedback -Operating System: Linux / PHP 5.4.8 / PHP-GTK Git +Operating System: Ubuntu 11.10 -PHP Version: 5.3.18 +PHP Version: Irrelevant
 [2012-11-02 14:35 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

1. Does this also segfault when you load it via an ini file?
2. This appears to be having issues when attempting to load the glade php-gtk extension, is that in an ini file?  Or did you compile it statically into php-gtk?
3. the PECL cairo extension IS a required dependency of php-gtk - did you load that before you attempted to load php-gtk?  PHP should be angry if you don't do that instead of segfaulting - but just checking to see what exactly is making this blow up
 [2012-11-03 09:18 UTC] nikodu01 at live dot fr
-Status: Feedback +Status: Open
 [2012-11-03 09:18 UTC] nikodu01 at live dot fr
1/ I have put and in the ini file and always crash
2/ I don't specify to use liglade i just compile php-gtk with this :
   ./buildconf &&
   ./configure --prefix=/usr &&
3/ Yes i load it before

I made different try and compiling php-gtk with ./configure --prefix=/usr --
don't crash anymore

my libglade version is 2.6.4
 [2012-11-05 14:11 UTC]
-Summary: PHP Execution doesn't terminate when using circular references and mnemonics +Summary: PHP-GTK crashes when loading glade extension -Assigned To: +Assigned To: auroraeosrose
 [2012-11-05 14:11 UTC]
So this is actually a bug with the php-gtk glade extension and loading

I'll take a look but it's not a high priority since libglade is deprecated - I would suggest you try migrating any glade code to gtkbuilder on any existing projects
 [2016-10-16 17:17 UTC]
-Assigned To: auroraeosrose +Assigned To: buhlerax
 [2016-10-23 15:58 UTC]
-Status: Assigned +Status: Analyzed
 [2016-10-23 15:58 UTC]
The 2.0.1 version of php-gtk will no longer fixes.
We will work on version 3 of the php-gtk with gtk 3.
 [2017-10-24 05:46 UTC]
-Status: Analyzed +Status: Assigned
 [2017-10-24 07:22 UTC]
-Status: Assigned +Status: Open -Assigned To: buhlerax +Assigned To:
 [2017-10-24 23:13 UTC]
-Status: Open +Status: Suspended
 [2017-10-24 23:13 UTC]
I'm gonna suspend this report as the PHP GTK project activity seems halted, if the activity picks backup for the project then this report should be re-opened.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 22:01:28 2024 UTC