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

VirtualAlloc'd bytes not showing consistently in memory window #353

Closed
Falconerd opened this issue Nov 4, 2024 · 1 comment
Closed

VirtualAlloc'd bytes not showing consistently in memory window #353

Falconerd opened this issue Nov 4, 2024 · 1 comment
Labels
Bug A report of unintended or broken behavior. Debugger Pertains to the debugger.

Comments

@Falconerd
Copy link

Falconerd commented Nov 4, 2024

Hi Ryan,

I made a program here in C using VirtualAlloc to allocate some bytes.

When the data written into the bytes straddles the top edge of the memory window, I can see it. Otherwise, it shows all 00.

Here's the code I used:

#include <windows.h>
#include <string.h>

int main(void) {
	char *my_chars = VirtualAlloc(0, 1024, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);

	memset(my_chars, 0xcd, 128);

	__debugbreak();
}

Compiled with: cl /Z7 file.c

This issue does not seem to happen with stdlib malloc

I made a little video showing what I mean:

zzz_2024-11-05_10-24-24.mp4
@ryanfleury ryanfleury added Bug A report of unintended or broken behavior. Debugger Pertains to the debugger. labels Nov 10, 2024
@ryanfleury
Copy link
Collaborator

Thanks for investigating this. This should now be fixed as of 95fe497.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A report of unintended or broken behavior. Debugger Pertains to the debugger.
Projects
None yet
Development

No branches or pull requests

2 participants