Skip to content

[C++][JSON] Avoid reusing simdjson values after failed get() #55497

Open

Description

@wgtmac

Describe the bug, including details regarding any error messages, version, and platform.

StructConverter::AppendValue() in cpp/src/arrow/json/from_string.cc probes json_obj.get(array), then reuses the same ondemand value as an object. simdjson documents that a value may be consumed after a failed get(), making further use undefined.

Observed on Linux x86_64 with simdjson 4.6.4 fallback implementation: Invalid: Error getting field of object: TAPE_ERROR

Minimal repro:

[
  [{"c11": null, "c12": {"c121": -1}}, 1],
  [{"c11": 2, "c12": {"c121": null}}, 2]
]

Parsing this as struct<c1: struct<c11: int32, c12: struct<c121: int32>>, c2: int64> fails.

Component(s)

C++

Activity

  1. self-assigned this
    on Nov 11, 2026
  2. added a commit that references this issue on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions