go-assert.c 512 B

1234567891011121314151617181920
  1. /* go-assert.c -- libgo specific assertions
  2. Copyright 2010 The Go Authors. All rights reserved.
  3. Use of this source code is governed by a BSD-style
  4. license that can be found in the LICENSE file. */
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include "runtime.h"
  8. #include "go-assert.h"
  9. void
  10. __go_assert_fail (const char *file, unsigned int lineno)
  11. {
  12. /* FIXME: Eventually we should dump a stack trace here. */
  13. runtime_printf ("%s:%U: libgo assertion failure\n", file, (uint64) lineno);
  14. abort ();
  15. }