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

Crash when running from Cmder #55

Closed
Sh4rK opened this issue Sep 3, 2015 · 1 comment
Closed

Crash when running from Cmder #55

Sh4rK opened this issue Sep 3, 2015 · 1 comment
Labels

Comments

@Sh4rK
Copy link
Contributor

Sh4rK commented Sep 3, 2015

I use Cmder (https://github.com/cmderdev/cmder) as it's much nicer than the basic cmd. However, flinux crashes immediatly with it trying to run anything. Flog: http://pastebin.com/yJsgUHZU

I traced down the cause: mm_init calls mm_mmap to allocate memory for the static alloc (static_alloc_begin). mm_mmap calls mmap_internal, which then calls find_free_pages_topdown, and there's where the error happens, as the returned address range is already partly VirtualAlloc-ed by something else (some part of Cmder). Then the VirtualAlloc obviously fails later on in mmap_internal.

I don't understand exactly how everything works, but shouldn't find_free_pages_topdown and find_free_pages check whether the memory regions are already allocated or not?

@wishstudio wishstudio added the bug label Sep 3, 2015
@wishstudio
Copy link
Owner

I believe this relates to issue #20 , which I planned to fix but haven't :-p

Your guess is right, currently we don't check if the memory is actually available in find_free_pages[_topdown].

My plan is to test the availability using VirtualQuery(), if the memory region is unavailable, create a special placeholder map_entry to avoid future confusions and restart.

@Sh4rK Sh4rK changed the title Crash when run from Cmder Crash when ran from Cmder Sep 3, 2015
@Sh4rK Sh4rK changed the title Crash when ran from Cmder Crash when running from Cmder Sep 9, 2015
@Sh4rK Sh4rK closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants