Skip to content

[C++] StructArray::field() is not thread safe #48134

Closed

Description

@tobim

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

It is possible for two threads calling StructArray::field() with the same index at the same time to cause a race on the stored entry in boxed_fields_. I.e. if a second thread goes into the path that calls MakeArray() before the first thread stored its own new array, the second thread would also write to the same shared_ptr and invalidate the shared_ptr from the first thread, thereby also invalidating the returned reference.

Component(s)

C++

Activity

  1. changed the title [-]StructArray::field() is not thread safe[/-] [+][C++] StructArray::field() is not thread safe[/+] on Nov 14, 2025
  2. added a commit that references this issue on Nov 20, 2025
  3. added this to the 23.0.0 milestone on Nov 20, 2025
  4. pitrou commented on Nov 20, 2025

    @pitrou
    Member

    Issue resolved by pull request 48128
    #48128

  5. added a commit that references this issue on May 26, 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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions