Skip to content

Catch fatal SBCL errors #127

Catch fatal SBCL errors

Catch fatal SBCL errors #127

Workflow file for this run

name: Linux
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v1
with:
repository: sbcl/sbcl
ref: sbcl-2.2.4
path: sbcl
- name: install host sbcl
run: |
sudo apt-get -qq update | true
sudo apt-get -qq install sbcl libcapstone-dev
- name: build sbcl
working-directory: ../sbcl
env:
SBCL_MAKE_TARGET_2_OPTIONS: --disable-ldb --disable-debugger
run: |
./make.sh --xc-host='sbcl --dynamic-space-size 700MB --lose-on-corruption --disable-ldb --disable-debugger'
./make-shared-library.sh
- name: install quicklisp
working-directory: ../sbcl
run: |
curl -O https://beta.quicklisp.org/quicklisp.lisp
./run-sbcl.sh --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))" --eval "(quit)"
- name: build and run example
working-directory: examples/libcalc
env:
SBCL_SRC: ${{ github.workspace }}/../sbcl
LIBRARY_PATH: ${{ github.workspace }}/../sbcl/src/runtime:${{ github.workspace }}/examples/libcalc
LD_LIBRARY_PATH: ${{ github.workspace }}/../sbcl/src/runtime:/usr/local/lib
CL_SOURCE_REGISTRY: "${{ github.workspace }}//"
run: |
$SBCL_SRC/run-sbcl.sh --script script.lisp
gcc -Wall -fPIC -shared -o libcalc.so libcalc.c -lsbcl
gcc -Wall -o example example.c -lcalc -lsbcl
sudo mv libcalc.so /usr/local/lib
sudo cp libcalc.core /usr/local/lib
echo "(+ 1 2)" | ./example | tr -d '\n' | grep "> 3> "
echo "(+ 1 2)" | python ./example.py | tr -d '\n' | grep "> 3> "
python ./exhaust_heap.py | grep "returned to Python with error code 2 after heap exhaustion"