MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000043XdebugUsage problems (Wrong Results)public2004-01-15 03:412004-03-16 23:35
Reporterhagiya 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000043: PHP-4.3.5RC1 crushes when used with xdebug.
DescriptionHello,

Starting from 4.3.5RC1, PHP (rightly?) calls tsrm_shutdown() when shutting down extension modules.
This change causes a crush problem just before the process termination, where TSRM tries to
shutdown extensinos like xdebug.

I tracked down the xdebug source code and found that if I change this line in xdeug.c
    ZEND_INIT_MODULE_GLOBALS(xdebug, php_xdebug_init_globals, php_xdebug_shutdown_globals);
to
    ZEND_INIT_MODULE_GLOBALS(xdebug, php_xdebug_init_globals, NULL);
then PHP can avoid the crush.

This might be a PHP problem rather than that of xdebug, but I have no clue.
Could you tell me some hints?

In PHP4.3.4, xdebug works pretty fine.
Thank you.

environment:
PHP4.3.5RC1 (win32 Release_Ts Build)
Additional InformationThe point of crush is line 162 of TSRM.c.
Below is the diff between 4.3.4 and 4.3.5RC1.

***************
*** 157,163 ****
(TSRM.c in PHP4.3.4)
                                int j;

                                next_p = p->next;
! for (j=0; j<id_count; j++) {
                                        free(p->storage[j]);
                                }
                                free(p->storage);
--- 157,166 ----
(TSRM.c in PHP4.3.5RC1)
                                int j;

                                next_p = p->next;
! for (j=0; j<p->count; j++) {
! if (resource_types_table && resource_types_table[j].dtor) {
! resource_types_table[j].dtor(p->storage[j], &p->storage); <-- Access Violation here !!!!!!!!!
! }
                                        free(p->storage[j]);
                                }
                                free(p->storage);
TagsNo tags attached.
Operating Systemwindow xp professional 2002
PHP Version4.3.5-dev
Attached Files

- Relationships

-  Notes
(0000094)
derick (administrator)
2004-01-15 20:01

I can't reproduce this... can you give me a short script to reproduce this?
(0000095)
hagiya (reporter)
2004-01-19 04:29

I'm sorry.
the check wasn't enough.

In original PHP4.3.5RC1, I can't also reproduce.
It seems that the cause added some patches for itself to PHP4.3.5RC1.

It contributes carefully after this.

Thank you for having you investigate.
(0000107)
derick (administrator)
2004-03-16 23:35

Wasn't an Xdebug after all.
Closing.

- Issue History
Date Modified Username Field Change
2004-01-15 03:41 hagiya New Issue
2004-01-15 20:01 derick Note Added: 0000094
2004-01-15 20:01 derick Status new => feedback
2004-01-19 04:29 hagiya Note Added: 0000095
2004-03-16 23:35 derick Status feedback => closed
2004-03-16 23:35 derick Note Added: 0000107
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker