|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-07-01 05:33 UTC] info at tcknetwork dot com
Description:
------------
Using the native PHP from OpenBSD 4.1
PHP 5.1.6 with Suoshin-Patch 0.9.5 / BCompiler 0.8
At the end of the script, the destruction of the class prototype seems to generate one error (catched by Suoshin patch).
This error is apparently sent only when freeing memory of the script
Reproduce code:
---------------
First test :
--------------------------------
test.php, bcompiled
<? class test {} ?>
called with the console (produces more output)
# php test.php
Second test :
--------------------------------
test.php, bcompiled
<?
class test {
function test() { echo "1"; }
function __destruct() { echo "2"; }
}
$t=new test(); $t->test(); unset($t); echo "3";
?>
test2.php, plain :
<? include("test.php"); echo "4"; ?>
# php test2.php
Expected result:
----------------
First test :
--------------------------------
- Nothing should appear
- Return value should be 0
Second test :
--------------------------------
2nd test :
- Output="11234"
- Return=0
Actual result:
--------------
First test :
--------------------------------
- Display Suoshin-patch error message :
"ALERT - possible memory corruption detected - unknown Hashtable destructor"
- return value = 1 (due to suoshin patch)
Second test :
--------------------------------
- Output="11234ALERT - possible memory corruption..."
- Return=1
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
I'm getting the same error ("ALERT - possible memory corruption detected - unknown Hashtable destructor") when using pecl-mailparse-2.1.5 on FreeBSD 7.1 together with php-5.2.9 and Suhosin-patch. What triggers the error is mailparse_msg_get_part($mime_resource, $structure_part)Try adding this code to 504:php_bcompiler_init_globals() #ifdef ZEND_ENGINE_2 HashTable* ht = NULL; zend_hash_init( ht, 0, NULL, &zend_destroy_property_info, 0) ); #endifI think you mean #ifdef ZEND_ENGINE_2 HashTable ht; zend_hash_init( &ht, 0, NULL, (dtor_func_t)&zend_destroy_property_info, 0) ); #endif