The return value of N_OP_unwind is really of type LispPTR *, however it was
declared as UNSIGNED (effectively uintptr_t) so that the ERROR_EXIT macro
could be used to return an error indication (-1, =UINT_MAX). The call site
checked for the error condition with (int)result < 0, not accounting for the
case where a native pointer may have the high-order bit set.
We correct this problem by declaring the return type as LispPTR *,
and expand the ERROR_EXIT macro in place substituting (LispPTR *)(-1)
as the error return value, and at the single call site check for equality
with that same value.
The test case was executing the opcode tester on a Raspberry Pi or
a BeagleBone Black/Debian 10.3 where the non-error result was > 0xB0000000
modified: inc/inlineC.h
modified: inc/unwinddefs.h
modified: src/unwind.c
Maiko
This is the implementation of the Medley Interlisp virtual machine, for a byte-coded Lisp instruction set and some low-level functions for connecting with Lisp for access to display and disk etc.
There are make file fragments that include all the flags and variables you have to set for each hardware/OS target.
- cd to the "bin" directory
- have "." on your PATH
- do "./makeright x"
It will (attempt to) detect the OS-type and cpu-type, and put together the makefile parts that it needs. It will build in ../ostype.cputype-x (for the .o files) and ../ostype.cputype for the executables.
Development Platforms
We are developing on FreeBSD, Linux, macOS, and Solaris currently on arm, arm64, PowerPC, SPARC, x86, and x86_64 hardware.
We believe it will work on these platforms.
Fixes and improvements for additional platforms and hardware is welcome. Work is underway to run better on Windows.
In the past, Maiko ran on DOS. This may or may not still work.