Skip to content

Conversation

jtbandes
Copy link

@jtbandes jtbandes commented Oct 30, 2024

According to the internals docs, vtable entries are uint16 rather than int16.

This change allows reading to work when vtable entries are larger than 2^15-1 (which already works in C++). For example, the following schema is now readable:

struct FixedArray {
  // This array is large enough that it pushes the offset of another_double above INT16_MAX
  fixed_array:[double:5555];
}

table LargeOffset {
  another_double:double;
  fixed_array:FixedArray;
}

root_type LargeOffset;

(I ran into this bug in the wild when a user showed up with a schema having ~4500 fields, mostly doubles.)

Copy link
Contributor

This pull request is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Jul 25, 2025
@jtbandes
Copy link
Author

Still valid I believe.

@github-actions github-actions bot removed the stale label Jul 26, 2025
@bjornharrtell bjornharrtell self-requested a review August 24, 2025 15:16
Copy link
Collaborator

@bjornharrtell bjornharrtell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants