Release 0.0.3 - mmap failure under Cygwin (Windows 7)

Bug #1173808 reported by Daniel Ritchie
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ikarus Scheme
New
Undecided
Unassigned

Bug Description

Attempting to build ikarus release 0.0.3 via Cygwin on a 64-bit Windows machine:

../src/ikarus -b ./ikarus.boot.prebuilt --r6rs-script makefile.ss
failed to mmap: Cannot allocate memory

Revision history for this message
Holger Friedrich (holgerf) wrote :

I tried to trace this problem. mmap gets a request to map ~4GB of memory. This is not intended and is cause by integer arithmetic in ikarus-runtime.c which runs into an overflow.
This seems to happen if you have more than 4GB memory. The first mmap call gives an address just below the 4GB boundary, and the calculations do overflow.

I attached a patch with a workaround (allocate a block of memory on the first run, such that all further allocations do get smaller addresses). This resolved the problem for me for now, but it needs a proper fix...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.