From aa7f4497bfd78b0bf3981ce94789a3093b55f92a Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 7 Sep 2022 22:55:28 +0200 Subject: [PATCH 1/2] Fix undefined left shift in oci The bit is shifted into the signed bit which is undefined. Make the integer explicitly unsigned before shifting. --- ext/oci8/php_oci8_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h index 825437bc570..55eb8de6b4b 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -103,7 +103,7 @@ extern zend_class_entry *oci_coll_class_entry_ptr; * PHP_OCI_CRED_EXT must be distinct from the OCI_xxx privilege * values. */ -#define PHP_OCI_CRED_EXT (1<<31) +#define PHP_OCI_CRED_EXT (1u<<31) #if ((PHP_OCI_CRED_EXT == OCI_DEFAULT) || (PHP_OCI_CRED_EXT & (OCI_SYSOPER | OCI_SYSDBA))) #error Invalid value for PHP_OCI_CRED_EXT #endif From 4a8cca241f5eb01452398e8b32eb42218b0838bc Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 8 Sep 2022 00:45:28 +0200 Subject: [PATCH 2/2] Skip oci tests that leak under asan --- ext/oci8/tests/privileged_connect1.phpt | 5 ++++- ext/pdo_oci/tests/pecl_bug_6364.phpt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/oci8/tests/privileged_connect1.phpt b/ext/oci8/tests/privileged_connect1.phpt index 762ce5ece53..816f3fe7594 100644 --- a/ext/oci8/tests/privileged_connect1.phpt +++ b/ext/oci8/tests/privileged_connect1.phpt @@ -1,7 +1,10 @@ --TEST-- privileged connect tests --SKIPIF-- - + --INI-- oci8.privileged_connect=1 --FILE-- diff --git a/ext/pdo_oci/tests/pecl_bug_6364.phpt b/ext/pdo_oci/tests/pecl_bug_6364.phpt index affdc77649e..f8da1356659 100644 --- a/ext/pdo_oci/tests/pecl_bug_6364.phpt +++ b/ext/pdo_oci/tests/pecl_bug_6364.phpt @@ -3,6 +3,7 @@ PECL PDO_OCI Bug #6364 (segmentation fault on stored procedure call with OUT bin --SKIPIF--