Skip to content

array_unique() over the result of array_map() with a closure segfaults #512

Closed

Description

@blacktrs

Summary

array_unique() over the result of array_map() with a closure segfaults.

Repro

<?php
$m = array_map(fn($z) => 1, [1, 2]);
var_dump(array_unique($m));

Expected (php)

array(1) {
  [0]=>
  int(1)
}

Actual (manticore 5a304c79, Darwin arm64)


[exit code 139 — SIGSEGV]

Tracking

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

Activity

  1. added
    bug
    crash
    on Oct 28, 2026
  2. added 5 commits that reference this issue on Nov 9, 2026
    4ba0c06
    1b00496
    cacb8f5
    8c817ed
    d5561f4
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