View Issue Details

IDProjectCategoryView StatusLast Update
0000043XdebugUncategorizedpublic2004-03-16 23:35
Reporterhagiya Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionopen 
Summary0000043: PHP-4.3.5RC1 crushes when used with xdebug.
Description

Hello,

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 Information

The 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

Activities

derick

2004-01-15 20:01

administrator   ~0000094

I can't reproduce this... can you give me a short script to reproduce this?

hagiya

2004-01-19 04:29

reporter   ~0000095

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.

derick

2004-03-16 23:35

administrator   ~0000107

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 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized