On Wed, Aug 24, 2005 at 11:10:41AM -0600, Theo de Raadt wrote:
> > > A few things that get bitten are some packages doing their own and very
> > > different memory management, but can't avoid malloc altogether.
> > > That is ports/lang/clisp, that seems to be also gprolog

> > Can you describe how these programs manage to seg fault doing their
> > memory management? How do they run now if they don't use malloc?

> Most of those that fail assume that if malloc returns a predictable
> memory address sequence.

Actually, as far as clisp goes, it does assume there's a way to
use mmap(address) to get back to a given address.

In fact, first invocation of clisp does mmap() -> address, fill stuff,
write it out to disk.

Second invocation will reuse mmap(address) to try to get back that same
stuff at the same location and fail.

Since the way the data are filled is somewhat contrived, it's really
complicated to retrofit relocations in that... `porting' clisp to a
new platform often stops at finding a `safe' address for this kind of
mmap()...

which tends to fail under OpenBSD-current, for obvious reasons.

The only reasonable simple way I see of repairing this kind of trick
is by having some area with predictable mmap, for this kind of purpose...

Reply via email to