You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
symfony-console: JSON descriptor returns empty nested arrays (help) and crashes (list, help list) #297
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
Refine a stale nested-unknown array return type in NarrowReturns (Fixes
Promote fixed repro nested_assoc_returned_into_union_literal to a case (
Hard bugs: reference representation, object handles, reified fit, com…