Skip to content

fix memory issue in memory-map #149

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

Merged
merged 1 commit into from
Jun 20, 2023
Merged

fix memory issue in memory-map #149

merged 1 commit into from
Jun 20, 2023

Conversation

phip1611
Copy link
Member

@phip1611 phip1611 commented Jun 20, 2023

Via git-bisecting, I could find that d198dce broke something with the (legacy) memory map tag. This MR fixes the problem and adds a unit test for it.

The problem was that the MemoryMapTag became a DST by changing the last field to areas: [MemoryArea]. The TagTrait for MemoryMapTag-implementation returned a wrong DST size. Because of that, Rust thought that the DST is much larger than it actually is -> access to invalid memory.

Also see: #133

@phip1611 phip1611 self-assigned this Jun 20, 2023
@phip1611 phip1611 marked this pull request as draft June 20, 2023 16:10
@phip1611 phip1611 changed the title fix memory issue in memory-map Draft: fix memory issue in memory-map Jun 20, 2023
@phip1611 phip1611 changed the title Draft: fix memory issue in memory-map fix memory issue in memory-map Jun 20, 2023
@phip1611 phip1611 marked this pull request as ready for review June 20, 2023 16:33
@phip1611
Copy link
Member Author

That was a fun one, @YtvwlD :D

@phip1611 phip1611 force-pushed the mem-fix branch 2 times, most recently from 9e436af to 727a182 Compare June 20, 2023 16:38
@phip1611 phip1611 merged commit d48ba09 into main Jun 20, 2023
@phip1611 phip1611 deleted the mem-fix branch June 20, 2023 16:49
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.

1 participant