#32252 [Asn]: Segfault when offsetSet throws an Exception (only without debug)

2005-05-11 Thread shulmanb at il dot ibm dot com
 ID:   32252
 User updated by:  shulmanb at il dot ibm dot com
 Reported By:  shulmanb at il dot ibm dot com
 Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5.*
 Assigned To:  helly
 New Comment:

Tested with the latest snapshot (200505110630) on Windows XP, and it is
still crashing.


Previous Comments:


[2005-05-03 14:55:02] [EMAIL PROTECTED]

Runs in php 5.1 now.



[2005-03-13 19:22:42] [EMAIL PROTECTED]

Related to http://bugs.php.net/30346



[2005-03-09 15:13:34] [EMAIL PROTECTED]

The first problem here is that the negative key results in incomplete
initialized zvals internally *before* even calling offsetSet().



[2005-03-09 14:38:38] shulmanb at il dot ibm dot com

Description:

In some cases, when offsetSet throws an exception a segfault occurs.

This does not happen when compiled with --enable-debug.

Note that if the index passed to $list is positive or a string, not
segfault occurs.

Reproduce code:
---
class a implements ArrayAccess
{
function offsetExists ($offset) { return false; }
function offsetGet ($offset) { return null; }
function offsetSet ($offset, $value) { throw new Exception ("Ooops");
}
function offsetUnset ($offset) {}
}
function test()
{
$list = new a();
try {
$list[-1] = 123;
} catch (Exception $e) { }
return true;
}
print test();


Expected result:

The output should be "1".

Actual result:
--
Segmentation fault.

The stack trace reported in Visual Studio, using the latest snapshot
and debug pack is:

php5ts.dll!shutdown_memory_manager(int silent=0, int full_shutdown=0,
void * * * tsrm_ls=0x00364b38)  Line 490 + 0xb  C
php5ts.dll!php_request_shutdown(void * dummy=0x)  Line 1225 +
0x2fC
msvcrt.dll!77c37bbe()   
user32.dll!77d5f160()   






-- 
Edit this bug report at http://bugs.php.net/?id=32252&edit=1


#32252 [Asn]: Segfault when offsetSet throws an Exception (only without debug)

2005-05-04 Thread helly
 ID:   32252
 Updated by:   [EMAIL PROTECTED]
 Reported By:  shulmanb at il dot ibm dot com
 Status:   Assigned
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5.*
 Assigned To:  helly
 New Comment:

Runs in php 5.1 now.


Previous Comments:


[2005-03-13 19:22:42] [EMAIL PROTECTED]

Related to http://bugs.php.net/30346



[2005-03-09 15:13:34] [EMAIL PROTECTED]

The first problem here is that the negative key results in incomplete
initialized zvals internally *before* even calling offsetSet().



[2005-03-09 14:38:38] shulmanb at il dot ibm dot com

Description:

In some cases, when offsetSet throws an exception a segfault occurs.

This does not happen when compiled with --enable-debug.

Note that if the index passed to $list is positive or a string, not
segfault occurs.

Reproduce code:
---
class a implements ArrayAccess
{
function offsetExists ($offset) { return false; }
function offsetGet ($offset) { return null; }
function offsetSet ($offset, $value) { throw new Exception ("Ooops");
}
function offsetUnset ($offset) {}
}
function test()
{
$list = new a();
try {
$list[-1] = 123;
} catch (Exception $e) { }
return true;
}
print test();


Expected result:

The output should be "1".

Actual result:
--
Segmentation fault.

The stack trace reported in Visual Studio, using the latest snapshot
and debug pack is:

php5ts.dll!shutdown_memory_manager(int silent=0, int full_shutdown=0,
void * * * tsrm_ls=0x00364b38)  Line 490 + 0xb  C
php5ts.dll!php_request_shutdown(void * dummy=0x)  Line 1225 +
0x2fC
msvcrt.dll!77c37bbe()   
user32.dll!77d5f160()   






-- 
Edit this bug report at http://bugs.php.net/?id=32252&edit=1