diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-05-11 01:12:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-05-11 01:12:37 +0000 |
commit | c130ab6aad57e0309ec02f58f383aece584ac8cb (patch) | |
tree | 0a5fd2bf4f6ad9b59a03ff33d2758937064fc015 /libgo/runtime/go-main.c | |
parent | d7b9b0805d5ab514c43e1fe57e43a10394d5d965 (diff) | |
download | gcc-c130ab6aad57e0309ec02f58f383aece584ac8cb.zip gcc-c130ab6aad57e0309ec02f58f383aece584ac8cb.tar.gz gcc-c130ab6aad57e0309ec02f58f383aece584ac8cb.tar.bz2 |
runtime: set up g early
runtime.throw needs a g to work properly. Set up g early, to
ensure that if something goes wrong in the runtime startup (e.g.
runtime.check fails), the program terminates in a reasonable way.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176657
From-SVN: r271088
Diffstat (limited to 'libgo/runtime/go-main.c')
-rw-r--r-- | libgo/runtime/go-main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libgo/runtime/go-main.c b/libgo/runtime/go-main.c index 301ac4e..e9da8ac 100644 --- a/libgo/runtime/go-main.c +++ b/libgo/runtime/go-main.c @@ -48,6 +48,7 @@ main (int argc, char **argv) setIsCgo (); __go_end = (uintptr)_end; + runtime_ginit (); runtime_cpuinit (); runtime_check (); runtime_args (argc, (byte **) argv); |