Skip to content

strlen() of an int held in a cell (a generator's auto key) reads the int as a string pointer and crashes #102

Closed

Description

@blacktrs

Summary

strlen() of an int held in a cell (a generator's auto key) reads the int as a string pointer and crashes.

Repro

<?php
function g(): \Generator { yield 'a' => 1; yield 2; yield 3; }
foreach (g() as $k => $v) { echo strlen($k), "\n"; }

Expected (php)

1
1
1

Actual (manticore b40d04be, Darwin arm64)


[exit code 139 — SIGSEGV]

Tracking

Known-bug repro: tests/aot/repro/crash/strlen_cell_int.php — bash tests/aot/xfail.sh -k strlen_cell_int 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 6, 2026
  2. added 2 commits that reference this issue on Oct 8, 2026
    4189491
    1b82af4
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