OpenMCL Bug Fix

There is a bug that could affect users of OpenMCL Version 0.14.2 or 0.14.3 under Version 10.4 or 10.4.1 of Mac OS X. The symptom can be a bus error such as the following.
../../saved_acl2: line 2:  6917 Bus error               "/Applications/ccl/dppccl" -I "/Users/destiny6/Software/ACL2//saved_acl2.dppccl" -e "(acl2::acl2-default-restart)"
Gary Byers has graciously provided a fix. He says the following, and Robert Krug has kindly tested out this fix and found that it worked.

The problem that I'm aware of is in the lisp kernel, in the file
"ccl:lisp-kernel;thread-manager.c", in this code:

==============================
Boolean
suspend_tcr(TCR *tcr)
{
   int suspend_count = atomic_incf(&(tcr->suspend_count));
   if (suspend_count == 1) {
#ifdef DARWIN
       if (mach_suspend_tcr(tcr)) {
 	tcr->flags |= TCR_FLAG_BIT_ALT_SUSPEND;
 	return true;
       }
#endif
     if (pthread_kill((pthread_t)ptr_from_lispobj(tcr->osid), thread_suspend_signal) == 0) {
===============================

I -believe- that the problem's in mach_suspend_tcr(); if the #ifdef DARWIN
code is commented out or otherwise disabled, the problem seems to go away.

(e.g., if the fragment above is changed to:

==============================
Boolean
suspend_tcr(TCR *tcr)
{
   int suspend_count = atomic_incf(&(tcr->suspend_count));
   if (suspend_count == 1) {
#if 0
       if (mach_suspend_tcr(tcr)) {
 	tcr->flags |= TCR_FLAG_BIT_ALT_SUSPEND;
 	return true;
       }
#endif
     if (pthread_kill((pthread_t)ptr_from_lispobj(tcr->osid), thread_suspend_signal) == 0) {
===============================

or something similar.)