Skip to content
Commit Detail

Commit 2a853c8

Author
Felix Hanau <felix@cloudflare.com> 2024-05-01 21:52:19 -0400
Parents
2157142
Tree
48a4fca
Fix minor undefined behavior in SchemaFileImpl

Trying to mmap an empty file, then releasing the contents caused an
empty kj::Array to be created and a new array being created from it,
resulting in a "reference binding to null pointer" warning based on the
disposer of the empty array being null.
Not calling mmap if the file is empty fixes the issue here. It is likely
that similar patterns exist in other places, that can be addressed at a
future time within capnproto.

Files changed

1 file changed~1 modified