[PHP-DEV] PHP 4.0 Bug #9197 Updated: crash in _efree

2001-02-12 Thread dbenson

ID: 9197
User Update by: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: Reproduceable crash
Bug Type: OCI8 related
Description: crash in _efree

Included is a short script that reproduces the problem

%
$Conn = OCINLogon ('vignette', 'vignette', 'wom_dev');

$Stmt = OCIParse ($Conn, "
select xml
  from extra_info
 where item_id = '6E1DB91CF3474384E034080020B33146'");
$Clob = OCINewDescriptor ($Conn, OCI_D_LOB);
OCIExecute ($Stmt);
$nrows = OCIFetchStatement ($Stmt, $rs);
print_r ($rs);


$Stmt = OCIParse ($Conn, "
select xml
  from extra_info
 where item_id = '6E1DB91CF0654384E034080020B33146'");
$Clob = OCINewDescriptor ($Conn, OCI_D_LOB);
OCIExecute ($Stmt);
$nrows = OCIFetchStatement ($Stmt, $rs);
print_r ($rs);
while (OCIFetch ($Stmt)) {
$Clob = OCIResult ($Stmt, 'XML');
}
$ExtraXML = @$Clob-load();
%

Previous Comments:
---

[2001-02-09 16:45:19] [EMAIL PROTECTED]
Getting periodic crashes in some of my templates. Crash is reproduceable using cgi or 
apache builds. Crash also occurs under solaris 2.7. Backtrace is from Linux RedHat 7.0

211 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x80aaa14 in _efree (ptr=0x735740) at zend_alloc.c:211
#1  0x80b53bf in _zval_dtor (zvalue=0x81a44fc) at zend_variables.c:62
#2  0x80af555 in _zval_ptr_dtor (zval_ptr=0x81dd818) at zend_execute_API.c:261
#3  0x80b9198 in zend_hash_clean (ht=0x8153124) at zend_hash.c:590
#4  0x80d30b0 in execute (op_array=0x814e504) at ./zend_execute.c:1575
#5  0x80b637d in zend_execute_scripts (type=8, file_count=3) at zend.c:729
#6  0x805d733 in php_execute_script (primary_file=0xb6e0) at main.c:1221
#7  0x805bee8 in main (argc=3, argv=0xb784) at cgi_main.c:738
#8  0x40698b65 in __libc_start_main (main=0x805b77c main, argc=3, 
ubp_av=0xb784, init=0x805a0ec _init, fini=0x80d86cc _fini, 
rtld_fini=0x4000df24 _dl_fini, stack_end=0xb77c)
at ../sysdeps/generic/libc-start.c:111


./configure --prefix=/var/mancala 
#--with-apache=/src/linux/build/apache_1.3.17 
--with-oci8 
--without-mysql 
--with-zlib=/usr/lib 
--with-dom=/src/linux/build/libxml2-2.2.11 
--enable-sysvsem 
--enable-sysvshm 
--disable-xml 

[PHP]

;;;
; About this file ;
;;;
; This file controls many aspects of PHP's behavior.  In order for PHP to
; read it, it must be named 'php.ini'.  PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory.  The
; path in which the php.ini file is looked for can be overriden using
; the -c argument in command line mode.
;
; The syntax of the file is extremely simple.  Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
;
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
;
; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL  ~E_NOTICE), or a quoted string ("foo").
;
; Expressions in the INI file are limited to bitwise operators and parentheses:
; | bitwise OR
;  bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.
;
; An empty string can be denoted by simply not writing anything after the equal
; sign, or by using the None keyword:
;
;   foo =   ; sets foo to an empty string
;   foo = none  ; sets foo to an empty string
;   foo = "none"; sets foo to the string 'none'
;
; If you use constants in your value, and these constants belong to a dynamically
; loaded extension (either a PHP extension or a Zend extension), you may only
; use these constants *after* the line that loads the extension.
;
; All the values in the php.ini-dist file correspond to the builtin
; defaults (that is, if no php.ini is used, or if you delete these lines,
; the builtin defaults will be identical).



; Language Options ;


engine  =   On  ; Enable the PHP scripting language engine 
under Apache
short_open_tag  = 

[PHP-DEV] PHP 4.0 Bug #9197 Updated: crash in _efree

2001-02-12 Thread dbenson

ID: 9197
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: OCI8 related
Description: crash in _efree

Included is a short script that reproduces the problem

The first part contains a workaround, that I have implemented in my code. From the 
docs I was under the impresison I had to manipulate the clob through the clob calls, 
but OCIFetchStatement appears to handle the data correctly.

