Skip to content

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

Closed

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 2 commits that reference this issue on Nov 11, 2026
  3. added this to the 27.0.0 milestone on Nov 16, 2026
  4. wgtmac commented on Nov 16, 2026

    @wgtmac
    MemberAuthor

    Issue resolved by pull request 55498
    #55498

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions