1--TEST--
2Bug #76450 (SIGSEGV in firebird_stmt_execute)
3--EXTENSIONS--
4pdo_firebird
5sockets
6--XLEAK--
7A bug in firebird causes a memory leak when calling `isc_attach_database()`.
8See https://github.com/FirebirdSQL/firebird/issues/7849
9--FILE--
10<?php
11require_once "payload_server.inc";
12
13$address = run_server(__DIR__ . "/bug_76450.data");
14
15// no need to change the credentials; we're running against a fake server
16$dsn = "firebird:dbname=inet://$address/test";
17$username = 'SYSDBA';
18$password = 'masterkey';
19
20$dbh = new PDO($dsn, $username, $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
21$sql = "EXECUTE PROCEDURE test_proc 123";
22$query = $dbh->prepare($sql);
23try {
24    $query->execute();
25} catch (Exception $ex) {
26    echo "{$ex->getMessage()}\n";
27}
28?>
29--EXPECT--
30SQLSTATE[HY000]: General error
31