The oracle schema is:
SQL desc extra_info  
 Name  Null?Type
 -  
 ITEM_ID   NOT NULL VARCHAR2(32)
 XMLCLOB
 CREATE_DATE   NOT NULL DATE
 UPDATE_DATE   NOT NULL DATE
 CLOB_UPDATE_DATE  NOT NULL DATE


%
$Conn = OCINLogon ('vignette', 'vignette', 'wom_dev');

// working version
$Stmt = OCIParse ($Conn, "
select xml
  from extra_info
 where item_id = '6E1DB91CF0654384E034080020B33146'");
$Clob = OCINewDescriptor ($Conn, OCI_D_LOB);
OCIExecute ($Stmt);
$nrows = OCIFetchStatement ($Stmt, $rs);

// non-working version
$Stmt = OCIParse ($Conn, "
select xml
  from extra_info
 where item_id = '6E1DB91CF0654384E034080020B33146'");
$Clob = OCINewDescriptor ($Conn, OCI_D_LOB);
OCIExecute ($Stmt);
while (OCIFetch ($Stmt)) {
$Clob = OCIResult ($Stmt, 'XML');
}
$ExtraXML = @$Clob-load();
%

Previous Comments:
---

[2001-02-12 11:04:45] [EMAIL PROTECTED]
Included is a short script that reproduces the problem

%
$Conn = OCINLogon ('vignette', 'vignette', 'wom_dev');

$Stmt = OCIParse ($Conn, "
select xml
  from extra_info
 where item_id = '6E1DB91CF3474384E034080020B33146'");
$Clob = OCINewDescriptor ($Conn, OCI_D_LOB);
OCIExecute ($Stmt);
$nrows = OCIFetchStatement ($Stmt, $rs);
print_r ($rs);


$Stmt = OCIParse ($Conn, "
select xml
  from extra_info
 where item_id = '6E1DB91CF0654384E034080020B33146'");
$Clob = OCINewDescriptor ($Conn, OCI_D_LOB);
OCIExecute ($Stmt);
$nrows = OCIFetchStatement ($Stmt, $rs);
print_r ($rs);
while (OCIFetch ($Stmt)) {
$Clob = OCIResult ($Stmt, 'XML');
}
$ExtraXML = @$Clob-load();
%

---

[2001-02-09 16:45:19] [EMAIL PROTECTED]
Getting periodic crashes in some of my templates. Crash is reproduceable using cgi or 
apache builds. Crash also occurs under solaris 2.7. Backtrace is from Linux RedHat 7.0

211 CALCULATE_REAL_SIZE_AND_CACHE_INDEX(p-size);
(gdb) bt
#0  0x80aaa14 in _efree (ptr=0x735740) at zend_alloc.c:211
#1  0x80b53bf in _zval_dtor (zvalue=0x81a44fc) at zend_variables.c:62
#2  0x80af555 in _zval_ptr_dtor (zval_ptr=0x81dd818) at zend_execute_API.c:261
#3  0x80b9198 in zend_hash_clean (ht=0x8153124) at zend_hash.c:590
#4  0x80d30b0 in execute (op_array=0x814e504) at ./zend_execute.c:1575
#5  0x80b637d in zend_execute_scripts (type=8, file_count=3) at zend.c:729
#6  0x805d733 in php_execute_script (primary_file=0xb6e0) at main.c:1221
#7  0x805bee8 in main (argc=3, argv=0xb784) at cgi_main.c:738
#8  0x40698b65 in __libc_start_main (main=0x805b77c main, argc=3, 
ubp_av=0xb784, init=0x805a0ec _init, fini=0x80d86cc _fini, 
rtld_fini=0x4000df24 _dl_fini, stack_end=0xb77c)
at ../sysdeps/generic/libc-start.c:111


./configure --prefix=/var/mancala 
#--with-apache=/src/linux/build/apache_1.3.17 
--with-oci8 
--without-mysql 
--with-zlib=/usr/lib 
--with-dom=/src/linux/build/libxml2-2.2.11 
--enable-sysvsem 
--enable-sysvshm 
--disable-xml 

[PHP]

;;;
; About this file ;
;;;
; This file controls many aspects of PHP's behavior.  In order for PHP to
; read it, it must be named 'php.ini'.  PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory.  The
; path in which the php.ini file is looked for can be overriden using
; the -c argument in command line mode.
;
; The syntax of the file is extremely simple.  Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.
;
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* -