allocateExec: can't handle large objects
ghci T11535.hs
fails on Windows with:
GHCi, version 8.0.0.20160421: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( T11535.hs, interpreted )
ghc.exe: internal error: allocateExec: can't handle large objects
(GHC version 8.0.0.20160421 for x86_64_unknown_mingw32)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
See also this comment in rts/sm/Storage.c
:
/* ----------------------------------------------------------------------------
Executable memory
Executable memory must be managed separately from non-executable
memory. Most OSs these days require you to jump through hoops to
dynamically allocate executable memory, due to various security
measures.
Here we provide a small memory allocator for executable memory.
Memory is managed with a page granularity; we allocate linearly
in the page, and when the page is emptied (all objects on the page
are free) we free the page again, not forgetting to make it
non-executable.
TODO: The inability to handle objects bigger than BLOCK_SIZE_W means that
the linker cannot use allocateExec for loading object code files
on Windows. Once allocateExec can handle larger objects, the linker
should be modified to use allocateExec instead of VirtualAlloc.
------------------------------------------------------------------------- */
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System (Linker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | Phyx- |
Operating system | |
Architecture |