php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71997 One-Dimensional arrays cause segmentation faults
Submitted: 2016-04-09 15:14 UTC Modified: 2016-04-11 22:49 UTC
From: beniwtv at relamp dot tk Assigned: laruence (profile)
Status: Closed Package: lua (PECL)
PHP Version: 7.0.5 OS: Ubuntu 16.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: beniwtv at relamp dot tk
New email:
PHP Version: OS:

 

 [2016-04-09 15:14 UTC] beniwtv at relamp dot tk
Description:
------------
Hi, 

when passing an an array to a lua function, the module will segfault:
php-fpm7.0[9786]: segfault at 5 ip 00007f6cec54b51c sp 00007ffe1292cc70 error 4 in lua.so[7f6cec547000+6000]

Example: Passing array('hello', 'world');

Passing array('what' => 'hello', 'where' => 'world'); (two-dimensional) works however.

Additionally, PHP 5.6 and lua-1.1.0 works as expected.
Maybe a bug in the upgrade to PHP7?

Test script:
---------------
<?php
$mylua = new \lua();
$mylua->eval(<<<CODE
    function nicefunction(args)
        print(args[1])
        return args[1]
    end
CODE
);

echo $mylua->call("nicefunction", array(array('hello', 'world')));
echo "Done!";


Expected result:
----------------
"hello" is displayed, then "Done!" is displayed

Actual result:
--------------
Segmentation fault (core dumped)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-11 02:57 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2016-04-11 02:57 UTC] laruence@php.net
fixed, and 2.0.1 is rleased in PECL
 [2016-04-11 22:49 UTC] beniwtv at relamp dot tk
Thanks, working beautifully!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC