History

Looking at oci_handle_closer() breifly, then the first thing that catches my eye is we don't check H->err because we attempt to free the handle.
I'm not on a dev machine, so I can't write a patch. Could you try and see if something along these lines will work for you:
1) Open /src/ext/pdo_oci/oci_driver.c and find line 215 (trunk, might be the same in 5.x)
2) Wrap line 215 and 216 inside an if conditional like so:
if (H->err) {
OCIHandleFree(H->err, OCI_HTYPE_ERROR);
H->err = NULL;
}

[2010-10-06 19:33 UTC] kontakt at beberlei dot de

As an additional info, i changed to using the OCI 11.1 Instaclient Library to compile against with the same error as described in the original report.
When applying the patch this sort of breaks it completly for both my other bug http://bugs.php.net/bug.php?id=52957 and this a comparable error :-)
I get a binary output of a screen and this error:
Errors in file :
OCI-21500: internal error code, arguments: [kghfrempty:ds], [0xC84EB3C], [], [], [], [], [], []
GDB has the following backtraces:
Program received signal SIGSEGV, Segmentation fault.
0x02adb4cc in slaac_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
(gdb) bt
#0 0x02adb4cc in slaac_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#1 0x02adb406 in slrac () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#2 0x0392acaf in sskgds_plt_adjust () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#3 0x0392ad69 in sskgds_find_rtn_hdr () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#4 0x039210ce in skgdstpcs () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#5 0x036d5435 in kgdsdst () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#6 0x031a3b6e in skgudmp () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#7 0x036a0938 in kgeriv_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#8 0x036a08af in kgeriv () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#9 0x036a325c in kgeric1 () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#10 0x03687682 in kgherror () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#11 0x03e98eea in kghfrmrg () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#12 0x03e97eb0 in kghfre () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#13 0x03df3cfb in kpuhhfre () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#14 0x0271866e in kpufhndl0 () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#15 0x02715dfe in kpufhndl () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#16 0x026eaea6 in OCIHandleFree () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#17 0x024989d3 in oci_handle_closer (dbh=0x9a02d80) at /home/benny/downloads/php-5.3.3/ext/pdo_oci/oci_driver.c:193
Program received signal SIGSEGV, Segmentation fault.
0x02adb4cc in slaac_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
(gdb) bt
#0 0x02adb4cc in slaac_int () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#1 0x02adb406 in slrac () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#2 0x0392acaf in sskgds_plt_adjust () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#3 0x0392ad69 in sskgds_find_rtn_hdr () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#4 0x039210ce in skgdstpcs () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#5 0x036d5435 in kgdsdst () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#6 0x031a3b6e in skgudmp () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#7 0x036a0540 in kgerinv_internal () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#8 0x036a04cb in kgerinv () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#9 0x036a2493 in kgerin () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#10 0x03688378 in kghnerror () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#11 0x03e9cd98 in kghfrempty () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#12 0x03e9a7af in kghgex () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#13 0x03e9bcc0 in kghfnd () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#14 0x03e9ab33 in kghalo () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#15 0x03e9a3c4 in kghgex () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#16 0x03e9bcc0 in kghfnd () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#17 0x03e95e65 in kghprmalo () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#18 0x03e95637 in kghalp () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#19 0x026ca7fa in kpuhhalpuc () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#20 0x0270c9b4 in kpuexAllocPrefMem () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#21 0x0270c1c5 in kpuexInitStmh () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#22 0x0270af18 in kpuexCallback () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#23 0x03e5ee23 in ttcdrv () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#24 0x03e193b8 in nioqwa () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#25 0x03e041e5 in upirtrc () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#26 0x03e0ea60 in kpurcsc () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#27 0x03e08be5 in kpuexec () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#28 0x03e04bbe in OCIStmtExecute () from /home/benny/downloads/oracle-instaclient/instantclient_11_2/libclntsh.so.11.1
#29 0x0249aba2 in oci_stmt_execute (stmt=0xac8a6b4) at /home/benny/downloads/php-5.3.3/ext/pdo_oci/oci_statement.c:144
#30 0x023f18ba in zim_PDOStatement_execute (ht=1, return_value=0xac5ebe8, return_value_ptr=0x0, this_ptr=0xac5eb44,

The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Fixed in 5.4, 5.5 and master branches.