Index: uspace/lib/c/generic/assert.c
===================================================================
--- uspace/lib/c/generic/assert.c	(revision 7da90cd8fa7928635efe129eb2f8a9b8238e6a1a)
+++ uspace/lib/c/generic/assert.c	(revision 7da90cd8fa7928635efe129eb2f8a9b8238e6a1a)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2011 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stacktrace.h>
+
+void assert_abort(const char *cond, const char *file, unsigned int line)
+{
+	printf("Assertion failed (%s) in file \"%s\", line %u.\n",
+	    cond, file, line);
+	stacktrace_print();
+	abort();
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/async.c
===================================================================
--- uspace/lib/c/generic/async.c	(revision d1617158721960329b52442af00925269a6224a3)
+++ uspace/lib/c/generic/async.c	(revision 7da90cd8fa7928635efe129eb2f8a9b8238e6a1a)
@@ -102,4 +102,6 @@
 #include <arch/barrier.h>
 #include <bool.h>
+#include <stdlib.h>
+#include <malloc.h>
 #include "private/async.h"
 
Index: uspace/lib/c/generic/stacktrace.c
===================================================================
--- uspace/lib/c/generic/stacktrace.c	(revision d1617158721960329b52442af00925269a6224a3)
+++ uspace/lib/c/generic/stacktrace.c	(revision 7da90cd8fa7928635efe129eb2f8a9b8238e6a1a)
@@ -61,9 +61,11 @@
 	stacktrace_prepare();
 	stacktrace_print_fp_pc(stacktrace_fp_get(), stacktrace_pc_get());
+	
 	/*
 	 * Prevent the tail call optimization of the previous call by
 	 * making it a non-tail call.
 	 */
-	(void) stacktrace_fp_get();
+	
+	printf("-- end of stack trace --\n");
 }
 
