[LispM-Hackers] FreeBSD error

James A. Crippen james@unlambda.com
09 Jan 2002 12:53:24 -0900


Robert Swindells <rjs@fdy2.demon.co.uk> writes:

> It builds fine with a couple of minor changes, but dumps core in
> mainops.cc on line 178 (marked with "=>")
> 
>     case E3_DTP_FUNCTION:	// Compiled function par 11.2.1
>       cout << "FOO!!!!!!!!!!!!!!!\n";
>       {
> 	e3WordAddr new_function_address = operand.getPointer();
> 	memFEFHeader new_function_fef(new_function_address);
> 	cout << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
> 	e->dumpMemory(new_function_address, 50);
> 	new_function_fef.dump(cout);
> =>	abort();
> 	exit(0);
>       }
>       break;
> 
>     case E3_DTP_CLOSURE:	// Indirect function par 11.2.3.2
>     case E3_DTP_LEXICAL_CLOSURE:
>       E3NotYetImplemented("CALL_1_DEST_INDS::execute -- unimplemented call to indirect function.\n");
> 
> The last few lines of the trace were:
> 
>  ...
>  pc=405 POP LOCAL|#o0
>  pc=406 SET_NIL FEF|#o52
>  pc=407 SET_NIL FEF|#o53
>  pc=410 SET_NIL FEF|#o50
>  pc=411 SET_NIL FEF|#o51
>  pc=412 TEST ARG|#o0
>  pc=413 SET_NIL FEF|#o47
>  pc=414 SET_NIL FEF|#o46
>  pc=415 BR_NOT_NIL FEF|#o17
> Abort(core dumped)

The abort() function is supposed to kill the running program and dump
core.  So it's working right.

If you don't want a 32MB core taking up space on your system then you
can just do a 'ulimit -c 0' to force no coredumps in the current
shell.

Why does it abort() here?  Because we haven't implemented function
calling yet.  (This is also why it screams "FOO" in frustration.)  So
it helpfully gives you a core dump so you can go looking for the stuff
you need to implement function calling.

BTW, you probably shouldn't use the tarball.  Nobody updates that as
regularly as it should be, and there's no automated script to do it.
The anonymous CVS checkout will always be up to date, however.

'james

-- 
James A. Crippen <james@unlambda.com> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.20939N, -149.767W
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.