hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

ArrayObject segmentation fault when called inside a function for nested arrays

Open franz-deleon opened this issue 12 years ago • 3 comments

This may be related to issue #1906 which was fixed. I get a segmentation fault when calling ArrayObject inside a function.

my build:

HipHop VM 2.5.0-dev+2014.03.13 (rel)
Compiler: heads/master-0-gd00c02199be84b1a65515b105f9e48ee8d403ce8
Repo schema: 7fd0c2a1c9de6d7a276b24579fae3925e9cf0c65

problem cases:

# case 1 - segmentation fault
class Concrete
{
    public function __construct($c)
    {
        $c['foo']['bar'] = 'hello!!';
        var_dump($c); //segmentation fault
    }
}
new Concrete(new ArrayObject());

# case 2 - segmentation fault
function x() {
    $c = new ArrayObject;
    $c['foo']['bar'] = 'hello!!';
    var_dump($c); // segmentation fault
}
x();

# case 3
$c = new ArrayObject;
$c['foo']['bar'] = 'hello!!';
var_dump($c); // no errors

franz-deleon avatar Mar 13 '14 15:03 franz-deleon

Seems closely related to #1948. This wasn't fixed by #1906

jmarrama avatar Mar 13 '14 16:03 jmarrama

Thanks for the solid repro. Looking into it...

sgolemon avatar Mar 13 '14 17:03 sgolemon

This is def a dupe of #1948 closing this and assigning @swtaarrs to that one.

sgolemon avatar Mar 13 '14 21:03 sgolemon