Map bricks below first 2GB of address space#132
Conversation
This fixes an issue with mono where JIT compiled code would near-call wrapped libraries, but fail because the difference between PC and the call address did not fit into an imm32. This was fixed by replacing posix_memalign with my_mmap and providing the MAP_32BIT flag. Fixes ptitSeb#131
FreeBridge used free to clean up the pointer allocated by my_mmap, which is incorrect and lead to a crash upon code that exited gracefully. The free was replaced with my_munmap.
You can just add a declaration of the functions at the beginning of the C file. I haven't create a .h with those function. I'll probably add them to |
|
Can you try to run Wine 64bits with this build. Just to be sure, because the first bricks will take a very low address, and I remember that wine tries to allocates them too (cannot tests that myself before next week) |
|
I'm busy right now, but will do in the afternoon. |
This adds a declaration of my_mmap and my_munmap to src/tools/bridge.c in order to avoid a -Wimplicit-function-declaration warning when compiling. This should probably be moved to a header file in the future.
|
Wine works without errors. Ready to merge from my end. |
This fixes an issue with mono where JIT compiled code would near-call wrapped libraries, but fail because the difference between PC and the call address did not fit into an imm32.
This was fixed by replacing posix_memalign with my_mmap and providing the MAP_32BIT flag.
Fixes #131