|  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
 [2016-04-09 15:14 UTC] beniwtv at relamp dot tk

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[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:
$mylua = new \lua();
    function nicefunction(args)
        return args[1]

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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-11 02:57 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2016-04-11 02:57 UTC]
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-2023 The PHP Group
All rights reserved.
Last updated: Wed Nov 29 06:01:28 2023 UTC