Properly close the output line before we die.
if (addr == MAP_FAILED) {
perror("mmap");
- lose("unexpected mmap(..) failure");
+ lose("unexpected mmap(..) failure\n");
}
return addr;
real_addr = os_map(fd, offset, addr, len);
if (real_addr != addr) {
lose("file mapped in wrong place! "
- "(0x%08x != 0x%08lx)",
+ "(0x%08x != 0x%08lx)\n",
real_addr,
addr);
}
if (addr != (os_vm_address_t)DYNAMIC_SPACE_START) {
fprintf(stderr, "in core: 0x%lx; in runtime: 0x%lx \n",
(long)addr, (long)DYNAMIC_SPACE_START);
- lose("core/runtime address mismatch: DYNAMIC_SPACE_START");
+ lose("core/runtime address mismatch: DYNAMIC_SPACE_START\n");
}
#else
if ((addr != (os_vm_address_t)DYNAMIC_0_SPACE_START) &&
(long)addr,
(long)DYNAMIC_0_SPACE_START,
(long)DYNAMIC_1_SPACE_START);
- lose("warning: core/runtime address mismatch: DYNAMIC_SPACE_START");
+ lose("warning: core/runtime address mismatch: DYNAMIC_SPACE_START\n");
}
#endif
#if defined(ALLOCATION_POINTER)
if (addr != (os_vm_address_t)STATIC_SPACE_START) {
fprintf(stderr, "in core: 0x%lx - in runtime: 0x%lx\n",
(long)addr, (long)STATIC_SPACE_START);
- lose("core/runtime address mismatch: STATIC_SPACE_START");
+ lose("core/runtime address mismatch: STATIC_SPACE_START\n");
}
break;
case READ_ONLY_CORE_SPACE_ID:
if (addr != (os_vm_address_t)READ_ONLY_SPACE_START) {
fprintf(stderr, "in core: 0x%lx - in runtime: 0x%lx\n",
(long)addr, (long)READ_ONLY_SPACE_START);
- lose("core/runtime address mismatch: READ_ONLY_SPACE_START");
+ lose("core/runtime address mismatch: READ_ONLY_SPACE_START\n");
}
break;
default:
- lose("unknown space ID %ld addr 0x%p", id);
+ lose("unknown space ID %ld addr 0x%lx\n", id, (long)addr);
}
}
}
count = read(fd, header, os_vm_page_size);
if (count < os_vm_page_size) {
- lose("premature end of core file");
+ lose("premature end of core file\n");
}
SHOW("successfully read first page of core");
val = *ptr++;
if (val != CORE_MAGIC) {
- lose("invalid magic number in core: 0x%lx should have been 0x%x.",
+ lose("invalid magic number in core: 0x%lx should have been 0x%x.\n",
val,
CORE_MAGIC);
}
case VERSION_CORE_ENTRY_TYPE_CODE:
SHOW("VERSION_CORE_ENTRY_TYPE_CODE case");
if (*ptr != SBCL_CORE_VERSION_INTEGER) {
- lose("core file version (%d) != runtime library version (%d)",
+ lose("core file version (%d) != runtime library version (%d)\n",
*ptr,
SBCL_CORE_VERSION_INTEGER);
}
* was changed, but people experimenting with patches
* don't necessarily update version.lisp-expr.) */
- lose("can't load .core for different runtime, sorry");
+ lose("can't load .core for different runtime, sorry\n");
}
case NEW_DIRECTORY_CORE_ENTRY_TYPE_CODE:
}
#endif
default:
- lose("unknown core file entry: %ld", (long)val);
+ lose("unknown core file entry: %ld\n", (long)val);
}
ptr += remaining_len;
static long
scav_return_pc_header(lispobj *where, lispobj object)
{
- lose("attempted to scavenge a return PC header where=0x%08x object=0x%08x",
+ lose("attempted to scavenge a return PC header where=0x%08x object=0x%08x\n",
(unsigned long) where,
(unsigned long) object);
return 0; /* bogus return value to satisfy static type checking */
static long
scav_fun_header(lispobj *where, lispobj object)
{
- lose("attempted to scavenge a function header where=0x%08x object=0x%08x",
+ lose("attempted to scavenge a function header where=0x%08x object=0x%08x\n",
(unsigned long) where,
(unsigned long) object);
return 0; /* bogus return value to satisfy static type checking */
static lispobj
trans_immediate(lispobj object)
{
- lose("trying to transport an immediate");
+ lose("trying to transport an immediate\n");
return NIL; /* bogus return value to satisfy static type checking */
}
static long
scav_lose(lispobj *where, lispobj object)
{
- lose("no scavenge function for object 0x%08x (widetag 0x%x)",
+ lose("no scavenge function for object 0x%08x (widetag 0x%x)\n",
(unsigned long)object,
widetag_of(*(lispobj*)native_pointer(object)));
static lispobj
trans_lose(lispobj object)
{
- lose("no transport function for object 0x%08x (widetag 0x%x)",
+ lose("no transport function for object 0x%08x (widetag 0x%x)\n",
(unsigned long)object,
widetag_of(*(lispobj*)native_pointer(object)));
return NIL; /* bogus return value to satisfy static type checking */
static long
size_lose(lispobj *where)
{
- lose("no size function for object at 0x%08x (widetag 0x%x)",
+ lose("no size function for object at 0x%08x (widetag 0x%x)\n",
(unsigned long)where,
widetag_of(LOW_WORD(where)));
return 1; /* bogus return value to satisfy static type checking */
* (long) in code like this, so that it is less likely to
* break randomly when running on a machine with different
* word sizes. -- WHN 19991129 */
- lose("The new region at %x is not zero.", p);
+ lose("The new region at %x is not zero.\n", p);
}
}
}
"Argh! gc_find_free_space failed (first_page), nbytes=%ld.\n",
nbytes);
print_generation_stats(1);
- lose(NULL);
+ lose("\n");
}
gc_assert(page_table[first_page].write_protected == 0);
"Argh! gc_find_freeish_pages failed (restart_page), nbytes=%ld.\n",
nbytes);
print_generation_stats(1);
- lose(NULL);
+ lose("\n");
}
*restart_page_ptr=first_page;
/* Scavenge element 0, which may be a hash-table structure. */
scavenge(where+2, 1);
if (!is_lisp_pointer(where[2])) {
- lose("no pointer at %x in hash table", where[2]);
+ lose("no pointer at %x in hash table\n", where[2]);
}
hash_table = (struct hash_table *)native_pointer(where[2]);
/*FSHOW((stderr,"/hash_table = %x\n", hash_table));*/
if (widetag_of(hash_table->header) != INSTANCE_HEADER_WIDETAG) {
- lose("hash table not instance (%x at %x)",
+ lose("hash table not instance (%x at %x)\n",
hash_table->header,
hash_table);
}
* the hash table code reserves for marking empty slots. */
scavenge(where+3, 1);
if (!is_lisp_pointer(where[3])) {
- lose("not empty-hash-table-slot symbol pointer: %x", where[3]);
+ lose("not empty-hash-table-slot symbol pointer: %x\n", where[3]);
}
empty_symbol = where[3];
/* fprintf(stderr,"* empty_symbol = %x\n", empty_symbol);*/
if (widetag_of(*(lispobj *)native_pointer(empty_symbol)) !=
SYMBOL_HEADER_WIDETAG) {
- lose("not a symbol where empty-hash-table-slot symbol expected: %x",
+ lose("not a symbol where empty-hash-table-slot symbol expected: %x\n",
*(lispobj *)native_pointer(empty_symbol));
}
/* Cross-check the kv_vector. */
if (where != (lispobj *)native_pointer(hash_table->table)) {
- lose("hash_table table!=this table %x", hash_table->table);
+ lose("hash_table table!=this table %x\n", hash_table->table);
}
/* WEAK-P */
length = fixnum_value(((lispobj *)native_pointer(index_vector_obj))[1]);
/*FSHOW((stderr, "/length = %d\n", length));*/
} else {
- lose("invalid index_vector %x", index_vector_obj);
+ lose("invalid index_vector %x\n", index_vector_obj);
}
}
next_vector_length = fixnum_value(((lispobj *)native_pointer(next_vector_obj))[1]);
/*FSHOW((stderr, "/next_vector_length = %d\n", next_vector_length));*/
} else {
- lose("invalid next_vector %x", next_vector_obj);
+ lose("invalid next_vector %x\n", next_vector_obj);
}
}
page_table[i].bytes_used,
page_table[i].first_object_offset,
page_table[i].dont_move));
- lose("write to protected page %d in scavenge_generation()", i);
+ lose("write to protected page %d in scavenge_generation()\n", i);
}
}
#endif
&& (page_table[i].gen == generation)
&& (page_table[i].write_protected_cleared != 0)
&& (page_table[i].dont_move == 0)) {
- lose("write protected page %d written to in scavenge_newspace_generation\ngeneration=%d dont_move=%d",
+ lose("write protected page %d written to in scavenge_newspace_generation\ngeneration=%d dont_move=%d\n",
i, generation, page_table[i].dont_move);
}
}
os_invalidate(page_start, PAGE_BYTES*(last_page-first_page));
addr = os_validate(page_start, PAGE_BYTES*(last_page-first_page));
if (addr == NULL || addr != page_start) {
- lose("free_oldspace: page moved, 0x%08x ==> 0x%08x",page_start,
- addr);
+ lose("free_oldspace: page moved, 0x%08x ==> 0x%08x\n",
+ page_start, addr);
}
} else {
long *page_start;
* page. XX Could check the offset too. */
if ((page_table[page_index].allocated != FREE_PAGE_FLAG)
&& (page_table[page_index].bytes_used == 0))
- lose ("Ptr %x @ %x sees free page.", thing, start);
+ lose ("Ptr %x @ %x sees free page.\n", thing, start);
/* Check that it doesn't point to a forwarding pointer! */
if (*((lispobj *)native_pointer(thing)) == 0x01) {
- lose("Ptr %x @ %x sees forwarding ptr.", thing, start);
+ lose("Ptr %x @ %x sees forwarding ptr.\n", thing, start);
}
/* Check that its not in the RO space as it would then be a
* pointer from the RO to the dynamic space. */
if (is_in_readonly_space) {
- lose("ptr to dynamic space %x from RO space %x",
+ lose("ptr to dynamic space %x from RO space %x\n",
thing, start);
}
/* Does it point to a plausible object? This check slows
* dynamically. */
/*
if (!possibly_valid_dynamic_space_pointer((lispobj *)thing)) {
- lose("ptr %x to invalid object %x", thing, start);
+ lose("ptr %x to invalid object %x\n", thing, start);
}
*/
} else {
/* Verify that it points to another valid space. */
if (!to_readonly_space && !to_static_space
&& (thing != (unsigned long)&undefined_tramp)) {
- lose("Ptr %x @ %x sees junk.", thing, start);
+ lose("Ptr %x @ %x sees junk.\n", thing, start);
}
}
} else {
long i;
for (i = 0; i < size; i++) {
if (start_addr[i] != 0) {
- lose("free page not zero at %x", start_addr + i);
+ lose("free page not zero at %x\n", start_addr + i);
}
}
} else {
long i;
for (i = 0; i < size; i++) {
if (start_addr[i] != 0) {
- lose("free region not zero at %x", start_addr + i);
+ lose("free region not zero at %x\n", start_addr + i);
}
}
}
bytes_allocated = bytes_allocated - old_bytes_allocated;
if (bytes_allocated != 0) {
- lose("Rescan of new_space allocated %d more bytes.",
+ lose("Rescan of new_space allocated %d more bytes.\n",
bytes_allocated);
}
}
/* Check that they are all empty. */
for (i = 0; i < gen_to_wp; i++) {
if (generations[i].bytes_allocated)
- lose("trying to write-protect gen. %d when gen. %d nonempty",
+ lose("trying to write-protect gen. %d when gen. %d nonempty\n",
gen_to_wp, i);
}
write_protect_generation_pages(gen_to_wp);
os_invalidate(page_start,PAGE_BYTES);
addr = os_validate(page_start,PAGE_BYTES);
if (addr == NULL || addr != page_start) {
- lose("gc_free_heap: page moved, 0x%08x ==> 0x%08x",
+ lose("gc_free_heap: page moved, 0x%08x ==> 0x%08x\n",
page_start,
addr);
}
page_start = (long *)page_address(page);
for (i=0; i<1024; i++) {
if (page_start[i] != 0) {
- lose("free region not zero at %x", page_start + i);
+ lose("free region not zero at %x\n", page_start + i);
}
}
}
* does this test after the first one has already set wp=0
*/
if(page_table[page_index].write_protected_cleared != 1)
- lose("fault in heap page not marked as write-protected");
+ lose("fault in heap page not marked as write-protected\n");
}
/* Don't worry, we can handle it. */
return 1;
* beyond hope, there's not much we can do.
* (beyond FUNCALLing RESTART_LISP_FUNCTION, but I suspect that's
* going to be rather unsatisfactory too... */
- lose("Attempt to save core after non-conservative GC failed.");
+ lose("Attempt to save core after non-conservative GC failed.\n");
}
/* state so that we will continue as if nothing happened. */
if (NextPc == NULL)
- lose("SingleStepBreakpoint trap at strange time.");
+ lose("SingleStepBreakpoint trap at strange time.\n");
if ((SC_PC(scp)&~3) == (unsigned int)SingleStepTraps) {
/* The next instruction was not nullified. */
thread_sigmask(SIG_BLOCK, &empty, ¤t);
for(i = 1; i < NSIG; i++) {
if (sigismember(&blockable_sigset, i) && !sigismember(¤t, i))
- lose("blockable signal %d not blocked",i);
+ lose("blockable signal %d not blocked\n",i);
}
}
{
struct thread *thread=arch_os_get_current_thread();
if (SymbolValue(INTERRUPTS_ENABLED,thread) == NIL)
- lose("interrupts not enabled");
+ lose("interrupts not enabled\n");
if (
#if !defined(LISP_FEATURE_X86) && !defined(LISP_FEATURE_X86_64)
(!foreign_function_call_active) &&
#endif
arch_pseudo_atomic_atomic(context))
- lose ("in pseudo atomic section");
+ lose ("in pseudo atomic section\n");
}
/* When we catch an internal error, should we pass it back to Lisp to
(*os_context_register_addr(context, reg_ALLOC));
#if defined(LISP_FEATURE_ALPHA)
if ((long)dynamic_space_free_pointer & 1) {
- lose("dead in fake_foreign_function_call, context = %x", context);
+ lose("dead in fake_foreign_function_call, context = %x\n", context);
}
#endif
#endif
fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,thread));
if (context_index >= MAX_INTERRUPTS) {
- lose("maximum interrupt nesting depth (%d) exceeded", MAX_INTERRUPTS);
+ lose("maximum interrupt nesting depth (%d) exceeded\n", MAX_INTERRUPTS);
}
bind_variable(FREE_INTERRUPT_CONTEXT_INDEX,
describe_internal_error(context);
/* There's no good way to recover from an internal error
* before the Lisp error handling mechanism is set up. */
- lose("internal error too early in init, can't recover");
+ lose("internal error too early in init, can't recover\n");
}
/* Allocate the SAP object while the interrupts are still
/* This can happen if someone tries to ignore or default one
* of the signals we need for runtime support, and the runtime
* support decides to pass on it. */
- lose("no handler for signal %d in interrupt_handle_now(..)", signal);
+ lose("no handler for signal %d in interrupt_handle_now(..)\n", signal);
} else if (lowtag_of(handler.lisp) == FUN_POINTER_LOWTAG) {
/* Once we've decided what to do about contexts in a
check_blockables_blocked_or_lose();
if (SymbolValue(INTERRUPT_PENDING,thread) != NIL)
- lose("interrupt already pending");
+ lose("interrupt already pending\n");
/* If interrupts are disabled then INTERRUPT_PENDING is set and
* not PSEDUO_ATOMIC_INTERRUPTED. This is important for a pseudo
* atomic section inside a WITHOUT-INTERRUPTS.
struct sigaction sa;
if (0 > signal || signal >= NSIG) {
- lose("bad signal number %d", signal);
+ lose("bad signal number %d\n", signal);
}
if (ARE_SAME_HANDLER(handler, SIG_DFL))
p=strchr(p,'.')+1;
patch_version = atoi(p);
if (major_version<2) {
- lose("linux kernel version too old: major version=%d (can't run in version < 2.0.0)",
+ lose("linux kernel version too old: major version=%d (can't run in version < 2.0.0)\n",
major_version);
}
if (!(major_version>2 || minor_version >= 4)) {
#ifdef LISP_FEATURE_SB_THREAD
futex_wait(futex,-1);
if(errno==ENOSYS) {
- lose("This version of SBCL is compiled with threading support, but your kernel is too old to support this.\n\
-Please use a more recent kernel or a version of SBCL without threading support.\n");
+ lose("This version of SBCL is compiled with threading support, but your kernel\n"
+ "is too old to support this. Please use a more recent kernel or\n"
+ "a version of SBCL without threading support.\n");
}
if(! isnptl()) {
- lose("This version of SBCL only works correctly with the NPTL threading library. Please use a newer glibc, use an older SBCL, or stop using LD_ASSUME_KERNEL");
+ lose("This version of SBCL only works correctly with the NPTL threading\n"
+ "library. Please use a newer glibc, use an older SBCL, or stop using\n"
+ "LD_ASSUME_KERNEL\n");
}
#endif
os_vm_page_size = getpagesize();
fd, (off_t) offset);
if (actual == MAP_FAILED || (addr && (addr != actual))) {
perror("mmap");
- lose("unexpected mmap(..) failure");
+ lose("unexpected mmap(..) failure\n");
}
return actual;
addr = os_validate(block_start, block_size);
if (addr == NULL || addr != block_start)
- lose("os_zero: block moved! 0x%08x ==> 0x%08x",
+ lose("os_zero: block moved! 0x%08x ==> 0x%08x\n",
block_start,
addr);
}
if (addr == MAP_FAILED) {
perror("mmap");
- lose("unexpected mmap(..) failure");
+ lose("unexpected mmap(..) failure\n");
}
return addr;
nwords=CEILING(nwords,2);
if(constantp) {
if(read_only_free + nwords >= (lispobj *)READ_ONLY_SPACE_END) {
- lose("Ran out of read-only space while purifying!");
+ lose("Ran out of read-only space while purifying!\n");
}
ret=read_only_free;
read_only_free+=nwords;
} else {
if(static_free + nwords >= (lispobj *)STATIC_SPACE_END) {
- lose("Ran out of static space while purifying!");
+ lose("Ran out of static space while purifying!\n");
}
ret=static_free;
static_free+=nwords;
{
void* result = malloc(size);
if (0 == result) {
- lose("malloc failure");
+ lose("malloc failure\n");
} else {
return result;
}
++argi;
} else if (0 == strcmp(arg, "--core")) {
if (core) {
- lose("more than one core file specified");
+ lose("more than one core file specified\n");
} else {
++argi;
if (argi >= argc) {
- lose("missing filename for --core argument");
+ lose("missing filename for --core argument\n");
}
core = copied_string(argv[argi]);
++argi;
* error. */
if (!end_runtime_options &&
0 == strcmp(arg, "--end-runtime-options")) {
- lose("bad runtime option \"%s\"", argi0);
+ lose("bad runtime option \"%s\"\n", argi0);
}
sbcl_argv[argj++] = arg;
}
core = copied_existing_filename_or_null(lookhere);
free(lookhere);
if (!core) {
- lose("can't find core file");
+ lose("can't find core file\n");
}
}
/* Make sure that SBCL_HOME is set, no matter where the core was
initial_function = load_core_file(core);
if (initial_function == NIL) {
- lose("couldn't find initial function");
+ lose("couldn't find initial function\n");
}
SHOW("freeing core");
free(core);
FSHOW((stderr, "/funcalling initial_function=0x%lx\n",
(unsigned long)initial_function));
create_initial_thread(initial_function);
- lose("CATS. CATS ARE NICE.");
+ lose("CATS. CATS ARE NICE.\n");
return 0;
}
uname(&name);
major_version = atoi(name.release);
if (major_version != 5) {
- lose("sunos major version=%d (which isn't 5!)", major_version);
+ lose("sunos major version=%d (which isn't 5!)\n", major_version);
}
minor_version = atoi(name.release+2);
if ((minor_version == 8) ||
KLUDGE_MAYBE_MAP_ANON = 0x100;
} else if (minor_version > 10) {
FSHOW((stderr, "os_init: Solaris version greater than 9?\nUnknown MAP_ANON behaviour.\n"));
- lose("Unknown mmap() interaction with MAP_ANON");
+ lose("Unknown mmap() interaction with MAP_ANON\n");
} else { /* minor_version < 8 */
kludge_mmap_fd = open("/dev/zero",O_RDONLY);
if (kludge_mmap_fd < 0) {
perror("open");
- lose("Error in open(..)");
+ lose("Error in open(..)\n");
}
}
if (addr == MAP_FAILED) {
perror("mmap");
- lose ("Error in mmap(..)");
+ lose ("Error in mmap(..)\n");
}
return addr;
if (addr == MAP_FAILED) {
perror("mmap");
- lose("Unexpedted mmap(..) failure");
+ lose("Unexpedted mmap(..) failure\n");
}
return addr;
struct thread *th=create_thread_struct(initial_function);
if(th) {
initial_thread_trampoline(th); /* no return */
- } else lose("can't create initial thread");
+ } else lose("can't create initial thread\n");
}
#ifdef LISP_FEATURE_SB_THREAD
} else if (status == ESRCH) {
return -1;
} else {
- lose("cannot send SIG_INTERRUPT_THREAD to thread=%lu: %d, %s",
+ lose("cannot send SIG_INTERRUPT_THREAD to thread=%lu: %d, %s\n",
os_thread, status, strerror(status));
}
}
/* This thread has exited. */
gc_assert(p->state==STATE_DEAD);
} else if (status) {
- lose("cannot send suspend thread=%lu: %d, %s",
+ lose("cannot send suspend thread=%lu: %d, %s\n",
p->os_thread,status,strerror(status));
}
}
p->state=STATE_RUNNING;
status=kill_thread_safely(p->os_thread,SIG_STOP_FOR_GC);
if (status) {
- lose("cannot resume thread=%lu: %d, %s",
+ lose("cannot resume thread=%lu: %d, %s\n",
p->os_thread,status,strerror(status));
}
}
os_protect(start, os_vm_page_size, OS_VM_PROT_NONE);
undefined_alien_address = start;
} else {
- lose("could not allocate guard page for undefined alien");
+ lose("could not allocate guard page for undefined alien\n");
}
}
* seems to be no point in doing that, since we're just
* going to lose(..) anyway. */
fake_foreign_function_call(context);
- lose("%%PRIMITIVE HALT called; the party is over.");
+ lose("%%PRIMITIVE HALT called; the party is over.\n");
case trap_Error:
case trap_Cerror:
* seems to be no point in doing that, since we're just
* going to lose(..) anyway. */
fake_foreign_function_call(context);
- lose("%%PRIMITIVE HALT called; the party is over.");
+ lose("%%PRIMITIVE HALT called; the party is over.\n");
case trap_Error:
case trap_Cerror:
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.7.11"
+"0.9.7.12"