php.net |  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
Votes:1
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
8 + 40 = ?
Subscribe to this entry?

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

When loading the extension we got a sigsev

Test script:
---------------
dl( 'php_gtk2.so' );

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-
5.4.8/Zend/zend_compile.c:6748
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-
5.4.8/Zend/zend_compile.c:6748
#1  0x00000000008342cc in do_register_internal_class 
(orig_class_entry=0x7fffffffa5d0, ce_flags=0, tsrm_ls=0x1b) at /src/build/php-
5.4.8/Zend/zend_API.c:2401
#2  0x00000000008345f0 in zend_register_internal_class 
(orig_class_entry=0x7fffffffa5d0, tsrm_ls=0x1b) at /src/build/php-
5.4.8/Zend/zend_API.c:2467
#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 
/src/build/php-gtk-121102/main/phpg_support.c:326
#5  0x00007fffef0d3685 in phpg_glade0_register_classes (tsrm_ls=0x1b) at 
ext/libglade/gen_libglade.c:513
#6  0x00007fffef0d36f4 in phpg_glade_register_classes (tsrm_ls=0x1b) at 
ext/libglade/gen_libglade.c:520
#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-
121102/main/php_gtk.c:271
#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 
main/php_gtk_ext.c:42
#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 
"php_gtk2.so", 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 "php_gtk2.so", 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-
5.4.8/Zend/zend_execute.c:1480
#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-
5.4.8/Zend/zend_vm_execute.h:644
#18 0x000000000087730a in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0x7ffff7f96d28, tsrm_ls=0xfbf090) at /src/build/php-
5.4.8/Zend/zend_vm_execute.h:2235
#19 0x000000000086ca40 in execute (op_array=0x11d36a0, tsrm_ls=0xfbf090) at 
/src/build/php-5.4.8/Zend/zend_vm_execute.h:410
#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-
5.4.8/sapi/cli/php_cli.c:1364


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-02 14:35 UTC] auroraeosrose@php.net
-Summary: SIGSEV on load php_gtk2.so +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] auroraeosrose@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

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 cairo.so and php_gtk2.so 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 &&
   make
3/ Yes i load it before

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

my libglade version is 2.6.4
 [2012-11-05 14:11 UTC] auroraeosrose@php.net
-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] auroraeosrose@php.net
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] auroraeosrose@php.net
-Assigned To: auroraeosrose +Assigned To: buhlerax
 [2016-10-23 15:58 UTC] buhlerax@php.net
-Status: Assigned +Status: Analyzed
 [2016-10-23 15:58 UTC] buhlerax@php.net
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] kalle@php.net
-Status: Analyzed +Status: Assigned
 [2017-10-24 07:22 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: buhlerax +Assigned To:
 [2017-10-24 23:13 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-10-24 23:13 UTC] kalle@php.net
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: Thu Apr 18 19:01:30 2024 UTC