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

fd_t::resize does not update internal size to new size #65

Closed
lethalbit opened this issue Jun 3, 2023 · 0 comments · Fixed by #68
Closed

fd_t::resize does not update internal size to new size #65

lethalbit opened this issue Jun 3, 2023 · 0 comments · Fixed by #68
Assignees
Labels
bug Something isn't working

Comments

@lethalbit
Copy link
Member

I was inspecting some code and noticed that the resize call in fd_t does not change the internal length tracking for the open file, causing a desync if resize is ever called.

substrate/substrate/fd

Lines 122 to 124 in d0ea63f

SUBSTRATE_NO_DISCARD(bool resize(const off_t newSize) const noexcept)
{ return internal::fdtruncate(fd, newSize) == 0; }

@lethalbit lethalbit added the bug Something isn't working label Jun 3, 2023
amyspark added a commit that referenced this issue Jun 4, 2023
@amyspark amyspark self-assigned this Jun 4, 2023
amyspark added a commit that referenced this issue Jun 5, 2023
amyspark added a commit that referenced this issue Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants