Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript: read vtable entries as uint16 #8435

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.)

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.

1 participant