[PHP-DEV] PHP 4.0 Bug #8429 Updated: erealloc() problem

2001-03-09 Thread sniper

ID: 8429
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: Class/Object related
Assigned To: 
Comments:

No feedback. 

Previous Comments:
---

[2001-02-04 13:07:40] [EMAIL PROTECTED]
Please include a gdb backtrace of the crash into this bug report.
Instructions can be found here:
http://bugs.php.net/bugs-generating-backtrace.php

Also, please include a SHORT script which can (without
any DB's or such) used to reproduce the crash.

--Jani


---

[2001-01-08 14:01:29] [EMAIL PROTECTED]
Could you produce minimal PHP code that reproduces the
problem? 1000 lines of DB-dependant application is pretty
hard to investigate. Also, do you have some non-standard PHP
modules in your application?

---

[2000-12-26 13:52:18] [EMAIL PROTECTED]
Under Linux, memory appears to be corrupted after Alarm object newed/ or call to 
DisplayObject function.  This is part of a large/complex script, around 1000 lines.

  Using BODY debugger, variables having weird stuff in them.  It is like the memory 
manager gets hosed.  I would be willing to give entire script/database configuration 
set to anyone.  The application is GPL'd.  I've got a sample database for MySQL that 
configures and loads as follows:
mysql mom1create.sql
mysql testdb.sql

the crash occurs with either of the following:
(command Line)
php mom.c

crash looks like this:

+++BRwalking TestActionArrayBR+++BR
BRBFunction==CheckTestActionResult(0,0) file /home/httpd/html/mom/momact.c line 
203/BBR
Key 0 not usedBR
BRBFunction==CheckTestActionResult(Object,2) file /home/httpd/html/mom/momact.c 
line 203/BBR
key 2 for object Object
BR---BR
For Object 'ActionResult ($ARValue)':BR
---BR
new action result!BR
Creating New Alarm Info ObjectBR
$Alarm was NOT setBR
---BR
For Object 'ActionResult':BR
---BR
FATAL:  erealloc():  Unable to allocate 1699901065 bytes   
88


(browser)
http://127.0.0.1/mom/mom.php


System is running 128 meg on linux.

  The objects's variables having weird stuff in them is shown in this printout:


printout of web page:
99

-defining debug in file /home/httpd/html/mom/mom.c at line 242

Function==MonitorMachines file /home/httpd/html/mom/momact.c line 334
walking MonitoredMachineArray

Function==RunTestAction(0, 0): file /home/httpd/html/mom/momact.c line 139

Function==RunTestAction(Object, 1): file /home/httpd/html/mom/momact.c line 139

Function==RunAction(2,1) file /home/httpd/html/mom/momact.c line 71
Running PHP Command String
$ExecString="echo 'Sendmail is being Tested
';return(SUCCESS);"
Sendmail is being Tested
$Result="1"
$TestActionResult["2"]=RunAction($ActionID,$MMKey)
$ActionID = 2
---
For Object 'TesActionResult':
ServiceID - 1
MonitoredMachineID - 1
Result - 1
---
+++
walking TestActionArray
+++

Function==CheckTestActionResult(0,0) file /home/httpd/html/mom/momact.c line 201
Key 0 not used

Function==CheckTestActionResult(Object,2) file /home/httpd/html/mom/momact.c line 201
key 2 for object Object 
---
For Object 'ActionResult ($ARValue)':
ServiceID - 1
MonitoredMachineID - 1
Result - 1
---
new action result!
Creating New Alarm Info Object
$Alarm was NOT set
---
For Object 'ActionResult':
ServiceID - 1
MonitoredMachineID - ActionResult
Result - 1
---
$ServiceID=1, $MachineID=D?  d[
ExitNow called from 264 in file /home/httpd/html/mom/momact.c

@@
function DisplayObject($Obj,$Name)// crash occurs even when obj //copied by not using 
 in front of $Obj parameter description
{
   echo "---BRn"; 
   echo "For Object '$Name':BRn";
   
   while ( list($key,$value) = each($Obj) )
  {  
  if (gettype($key) == "string")
 echo "$key - $valueBRn";
  }  
   echo "---BRn"; 
} 


function CheckTestActionResult($ARValue,$ARKey)
{
   global $MySQLConfig; // the mysql configurationinfo
   global $AlarmType;
   global $StatusType;
   global $Service;
   global $Alarm;
   global $LastActionResult;
   global $LastAlarm; 
   global $TestActionResult;

  if (defined("DEBUG"))
 

[PHP-DEV] PHP 4.0 Bug #8429 Updated: erealloc() problem

2001-02-04 Thread sniper

ID: 8429
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Class/Object related
Assigned To: 
Comments:

Please include a gdb backtrace of the crash into this bug report.
Instructions can be found here:
http://bugs.php.net/bugs-generating-backtrace.php

Also, please include a SHORT script which can (without
any DB's or such) used to reproduce the crash.

--Jani


Previous Comments:
---

[2001-01-08 14:01:29] [EMAIL PROTECTED]
Could you produce minimal PHP code that reproduces the
problem? 1000 lines of DB-dependant application is pretty
hard to investigate. Also, do you have some non-standard PHP
modules in your application?

---

[2000-12-26 13:52:18] [EMAIL PROTECTED]
Under Linux, memory appears to be corrupted after Alarm object newed/ or call to 
DisplayObject function.  This is part of a large/complex script, around 1000 lines.

  Using BODY debugger, variables having weird stuff in them.  It is like the memory 
manager gets hosed.  I would be willing to give entire script/database configuration 
set to anyone.  The application is GPL'd.  I've got a sample database for MySQL that 
configures and loads as follows:
mysql mom1create.sql
mysql testdb.sql

the crash occurs with either of the following:
(command Line)
php mom.c

crash looks like this:

+++BRwalking TestActionArrayBR+++BR
BRBFunction==CheckTestActionResult(0,0) file /home/httpd/html/mom/momact.c line 
203/BBR
Key 0 not usedBR
BRBFunction==CheckTestActionResult(Object,2) file /home/httpd/html/mom/momact.c 
line 203/BBR
key 2 for object Object
BR---BR
For Object 'ActionResult ($ARValue)':BR
---BR
new action result!BR
Creating New Alarm Info ObjectBR
$Alarm was NOT setBR
---BR
For Object 'ActionResult':BR
---BR
FATAL:  erealloc():  Unable to allocate 1699901065 bytes   
88


(browser)
http://127.0.0.1/mom/mom.php


System is running 128 meg on linux.

  The objects's variables having weird stuff in them is shown in this printout:


printout of web page:
99

-defining debug in file /home/httpd/html/mom/mom.c at line 242

Function==MonitorMachines file /home/httpd/html/mom/momact.c line 334
walking MonitoredMachineArray

Function==RunTestAction(0, 0): file /home/httpd/html/mom/momact.c line 139

Function==RunTestAction(Object, 1): file /home/httpd/html/mom/momact.c line 139

Function==RunAction(2,1) file /home/httpd/html/mom/momact.c line 71
Running PHP Command String
$ExecString="echo 'Sendmail is being Tested
';return(SUCCESS);"
Sendmail is being Tested
$Result="1"
$TestActionResult["2"]=RunAction($ActionID,$MMKey)
$ActionID = 2
---
For Object 'TesActionResult':
ServiceID - 1
MonitoredMachineID - 1
Result - 1
---
+++
walking TestActionArray
+++

Function==CheckTestActionResult(0,0) file /home/httpd/html/mom/momact.c line 201
Key 0 not used

Function==CheckTestActionResult(Object,2) file /home/httpd/html/mom/momact.c line 201
key 2 for object Object 
---
For Object 'ActionResult ($ARValue)':
ServiceID - 1
MonitoredMachineID - 1
Result - 1
---
new action result!
Creating New Alarm Info Object
$Alarm was NOT set
---
For Object 'ActionResult':
ServiceID - 1
MonitoredMachineID - ActionResult
Result - 1
---
$ServiceID=1, $MachineID=D?  d[
ExitNow called from 264 in file /home/httpd/html/mom/momact.c

@@
function DisplayObject($Obj,$Name)// crash occurs even when obj //copied by not using 
 in front of $Obj parameter description
{
   echo "---BRn"; 
   echo "For Object '$Name':BRn";
   
   while ( list($key,$value) = each($Obj) )
  {  
  if (gettype($key) == "string")
 echo "$key - $valueBRn";
  }  
   echo "---BRn"; 
} 


function CheckTestActionResult($ARValue,$ARKey)
{
   global $MySQLConfig; // the mysql configurationinfo
   global $AlarmType;
   global $StatusType;
   global $Service;
   global $Alarm;
   global $LastActionResult;
   global $LastAlarm; 
   global $TestActionResult;

  if (defined("DEBUG"))
 print("BRBFunction==CheckTestActionResult($ARValue,$ARKey) file ".__FILE__." 
line ".__LINE__."/BBRn"); 
  
  if ($ARKey == 0)
   {
   if (defined("DEBUG"))
  echo "Key 0 not