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

Add FLATCC_ENFORCE_ALIGNED_EMPTY_VECTORS #289

Merged
merged 5 commits into from
Aug 19, 2024
Merged

Conversation

bkietz
Copy link
Contributor

@bkietz bkietz commented Aug 16, 2024

An option is added which, if enabled, causes verifier to only require empty vectors be aligned to 4 bytes.

discussion at #287

Copy link
Contributor

@mikkelfj mikkelfj left a comment

Choose a reason for hiding this comment

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

That was fast. I don't entirely agree with updating the reader as per my comments inline, but I'm impressed you were able to dig that deep into the code so fast.

I think we should focus on getting the verifier online. We could also do a code review to understand the implications of unligned vectors for the actual code.

Maybe we should rename the flat FLATCC_VERIFIER_TOLERATE_... to indicate that this is then verfier specific.

test/load_test/load_test.c Outdated Show resolved Hide resolved
src/runtime/verifier.c Outdated Show resolved Hide resolved
src/compiler/codegen_c_reader.c Outdated Show resolved Hide resolved
include/flatcc/flatcc_flatbuffers.h Outdated Show resolved Hide resolved
Copy link
Contributor

@mikkelfj mikkelfj left a comment

Choose a reason for hiding this comment

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

I think this looks good, a part from a few minor comments:

src/runtime/verifier.c Outdated Show resolved Hide resolved
include/flatcc/flatcc_rtconfig.h Show resolved Hide resolved
include/flatcc/flatcc_rtconfig.h Show resolved Hide resolved
src/runtime/verifier.c Show resolved Hide resolved
src/runtime/verifier.c Outdated Show resolved Hide resolved
@bkietz bkietz marked this pull request as ready for review August 19, 2024 16:25
@mikkelfj
Copy link
Contributor

Yeah, I think that is good, aside from the PR title. When you are ready I'll squash and merge.

@bkietz bkietz changed the title sketch FLATCC_TOLERATE_MISALIGNED_EMPTY_VECTORS Add FLATCC_ENFORCE_ALIGNED_EMPTY_VECTORS Aug 19, 2024
@mikkelfj mikkelfj merged commit fd3c4ae into dvidelabs:master Aug 19, 2024
5 checks passed
bkietz added a commit to apache/arrow-nanoarrow that referenced this pull request Aug 27, 2024
After dvidelabs/flatcc#289 flatcc will not
enforce alignment on empty vectors. This will let us unskip the
null_trivial case in the integration tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants