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

Avoid prematurely freeing buffer during value editing on Linux. #141

Merged
merged 2 commits into from
May 16, 2024

Conversation

cristian64
Copy link
Collaborator

This was a regression in d58cd76, where the deletion of the bufferCopy buffer was moved to an earlier point. It was overlooked that the buffer is referenced by the local structure that used in the process_vm_writev() call.

The symptoms were garbage being written into Dolphin's memory when the user would edit a value in a watch node (e.g. user enters 7 in a integer, but 251 was written).

Bonus: Some wrong assertions (a regression too, in e9c0e22) have been removed.

These assertions were added in e9c0e22, but they are *not*
correct. A type size of 1 (e.g. `char`) can be encountered, and it is a
valid case that simply does not support any byte swapping.

(Another case had already been fixed in 11e56d6.)
This was a regression in d58cd76, where the deletion of
the `bufferCopy` buffer was moved to an earlier point. It was overlooked
that the buffer is referenced by the `local` structure that used in the
`process_vm_writev()` call.
@dreamsyntax dreamsyntax merged commit ec97744 into aldelaro5:master May 16, 2024
4 checks passed
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