Skip to content

Enable pdo-firebird nightly testing #12699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
firebird:
image: jacobalberty/firebird
ports:
- 3050:3050
env:
ISC_PASSWORD: test
FIREBIRD_DATABASE: test.fdb
FIREBIRD_USER: test
FIREBIRD_PASSWORD: test
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -287,6 +296,15 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
firebird:
image: jacobalberty/firebird
ports:
- 3050:3050
env:
ISC_PASSWORD: test
FIREBIRD_DATABASE: test.fdb
FIREBIRD_USER: test
FIREBIRD_PASSWORD: test
runs-on: ubuntu-22.04
steps:
- name: git checkout
Expand Down Expand Up @@ -518,6 +536,15 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
firebird:
image: jacobalberty/firebird
ports:
- 3050:3050
env:
ISC_PASSWORD: test
FIREBIRD_DATABASE: test.fdb
FIREBIRD_USER: test
FIREBIRD_PASSWORD: test
strategy:
fail-fast: false
matrix:
Expand Down
7 changes: 6 additions & 1 deletion ext/pdo_firebird/firebird_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ static zend_always_inline double get_double_from_sqldata(const ISC_SCHAR *sqldat
READ_AND_RETURN_USING_MEMCPY(double, sqldata);
}

static zend_always_inline float get_float_from_sqldata(const ISC_SCHAR *sqldata)
{
READ_AND_RETURN_USING_MEMCPY(float, sqldata);
}

static zend_always_inline ISC_TIMESTAMP get_isc_timestamp_from_sqldata(const ISC_SCHAR *sqldata)
{
READ_AND_RETURN_USING_MEMCPY(ISC_TIMESTAMP, sqldata);
Expand Down Expand Up @@ -459,7 +464,7 @@ static int firebird_stmt_get_col(
break;
case SQL_FLOAT:
/* TODO: Why is this not returned as the native type? */
ZVAL_STR(result, zend_strpprintf(0, "%F", *(float*)var->sqldata));
ZVAL_STR(result, zend_strpprintf(0, "%F", get_float_from_sqldata(var->sqldata)));
break;
case SQL_DOUBLE:
/* TODO: Why is this not returned as the native type? */
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_47415.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Bug #47415 PDO_Firebird segfaults when passing lowercased column name to bindCol
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_48877.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO Fire
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php

Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_53280.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: bug 53280 segfaults if query column count is less than param count
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php

Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_62024.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Bug #62024 Cannot insert second row with null using parametrized query (Firebird
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php

Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_64037.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Bug #64037 Firebird return wrong value for numeric field
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php

Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_72583.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: Feature 72583 Fetch integers as php integers not as strings
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_72931.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: Bug 72931 Insert returning fails on Firebird 3
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_73087.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: bug 73087 segfault binding blob parameter
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_74462.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: Bug #74462 Returns only NULLs for boolean fields
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_76448.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ Bug #76448 (Stack buffer overflow in firebird_info_cb)
--EXTENSIONS--
pdo_firebird
sockets
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require_once "payload_server.inc";
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_76449.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ Bug #76449 (SIGSEGV in firebird_handle_doer)
--EXTENSIONS--
pdo_firebird
sockets
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require_once "payload_server.inc";
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_76450.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ Bug #76450 (SIGSEGV in firebird_stmt_execute)
--EXTENSIONS--
pdo_firebird
sockets
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require_once "payload_server.inc";
Expand Down
3 changes: 3 additions & 0 deletions ext/pdo_firebird/tests/bug_76452.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Bug ##76452 (Crash while parsing blob data in firebird_fetch_blob)
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require_once "payload_server.inc";
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_76488.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: Bug #76488 Memory leak when fetching a BLOB field
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_77863.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: Bug #76488 PDO Firebird does not support boolean datatype in input
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php

Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_80521.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Bug #80521 (Parameters with underscores no longer recognized)
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/bug_aaa.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: cursor should not be marked as opened on singleton statements
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
1 change: 1 addition & 0 deletions ext/pdo_firebird/tests/common.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pdo_firebird
# magic auto-configuration

$config = array(
// A bug in firebird causes a memory leak when calling `isc_attach_database()`. See https://github.com/FirebirdSQL/firebird/issues/7849
'ENV' => ['LSAN_OPTIONS' => 'detect_leaks=0'],
'TESTS' => 'ext/pdo/tests'
);
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/connect.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: connect/disconnect
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require("testdb.inc");
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/ddl.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: DDL/transactions
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php

Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/dialect_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ if (strpos(getenv('PDO_FIREBIRD_TEST_DSN'), 'dialect=1')===false) {
die('skip: PDO_FIREBIRD_TEST_DSN must contain a string "dialect=1"');
}
?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require("testdb.inc");
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/execute.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: prepare/execute/binding
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require("testdb.inc");
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/execute_block.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ pdo_firebird
--SKIPIF--
<?php require('skipif.inc');
?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require("testdb.inc");
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/gh10908.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ GH-10908 (Bus error with PDO Firebird on RPI with 64 bit kernel and 32 bit userl
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php

Expand Down
3 changes: 3 additions & 0 deletions ext/pdo_firebird/tests/gh8576.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ GH-8576 (Bad interpretation of length when char is UTF-8)
pdo_firebird
--SKIPIF--
<?php require 'skipif.inc'; ?>
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require 'testdb.inc';
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/ignore_parammarks.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ pdo_firebird
--SKIPIF--
<?php require('skipif.inc');
?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require("testdb.inc");
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/payload_test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ FB payload server satisfies connection attempt
--EXTENSIONS--
pdo_firebird
sockets
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php
require_once "payload_server.inc";
Expand Down
5 changes: 3 additions & 2 deletions ext/pdo_firebird/tests/rowCount.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ PDO_Firebird: rowCount
pdo_firebird
--SKIPIF--
<?php require('skipif.inc'); ?>
--ENV--
LSAN_OPTIONS=detect_leaks=0
--XLEAK--
A bug in firebird causes a memory leak when calling `isc_attach_database()`.
See https://github.com/FirebirdSQL/firebird/issues/7849
--FILE--
<?php

Expand Down