default:
result = NULL; /* initialized to prevent warning. */
GC_err_printf("GC_debug_realloc: encountered bad kind\n");
- ABORT("Bad kind");
+ ABORT_RET("Bad kind");
}
if (result != NULL) {
struct GC_ms_entry * mark_stack_limit GC_ATTR_UNUSED,
word env GC_ATTR_UNUSED)
{
- ABORT("No client gcj mark proc is specified");
+ ABORT_RET("No client gcj mark proc is specified");
return mark_stack_ptr;
}
# endif
# endif
+/* Same as ABORT but does not have 'no-return' attribute. */
+/* ABORT on dummy condition (which is always true). */
+#define ABORT_RET(msg) { if ((signed_word)GC_current_warn_proc != -1) \
+ ABORT(msg); }
+
/* Exit abnormally, but without making a mess (e.g. out of memory) */
# ifdef PCR
# define EXIT() PCR_Base_Exit(1,PCR_waitForever)
}
goto retry;
default:
- /* Can't happen. */
limit = 0; /* initialized to prevent warning. */
+ ABORT_RET("GC_mark_from: bad state");
}
} else /* Small object with length descriptor */ {
mark_stack_top--;
thread_state_t old_state GC_ATTR_UNUSED, int old_stateCnt GC_ATTR_UNUSED,
thread_state_t new_state GC_ATTR_UNUSED, int new_stateCnt GC_ATTR_UNUSED)
{
- ABORT("Unexpected catch_exception_raise_state invocation");
+ ABORT_RET("Unexpected catch_exception_raise_state invocation");
return(KERN_INVALID_ARGUMENT);
}
thread_state_t old_state GC_ATTR_UNUSED, int old_stateCnt GC_ATTR_UNUSED,
thread_state_t new_state GC_ATTR_UNUSED, int new_stateCnt GC_ATTR_UNUSED)
{
- ABORT("Unexpected catch_exception_raise_state_identity invocation");
+ ABORT_RET("Unexpected catch_exception_raise_state_identity invocation");
return(KERN_INVALID_ARGUMENT);
}
return(GC_descr_obj_size(d -> sd.sd_first)
+ GC_descr_obj_size(d -> sd.sd_second));
default:
- ABORT("Bad complex descriptor");
- /*NOTREACHED*/ return 0; /*NOTREACHED*/
+ ABORT_RET("Bad complex descriptor");
+ return 0;
}
}
return(msp);
}
default:
- ABORT("Bad complex descriptor");
- /*NOTREACHED*/ return 0; /*NOTREACHED*/
+ ABORT_RET("Bad complex descriptor");
+ return 0;
}
}