php-src/ext/pdo_firebird/tests/bug_76449.phpt
KentarouTakeda 7f7da6aef9
Enable pdo-firebird nightly testing (#12699)
* Enable `pdo-firebird` Testing in Nightly

* fix(ext/pdo_firebird/tests): dont detect memory leak

* fix(ext/pdo_firebird): memory alignment error
2023-11-17 15:25:44 +01:00

25 lines
701 B
PHP

--TEST--
Bug #76449 (SIGSEGV in firebird_handle_doer)
--EXTENSIONS--
pdo_firebird
sockets
--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";
$address = run_server(__DIR__ . "/bug_76449.data");
// no need to change the credentials; we're running against a fake server
$dsn = "firebird:dbname=inet://$address/test76449";
$username = 'SYSDBA';
$password = 'masterkey';
$dbh = new PDO($dsn, $username, $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
var_dump($dbh->exec("INSERT INTO test76449 VALUES ('hihi2', 'xxxxx')"));
?>
--EXPECT--
bool(false)