php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75669 Segmentation Fault
Submitted: 2017-12-12 04:27 UTC Modified: -
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: humairm at gmail dot com Assigned:
Status: Open Package: MySQLi related
PHP Version: 7.1.12 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: humairm at gmail dot com
New email:
PHP Version: OS:

 

 [2017-12-12 04:27 UTC] humairm at gmail dot com
Description:
------------
running php 7 using php-fpm on lighttpd with mysqli on mariadb causes segmentation fault at mysqli_stmt_bind_result as reported in php-fpm.log:
[pool www] child 24047 exited on signal 11 (SIGSEGV) after 6.518082 seconds from start
lighttpd logs report the following error:
mod_fastcgi.c.2424 unexpected end-of-file (perhaps the fastcgi process died)

2 key observations:

1. commenting out the bind_result line eliminates the error - so something triggers the segmentation fault when bind_result is called under php 7 (7.1.2)

2. running php 5 (5.5.9) instead of php 7 (7.1.2) does not have the same issue - so it seems there is something in php version 7.1.2 that is triggering the sigsegv

Test script:
---------------
$stmt = $db->prepare($sql);
$stmt->execute();
$stmt->bind_result($id, $name); //This is where segmentation fault occurs - if this line is commented out then the error goes away but so does the logic! Same line does not cause any issue with php 5 and works as desired returning the result set successfully.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 11:01:24 2019 UTC