diff mbox

[gccgo] Crash after RTEMS failure

Message ID mcrmxtxt8hd.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor July 12, 2010, 8:22 a.m. UTC
This patch from Vinu Rajashekhar makes sure that a Go program crashes if
it fails to add a task variable on RTEMS.  Committed to gccgo branch.

Ian
diff mbox

Patch

Index: libgo/runtime/rtems-task-variable-add.c
===================================================================
--- libgo/runtime/rtems-task-variable-add.c	(revision 161752)
+++ libgo/runtime/rtems-task-variable-add.c	(working copy)
@@ -4,6 +4,8 @@ 
    Use of this source code is governed by a BSD-style
    license that can be found in the LICENSE file.  */
 
+#include <assert.h>
+
 #include <rtems/error.h>
 #include <rtems/system.h>
 #include <rtems/rtems/tasks.h>
@@ -16,6 +18,7 @@  __wrap_rtems_task_variable_add (void **v
   if (sc != RTEMS_SUCCESSFUL)
     {
       rtems_error (sc, "rtems_task_variable_add failed");
+      assert (0);
     }
 }