Bug #73002 [NEW]: bigendian64/php7/oci8: output bind-variables doesn't work

From: Date: Fri, 02 Sep 2016 11:14:38 +0000
Subject: Bug #73002 [NEW]: bigendian64/php7/oci8: output bind-variables doesn't work
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203748@lists.php.net to get a copy of this message
From: lzsiga at freemail dot c3 dot hu Operating system: 64-bit / BigEndian PHP version: 7.0.10 Package: OCI8 related Bug Type: Bug Bug description:bigendian64/php7/oci8: output bind-variables doesn't work Description: ------------ Hi, I think I've found a little bug in component ext/oci8 that affects only 64-bit big-endian platforms. In ext/oci8/oci8_statement.c:php_oci_bind_out_callback (line 1461) the program assumes that &val->string->len (type size_t *) can be type-casted to (ub4 *) Well, that works on 32-bit platforms, also on 64-bit/little-endian platforms, but fails on bi-bit/big-endian platforms such as PowerPc64/Aix (size_t is eight bytes, ub4 is four bytes, and a simple type-cast does the wrong thing). The attached patch seems to solve the problem. Test script: --------------- /* anonymous PL/SQL block */ BEGIN SELECT ename INTO :ename FROM emp WHERE empno=7876; END; Expected result: ---------------- ename=ADAMS Actual result: -------------- oci_execute(): ORA-03131: an invalid buffer was provided for the next piece -- Edit bug report at https://bugs.php.net/bug.php?id=73002&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73002&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73002&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73002&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73002&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73002&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73002&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73002&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73002&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73002&r=support Expected behavior: https://bugs.php.net/fix.php?id=73002&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73002&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73002&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73002&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73002&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73002&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73002&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73002&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73002&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73002&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73002&r=mysqlcfg

« previous php.bugs (#203748) next »