Bug #70788 [NEW]: calling multiple oci_free_statement results in segfault (11)

From: Date: Mon, 26 Oct 2015 00:41:20 +0000
Subject: Bug #70788 [NEW]: calling multiple oci_free_statement results in segfault (11)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196804@lists.php.net to get a copy of this message
From:             nick dot saraniti at gmail dot com
Operating system: Centos 6.7
PHP version:      7.0.0RC5
Package:          PDO OCI
Bug Type:         Bug
Bug description:calling multiple oci_free_statement results in segfault (11)

Description:
------------
PHP 7RC5 
Centos 6.7
Oracle Instaclient 12.1 (from rpm) 
Apache/2.2.15

If you uncomment the oci_free_results() in the code below apache will
segfault. If you only call oci_free_results() once, it does not.

Test script:
---------------
<?php
$SETTINGS_DB_username		=	"xxxxx";
$SETTINGS_DB_password		=	"xxxxx";
$SETTINGS_DB_ip			=	"10.10.10.202/XX";

// Connection String
if (!isset ($dbConx)) {
	$dbConx = oci_pconnect ( "$SETTINGS_DB_username",
"$SETTINGS_DB_password", "$SETTINGS_DB_ip" );
}

function ORACLE_GET_MONTH()
{
	$SQL="SELECT TRUNC(SYSDATE, 'MONTH') AS MONTH FROM DUAL";
	$stmt = oci_parse ( $GLOBALS ['dbConx'], $SQL );
	oci_execute ( $stmt, OCI_DEFAULT );
	$result = oci_fetch_assoc ( $stmt );
	return $result['MONTH'];
	//oci_free_statement ( $stmt );
}

function ORACLE_GET_YEAR()
{
	$SQL="SELECT TRUNC(SYSDATE, 'YEAR') AS YEAR FROM DUAL";
	$stmt = oci_parse ( $GLOBALS ['dbConx'], $SQL );
	oci_execute ( $stmt, OCI_DEFAULT );
	$result = oci_fetch_assoc ( $stmt );
	return $result['YEAR'];
	//oci_free_statement ( $stmt );
}

$oci_month=ORACLE_GET_MONTH();
$oci_year=ORACLE_GET_YEAR();

echo "Month: $oci_month<br />";
echo "Year: $oci_year<br />";


-- 
Edit bug report at https://bugs.php.net/bug.php?id=70788&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=70788&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=70788&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=70788&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=70788&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=70788&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=70788&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=70788&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=70788&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=70788&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=70788&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=70788&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=70788&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=70788&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70788&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=70788&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=70788&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=70788&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70788&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=70788&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=70788&r=mysqlcfg



Thread (6 messages)

« previous php.bugs (#196804) next »