Skip to content

Named arguments in CTE functions cause a segfault #10801

Closed
@mvorisek

Description

@mvorisek

Description

The following code:

<?php

$h0 = hash("murmur3a", "Two hashes meet in a bar.", options: ["seed" => 2345]);

and hash function marked as CTE (like in https://github.com/php/php-src/blob/f16c3e1265/ext/hash/hash.stub.php#L12)

Resulted in this output:

========DIFF========
     95855f9be0db784a5c37e878c4a4dcee
002+ Segmentation fault (core dumped)
003+ 
004+ Termsig=11
002- 95855f9be0db784a5c37e878c4a4dcee
003- f64c9eb40287fa686575163893e283b2
004- f64c9eb40287fa686575163893e283b2
005- 7f7ec59b
006- 7f7ec59b
========DONE========
FAIL Hash: MurmurHash3 seed [ext/hash/tests/murmurhash3_seed.phpt] 

But I expected this output instead:

discovered in #10771, based on #10771 (comment) hash will be not supported as CTE, but I belive the segfault should be investigated, as it can be used from an extension on compile time for example

PHP Version

master

Operating System

any

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions