Skip to content

symfony-console: JSON descriptor returns empty nested arrays (help) and crashes (list, help list) #297

Closed

Description

@blacktrs

Summary

examples/symfony-console compiled with main (5e4d6fb8, manticore 0.15.0): the JSON descriptor misbehaves. Everything else checked (25 invocations: text, --raw, --format=md, flags) is byte-identical to Zend.

Command Zend Native
help greet --format=json full definition: "arguments":{"name":{"name":"name","is_required":false,"is_array":false,"description":"Name to greet","default":"world"}}, full options rc 0 but every nested array is empty: "arguments":{"name":[]},"options":{"help":[],"silent":[],"quiet":[],…}
list --format=json JSON list of commands SIGSEGV (rc 139), or empty output with rc 0 on the v0.14.0 compiler
help --format=json list JSON EXC_BREAKPOINT in libsystem_malloc: mfm_free.cold (invalid / double free), rc 133

All four also misbehave on the v0.14.0 release compiler, so this is not a regression.

Reproduce

cp -R examples/symfony-console /tmp/console && cd /tmp/console
manticore build
./bin/demo help greet --format=json
php -d auto_prepend_file=vendor/autoload.php src/app.php help greet --format=json

Notes

Symfony\Component\Console\Descriptor\JsonDescriptor::getInputDefinitionData() builds $inputArguments[$name] = $this->getInputArgumentData($argument) in a foreach over $definition->getArguments() and returns ['arguments' => $inputArguments, 'options' => $inputOptions]; each element is an associative array literal with preg_replace(...) and \INF === $default ? 'INF' : $default values. A small program with the same shape (a private method returning such a literal, stored per key in a loop, then json_encode) works, so the corruption needs more context. The empty arrays plus the invalid free in the list / help list paths suggest an ownership problem (the per-key arrays are released while the result still points at them). Next step: bisect inside JsonDescriptor in a copy of the app (replace pieces of getInputArgumentData with literals) and reduce.

Activity

  1. added
    bug
    crash
    on Oct 17, 2026
  2. added a commit that references this issue on Nov 2, 2026
    d4394f1
  3. added 2 commits that reference this issue on Nov 2, 2026
    9f5604b
    280f18a
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