Skip to content

A @var-annotated Map statement truncates an unrelated int above 2^47 to 48 bits. #131

Closed

Description

@blacktrs

Summary

A @var-annotated Map statement truncates an unrelated int above 2^47 to 48 bits.

Repro

<?php
use Manticore\Ds\Map;
function rep(int $t0): void { echo $t0, "\n"; }
$big = 300000000000000;
/** @var Map<string,int> $m */
$t = $big; $m = new Map();
$m->set("a", 1);
rep($t);

Expected (php)

300000000000000

Actual (manticore bd1e688c, Darwin arm64)

18525023289344

Tracking

Known-bug repro: tests/aot/repro/wrong/ds_var_map_truncates_bigint.php — bash tests/aot/xfail.sh -k ds_var_map_truncates_bigint 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
    wrong-answer
    on Oct 7, 2026
  2. added 2 commits that reference this issue on Oct 8, 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

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions