Skip to content

A dynamic method call that spreads a mixed argument pack into an in-scope private method segfaults. #168

Closed

Description

@blacktrs

Summary

A dynamic method call that spreads a mixed argument pack into an in-scope private method segfaults.

Repro

<?php
class Runner {
    private function secret(int $a, int $b): int { return $a * $b; }
    public function viaThis(string $m, mixed $args): mixed {
        $self = $this;
        return $self->$m(...$args);
    }
}
echo (new Runner())->viaThis('secret', [6, 7]), "\n";

Expected (php)

42

Actual (manticore 3b5ac133, Darwin arm64)


[exit code 139 — SIGSEGV]

Tracking

Known-bug repro: tests/aot/repro/crash/dyn_method_spread_mixed_pack_inline.php — bash tests/aot/xfail.sh -k dyn_method_spread_mixed_pack_inline reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcrash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions