Bug #71863 [Com]: Segfault when EXPLAIN with "Unknown column" error

From: Date: Tue, 19 Jul 2016 14:01:10 +0000
Subject: Bug #71863 [Com]: Segfault when EXPLAIN with "Unknown column" error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202417@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71863&edit=1 ID: 71863 Comment by: reyad dot attiyat at gmail dot com Reported by: Azq2 at ya dot ru Summary: Segfault when EXPLAIN with "Unknown column" error Status: Feedback Type: Bug Package: MySQLi related Operating System: Ubuntu 14.04 PHP Version: master-Git-2016-03-20 (Git) Assigned To: andrey Block user comment: N Private report: N New Comment: @andrey I still get this bug on PHP 7.1. However I'm using Windows 10, previously on Windows 7, and am using PHP 7.1.0alpha3 Thread Safe. I downloaded the build from here: http://windows.php.net/qa/. I also just test the non thread safe build and encounter the same problem. I will test on linux to eliminate that as a possible cause. Also I'm using MariaDB and not Oracle's MySQL could this be the reason for segmentation fault? Previous Comments: ------------------------------------------------------------------------ [2016-07-19 08:10:27] andrey@php.net I can't reproduce also with the test script from this bug report (in the previous comment I tested with the test script from the Pull Request) ------------------------------------------------------------------------ [2016-07-19 08:08:32] andrey@php.net I can't reproduce with 7.1 and MySQL 5.7.13 andrey@poohie:/work/dev/php/php-src$ ./php -v PHP 7.1.0-dev (cli) (built: Jul 19 2016 11:03:23) ( NTS DEBUG ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies andrey@poohie:/work/dev/php/php-src$ ./php ext/mysqli/tests/bug71863.php Unknown column 'owner_id' in 'where clause' ------------------------------------------------------------------------ [2016-07-13 20:11:58] nikic@php.net @andrey: The PR (https://github.com/php/php-src/pull/1858) points out that this is likely caused by https://github.com/php/php-src/commit/4bb784cd0d80c330364cdfebc824a434cc27f05a. Could you please take a look at the PR and check if it is correct? ------------------------------------------------------------------------ [2016-04-11 14:42:55] reyad dot attiyat at gmail dot com This problem is not isolated to MySQLi but any extension, such as PDO, that uses the mysqlnd backend. ------------------------------------------------------------------------ [2016-04-11 14:36:25] reyad dot attiyat at gmail dot com I also encountered this crash when dealing with errors in MySQL SELECT queries. I'm running PHP 7.1 (master) on Debian linux. The error seems to caused by a null function table pointer. The result set error_info struct is not initialized with callbacks and segfaults when the COPY_CLIENT_ERROR macro is called. The patch potentially fixes this issue by copying the error_info struct of the row packet into the the result set error_info struct. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=71863 -- Edit this bug report at https://bugs.php.net/bug.php?id=71863&edit=1

« previous php.bugs (#202417) next »