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

windows os_mmap bh_assert FAILED: (uintptr_t)mem < INT32_MAX #4115

Closed
calvin2021y opened this issue Feb 26, 2025 · 3 comments
Closed

windows os_mmap bh_assert FAILED: (uintptr_t)mem < INT32_MAX #4115

calvin2021y opened this issue Feb 26, 2025 · 3 comments

Comments

@calvin2021y
Copy link

calvin2021y commented Feb 26, 2025

after enable DEBUG, windows os_mmap get this error:

Register native, size: 32                                                                             
Register native, size: 32                                                                             
Register native, size: 32                                                                             
Map memory, request_size: 4096, alloc_type: 0x3000, protect: 0x40, ret: 000011aa50450000                                                                                    
[11:32:31:730 - 1C4]:                                                                                 
ASSERTION FAILED: (uintptr_t)mem < INT32_MAX, at file wamr\core\iwasm\aot\aot_loader.c, line 323
@TianlongLiang
Copy link
Collaborator

TianlongLiang commented Feb 27, 2025

On Windows, the flag MMAP_MAP_32BIT doesn't guarantee that we get a 0 to 2GB address. In fact, after I checked the API document of VirtualAlloc, there is no similar flag to achieve that.

@lxbxl
Copy link

lxbxl commented Feb 27, 2025

In my case, modify the os_mmap function on the Windows platform to directly return null when the flags contain MMAP_MAP_32BIT.

@lum1n0us
Copy link
Collaborator

lum1n0us commented Mar 5, 2025

#4119 should be able to address that issue.

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

4 participants