[php-src] Issue #9032: `ATTACH :a AS xx` is crashing php (Sqlite/PDOStatement::bindValue)

From: Date: Sun, 17 Jul 2022 11:20:36 +0000
Subject: [php-src] Issue #9032: `ATTACH :a AS xx` is crashing php (Sqlite/PDOStatement::bindValue)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241944@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9032 Author: mvorisek ### Description The following code: ```php <?php $db = new \PDO("sqlite::memory:"); $db->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $db->exec('attach database \':memory:\' AS "db1"'); var_dump($db->exec('create table db1.r (id int)')); $st = $db->prepare('attach database :a AS "db2"'); $st->execute([':a' => ':memory:']); var_dump($db->exec('create table db2.r (id int)')); ``` demo: https://3v4l.org/Su8lK Resulted in this output: ``` int(0) Process exited with code 139. ``` But I expected this output instead: ``` int(0) int(0) ``` ### PHP Version any ### Operating System any

« previous php.bugs (#241944) next »