Performing verification for Bionic.
I installed php7.2 and php7.2-mysql from -updates, version 7.4.3-4ubuntu2.5.
I also installed mysql and set up the database table and inserted data into it.
$ sudo apt-cache policy php7.2 | grep Installed Installed: 7.2.24-0ubuntu0.18.04.8
$ cat testcase.php <?php $dbConn= new mysqli("127.0.0.1", "ubuntu", "ubuntu", "ubuntu_releases", "3306"); $SQL="SELECT * from ubuntu_releases"; $stmt=$dbConn->prepare($SQL); $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY); $stmt->execute(); if ($stmt) { $res = $stmt->get_result(); while($row = $res->fetch_assoc()) { echo json_encode($row) . "\n"; } } $dbConn->close() ?>
$ php testcase.php Segmentation fault (core dumped) $ tail /var/log/kern.log Sep 1 03:33:13 ubuntu kernel: [ 843.642697] do_general_protection: 5 callbacks suppressed Sep 1 03:33:13 ubuntu kernel: [ 843.642705] traps: php[10167] general protection ip:7f9256b72f90 sp:7ffc6b263670 error:0 in mysqlnd.so[7f9256b4a000+38000]
We segfault trying to use the mysqli cursor.
I then enabled -proposed, and installed php7.2 version 7.2.24-0ubuntu0.18.04.9.
$ sudo apt-cache policy php7.2 | grep Installed Installed: 7.2.24-0ubuntu0.18.04.9
$ php testcase.php {"year":21,"month":4,"name":"hirsute"} {"year":20,"month":10,"name":"groovy"} {"year":20,"month":4,"name":"focal"}
We no longer segfault, and we can read rows from the mysqli cursor correctly.
The fixed package in -proposed solves the issue. Happy to mark Bionic as verified.
Performing verification for Bionic.
I installed php7.2 and php7.2-mysql from -updates, version 7.4.3-4ubuntu2.5.
I also installed mysql and set up the database table and inserted data into it.
$ sudo apt-cache policy php7.2 | grep Installed 0ubuntu0. 18.04.8
Installed: 7.2.24-
$ cat testcase.php $dbConn- >prepare( $SQL); >attr_set( MYSQLI_ STMT_ATTR_ CURSOR_ TYPE, MYSQLI_ CURSOR_ TYPE_READ_ ONLY); get_result( ); assoc() ) {
<?php
$dbConn= new mysqli("127.0.0.1", "ubuntu", "ubuntu", "ubuntu_releases", "3306");
$SQL="SELECT * from ubuntu_releases";
$stmt=
$stmt-
$stmt->execute();
if ($stmt) {
$res = $stmt->
while($row = $res->fetch_
echo json_encode($row) . "\n";
}
}
$dbConn->close()
?>
$ php testcase.php protection: 5 callbacks suppressed so[7f9256b4a000 +38000]
Segmentation fault (core dumped)
$ tail /var/log/kern.log
Sep 1 03:33:13 ubuntu kernel: [ 843.642697] do_general_
Sep 1 03:33:13 ubuntu kernel: [ 843.642705] traps: php[10167] general protection ip:7f9256b72f90 sp:7ffc6b263670 error:0 in mysqlnd.
We segfault trying to use the mysqli cursor.
I then enabled -proposed, and installed php7.2 version 7.2.24- 0ubuntu0. 18.04.9.
$ sudo apt-cache policy php7.2 | grep Installed 0ubuntu0. 18.04.9
Installed: 7.2.24-
$ php testcase.php :21,"month" :4,"name" :"hirsute" } :20,"month" :10,"name" :"groovy" } :20,"month" :4,"name" :"focal" }
{"year"
{"year"
{"year"
We no longer segfault, and we can read rows from the mysqli cursor correctly.
The fixed package in -proposed solves the issue. Happy to mark Bionic as verified.