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

stlink_probe.read_memory_block8 returning extra bytes on un-aligned 1 byte read #1444

Closed
pdietl opened this issue Aug 19, 2022 · 2 comments
Closed

Comments

@pdietl
Copy link

pdietl commented Aug 19, 2022

It seems to me that commit 46f1ac6 introduced a bug. The function stlink_probe.read_memory_block8 will return an array with two bytes in it if the addressed is aligned on a 2-byte boundary but a read of 1 byte (size=1) is requested. This ends up causing an assertion at /memory.py(263)read_memory_block8(): 0107462 E Unhandled exception in handle_message (b'v'): result size (2) != requested size (1) [gdbserver]

I assume we need to add something along the lines of array[0] somewhere, though I am not sure about the appropriate place.

@flit

@flit
Copy link
Member

flit commented Oct 22, 2022

Thanks for the detailed report! (And very sorry it took a long time.) Fortunately, it looks like this was fixed in #1428 and released in v0.34.1. If you still have a problem, please reopen this issue.

@flit flit closed this as completed Oct 22, 2022
@DariusBabrauskas
Copy link

v0.34.2 still have same problem. #1428 not fix this problem. But error in same place. Error occurs if (address & 3) >1 and read size 1 or 2.

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

No branches or pull requests

3 participants