diff --git a/src/interpret.cpp b/src/interpret.cpp index 9f28a2f769..c3617122a5 100644 --- a/src/interpret.cpp +++ b/src/interpret.cpp @@ -3166,7 +3166,7 @@ class MyProcessor: public Processor { } virtual void dispose(vm::Thread* t) { - t->m->heap->free(t, sizeof(Thread)); + t->m->heap->free(t, sizeof(Thread) + t->m->stackSizeInBytes); } virtual void dispose() { diff --git a/src/posix.cpp b/src/posix.cpp index 6b2184011b..6ea15ab118 100644 --- a/src/posix.cpp +++ b/src/posix.cpp @@ -904,6 +904,7 @@ class MySystem: public System { } virtual void abort() { + *static_cast(0) = 0; ::abort(); }