Bug #79140 [Com]: Stack smashing detected error in PHP 7.4.1
| From: | enumag at gmail dot com | Date: | Mon, 20 Jan 2020 11:20:06 +0000 |
| Subject: | Bug #79140 [Com]: Stack smashing detected error in PHP 7.4.1 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225005@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79140&edit=1
ID: 79140
Comment by: enumag at gmail dot com
Reported by: enumag at gmail dot com
Summary: Stack smashing detected error in PHP 7.4.1
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Ubuntu
PHP Version: 7.4.1
Block user comment: N
Private report: N
New Comment:
It seems to only happen with ext-event. Using ext-uv instead works so far.
Previous Comments:
------------------------------------------------------------------------
[2020-01-20 09:01:22] enumag at gmail dot com
Is it possible that it was fixed since 7.4.1 release? I reproduced it on 2 separate machines.
I'm trying to reproduce it in Docker but running into some issues when building the image...
------------------------------------------------------------------------
[2020-01-20 08:46:06] nikic@php.net
I can't reproduce this with current 7.4 HEAD. I get:
Fatal error: Uncaught Amp\Sql\ConnectionException: fe_sendauth: no password supplied in
/home/nikic/repos/postgres/src/PgSqlConnection.php:58
Stack trace:
#0 /home/nikic/repos/postgres/vendor/amphp/amp/lib/Loop/NativeDriver.php(223):
Amp\Postgres\PgSqlConnection::Amp\Postgres\{closure}('e', Resource id #53, NULL)
#1 /home/nikic/repos/postgres/vendor/amphp/amp/lib/Loop/NativeDriver.php(97):
Amp\Loop\NativeDriver->selectStreams(Array, Array, 0.421)
#2 /home/nikic/repos/postgres/vendor/amphp/amp/lib/Loop/Driver.php(134):
Amp\Loop\NativeDriver->dispatch(true)
#3 /home/nikic/repos/postgres/vendor/amphp/amp/lib/Loop/Driver.php(72): Amp\Loop\Driver->tick()
#4 /home/nikic/repos/postgres/vendor/amphp/amp/lib/Loop.php(84): Amp\Loop\Driver->run()
#5 /home/nikic/repos/postgres/test.php(24): Amp\Loop::run(Object(Closure))
#6 {main}
thrown in /home/nikic/repos/postgres/src/PgSqlConnection.php on line 58
without any warnings under valgrind.
------------------------------------------------------------------------
[2020-01-20 08:36:09] enumag at gmail dot com
Description:
------------
You don't need to have postgres installed or running - I don't. This fails regardless.
Reproducing code is taken from amphp/postgres readme https://github.com/amphp/postgres).
Test script:
---------------
<?php declare(strict_types = 1);
use Amp\Postgres;
use Amp\Postgres\ConnectionConfig;
use Amp\Sql\Statement;
require __DIR__.'/vendor/autoload.php';
Amp\Loop::run(function () {
$config = ConnectionConfig::fromString("host=localhost user=postgres dbname=test");
/** @var Postgres\Pool $pool */
$pool = Postgres\pool($config);
/** @var Statement $statement */
$statement = yield $pool->prepare("SELECT * FROM test WHERE id = :id");
/** @var Postgres\ResultSet $result */
$result = yield $statement->execute(['id' => 1337]);
while (yield $result->advance()) {
$row = $result->getCurrent();
// $row is an array (map) of column values. e.g.: $row['column_name']
}
});
Expected result:
----------------
Some normal amphp/postgres error saying that connecting to postgres failed.
Actual result:
--------------
*** stack smashing detected ***: <unknown> terminated
[1] 4059 abort (core dumped) php amp.php
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79140&edit=1