// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build aix || (!android && linux) || dragonfly || freebsd || netbsd || openbsd
+//go:build aix || (!android && linux) || dragonfly || freebsd || netbsd || openbsd || solaris
#include <stdarg.h>
#include <stdio.h>
// Sanity check the results now, rather than getting a
// morestack on g0 crash.
if (g->stacklo >= g->stackhi) {
- fprintf(stderr, "runtime/cgo: bad stack bounds: lo=%p hi=%p\n", (void*)(g->stacklo), (void*)(g->stackhi));
- abort();
+ fatalf("bad stack bounds: lo=%p hi=%p", (void*)(g->stacklo), (void*)(g->stackhi));
}
}
pthread_sigmask(SIG_SETMASK, &oset, nil);
if (err != 0) {
- fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err));
- abort();
+ fatalf("pthread_create failed: %s", strerror(err));
}
}