diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-07-08 19:25:55 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-07-09 19:48:53 -0700 |
commit | 1798cac7a8b3331a277da1f106752ce0a34f8937 (patch) | |
tree | 841626abf0ab8089ea07bc0b099f48fa87925436 /libgo/runtime | |
parent | b9119edc09e4660d772dea771578715858f7fbdb (diff) | |
download | gcc-1798cac7a8b3331a277da1f106752ce0a34f8937.zip gcc-1798cac7a8b3331a277da1f106752ce0a34f8937.tar.gz gcc-1798cac7a8b3331a277da1f106752ce0a34f8937.tar.bz2 |
runtime: remove direct assignments to memory locations
PR bootstrap/101374
They cause a warning with the updated GCC -Warray-bounds option.
Replace them with calls to abort, which for our purposes is fine.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/333409
Diffstat (limited to 'libgo/runtime')
-rw-r--r-- | libgo/runtime/proc.c | 4 | ||||
-rw-r--r-- | libgo/runtime/runtime_c.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 38bf7a6..3a30748 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -594,7 +594,7 @@ runtime_mstart(void *arg) gp->entry = nil; gp->param = nil; __builtin_call_with_static_chain(pfn(gp1), fv); - *(int*)0x21 = 0x21; + abort(); } if(mp->exiting) { @@ -662,7 +662,7 @@ setGContext(void) gp->entry = nil; gp->param = nil; __builtin_call_with_static_chain(pfn(gp1), fv); - *(int*)0x22 = 0x22; + abort(); } } diff --git a/libgo/runtime/runtime_c.c b/libgo/runtime/runtime_c.c index 18222c1..bc920a5 100644 --- a/libgo/runtime/runtime_c.c +++ b/libgo/runtime/runtime_c.c @@ -116,7 +116,7 @@ runtime_signalstack(byte *p, uintptr n) if(p == nil) st.ss_flags = SS_DISABLE; if(sigaltstack(&st, nil) < 0) - *(int *)0xf1 = 0xf1; + abort(); } int32 go_open(char *, int32, int32) |