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

Fix #1826 - emulator crash when too many versions of a file in a directory #512

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

nbriggs
Copy link
Collaborator

@nbriggs nbriggs commented Sep 11, 2024

This is a preliminary fix to avoid a system crash (bus error/seg fault) when operating on a file with too many versions present in the directory.

Reports an error (EIO, SIMPLE-DEVICE-ERROR) when doing an operation that would result in an out-of-bounds access in the emulator.

A better fix would be to dynamically allocate the necessary version storage, but that will
take longer to work out.

Test environment is a directory that contains over 200 versions of a file and you attempt to do a create (new version) or delete operation on the file.

Verified

This commit was signed with the committer’s verified signature.
G8XSU Gursharan Singh
…ctory

This is a preliminary fix to avoid a system crash (bus error/seg fault) when
operating on a file with too many versions present in the directory.

Initial fix is to report an error (EIO, SIMPLE-DEVICE-ERROR) when doing
an operation that would result in an out-of-bounds access in the emulator.
Copy link
Collaborator Author

@nbriggs nbriggs left a comment

Choose a reason for hiding this comment

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

@MattHeffron - I read through the DOS part again, and I believe it is correct.
At the only point where it increments the varray_index value it checks that it remains within bounds, and the last value that it takes on (and no greater) will be used to access the array at that index when the loop exits. If the value goes out of range - well, that's where I have no idea how to report the value upstream.

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.

None yet

1 participant