Clisp on OpenBSD

0 views
Skip to first unread message

Hannah Schroeter

unread,
May 4, 2005, 10:24:05 AM5/4/05
to
Hello!

Seems clisp can't cope with the changes in OpenBSD-current (after the
tag for the upcoming 3.7 release, so the release seems still to include
a working clisp (based on 2.33.2)).

I asked around on the OpenBSD ports mailing list and got the hint that
the problem might very probably be related to the changes in the
malloc implementation, which now uses mmap for all allocations,
and non-MAP_FIXED mappings are randomized by the kernel's mmap
implementation.

A typical error I get when building on OpenBSD 3.7-current, i386 is like
this:

./lisp.run -B . -N locale -Efile UTF-8 -Eterminal UTF-8 -norc -m 750KW -x "(and (load \"init.lisp\") (sys::%saveinitmem) (ext::exit))"
Cannot map memory to address 0xe8477000 .
errno = EINVAL: Invalid argument.
Trying to make room through a GC...
Cannot map memory to address 0xe8477000 .
errno = EINVAL: Invalid argument.
Trying to make room through a GC...
Segmentation fault (core dumped)

And yeah, you can't mmap with MAP_FIXED and a hint of 0xe8477000, as
the mappable area is between 0 and 0xcfbfe000.

Can someone help out?

Kind regards,

Hannah.

Florian Weimer

unread,
May 4, 2005, 11:49:38 AM5/4/05
to
* Hannah Schroeter:

> I asked around on the OpenBSD ports mailing list and got the hint that
> the problem might very probably be related to the changes in the
> malloc implementation, which now uses mmap for all allocations,
> and non-MAP_FIXED mappings are randomized by the kernel's mmap
> implementation.

Correct. Unfortunately, the OpenBSD maintainers refuse to add ways to
reenable deterministic mappings.

The solution is simple: Don't use OpenBSD. Other systems provide both
address space randomization (for processes mainly written in C) and
backwards-compatible mappings for everything else.

Sam Steingold

unread,
May 4, 2005, 12:23:49 PM5/4/05
to
> * Hannah Schroeter <una...@fpuyhaq.qr> [2005-05-04 14:24:05 +0000]:

Take a look at clisp/unix/PLATFORMS - it contains many portability hints.

--
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://pmw.org.il/> <http://www.memri.org/> <http://www.mideasttruth.com/>
<http://www.palestinefacts.org/> <http://ffii.org/> <http://www.camera.org>
I just forgot my whole philosophy of life!!!

Bruno Haible

unread,
May 6, 2005, 8:26:24 AM5/6/05
to
Hannah Schroeter wrote:

> A typical error I get when building on OpenBSD 3.7-current, i386 is like
> this:

> Cannot map memory to address 0xe8477000 .
> errno = EINVAL: Invalid argument.

> ...


> the mappable area is between 0 and 0xcfbfe000.

Try building clisp with the following in the Makefile's CFLAGS:
-DNO_SINGLEMAP -DNO_TRIVIALMAP -DNO_MULTIMAP_FILE -DNO_MULTIMAP_SHM

This will disable the use of mmap() and generational GC, but yield a
working clisp.

Bruno

Reply all
Reply to author
Forward
0 new messages