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(vm) Fix the memory_grow test on Windows (with a bigger page guard) #2552

Merged
merged 2 commits into from
Sep 3, 2021

Conversation

ptitSeb
Copy link
Contributor

@ptitSeb ptitSeb commented Sep 3, 2021

Description

Fix the memory_grow test under Windows.

The test was failling randomly, at the step with a dynamic memory block of size 0, when trying a read/write at pagesize offset, so just outside the pagegard in that case.
It seems windows memory manager may map a writable page just after the newly alocated block, so using a "2 pages" guard size on windows to avoid this issue.

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Sep 3, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 3, 2021

Canceled.

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Sep 3, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 3, 2021

@bors bors bot merged commit 6d8f4d6 into master Sep 3, 2021
@bors bors bot deleted the fix-windows_memory_grow branch September 3, 2021 11:04
@Hywan Hywan added bug Something isn't working 🖼️ platform-windows This issue happens on Windows labels Sep 3, 2021
@@ -52,13 +52,19 @@ impl BaseTunables {

// Allocate a small guard to optimize common cases but without
// wasting too much memory.
// The Windows memory manager seems more laxed than the other ones
// And a guard of just 1 page may not be enough is some borderline cases
// So using 2 pages for guard on this plateform
Copy link
Contributor

Choose a reason for hiding this comment

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

- plateform
+ platform

:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🖼️ platform-windows This issue happens on Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants