Skip to content

A program that passes a string-offset char to strpos() and also calls array_splice() on the array segfaults. #356

Closed

Description

@blacktrs

Summary

A program that passes a string-offset char to strpos() and also calls array_splice() on the array segfaults.

Repro

<?php
$p = ["ab"];
echo strpos("ba", $p[0][1]), "\n";
array_splice($p, 0, 0, ["z"]);

Expected (php)

0

Actual (manticore dcc3c0c3, Darwin arm64)


[exit code 139 — SIGSEGV]

Tracking

Known-bug repro: tests/aot/repro/crash/strpos_char_arg_array_splice.php — bash tests/aot/xfail.sh -k strpos_char_arg_array_splice 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 19, 2026
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