ikvmnet / ikvm

A Java Virtual Machine and Bytecode-to-IL Converter for .NET
Other
1.24k stars 116 forks source link

PosixExecutableVirtualMemory / UnixExecutableVirtualMemory ReleaseHandle is invoking 'free' to release mmaped memory, while on linux this should call munmap. #387

Closed pruiz closed 1 year ago

pruiz commented 1 year ago

This is provoking a crash while the application shutsdown on linux due to JNI's FunctionTable.memory finalizer.

See: https://github.com/ikvmnet/ikvm/blob/872ba10e791a3cfbdc380bd731ce1585e2ccb16c/src/IKVM.Runtime/Memory/PosixExecutableVirtualMemory.cs#L55