diff --git a/src/builtin.cmod b/src/builtin.cmod index 13dab2efe09c418e089d769d893730d358bd4490..3e6d1297c89eadcdd1bed91a854dc79fa7ecfb62 100644 --- a/src/builtin.cmod +++ b/src/builtin.cmod @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: builtin.cmod,v 1.225 2008/10/04 18:31:12 mast Exp $ +|| $Id: builtin.cmod,v 1.226 2008/11/02 19:57:58 grubba Exp $ */ #include "global.h" @@ -1019,10 +1019,15 @@ PIKEFUN string function_name(program|function func) { struct pike_trampoline *t; t=((struct pike_trampoline *)func->u.object->storage); + + /* FIXME: Adjust lambda names. */ + if(t->frame->current_object->prog) REF_RETURN ID_FROM_INT(t->frame->current_object->prog, t->func)->name; } + + /* FIXME: Adjust lambda names. */ REF_RETURN ID_FROM_INT(func->u.object->prog, func->subtype)->name; } @@ -3981,7 +3986,13 @@ void init_builtin(void) void exit_builtin(void) { EXIT +#ifndef DO_PIKE_CLEANUP + /* This is performed by exit_builtin_modules() at a later point + * in this case, so that the pike_list_node's are valid at cleanup + * time, thus avoiding "got invalid pointer" fatals at exit. + */ free_all_pike_list_node_blocks(); +#endif #ifndef USE_SETENV if (env_allocs) free_mapping (env_allocs); #endif diff --git a/src/module.c b/src/module.c index 752d8f279a0b85a103ab9794ee817de27b06c3b2..52c9ba3ae690c642612ad409b0f1bfea2cc86431 100644 --- a/src/module.c +++ b/src/module.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: module.c,v 1.58 2008/08/05 21:43:26 mast Exp $ +|| $Id: module.c,v 1.59 2008/11/02 19:57:58 grubba Exp $ */ #include "global.h" @@ -153,6 +153,7 @@ static void exit_builtin_modules(void) * THREADS_ALLOW/DISALLOW are NOPs beyond this point. */ th_cleanup(); #endif + free_all_pike_list_node_blocks(); exit_pike_security(); free_svalue(& throw_value);