Hi all,

bad news: The 64-bit version of PicoLisp doesn't (yet) run properly on
Ubuntu 12.04 LTS.

I've noticed the day before yesterday that some internal calls to C
libraries (e.g. dlopen()) crashed with segfaults. To be precise: In the
'movdqa' instruction.

I could eventually locate the problem. It is because the Ubuntu
libraries seem to be compiled in such a way that they expect (and
require!) the runtime stack to be aligned to a multiple of 16 bytes (and
not just 8 bytes as imposed by the hardware).

I knew of such a recommendation in the x86-64 ABI, but I didn't expect
it to be a _requirement_ (instead of just an optimization). Therefore,
Pil64 was built in such a way that only calls to the 'native' function
aligned the stack.

For "normal" calls (i.e. to the built-in C libraries) the stack was not
necessarily aligned. This was for efficiency. And under the assumption
that the standard libraries would not use SSE instructions, and that
such an optimization would not matter. Also, guaranteeing the stack
alignment is not trivial because PicoLisp pushes and pops the stack
dynamically, without keeping track of alignment or stack frames.

On Debian it worked fine all the time.

But as I don't know what Debian will do in the future, and I also want
it to run on Ubuntu, I've changed the C call mechanisms today. It is
available with 3.1.0.4, downloadable as the current testing version.

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to