]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
runtime: remove direct assignments to memory locations
authorIan Lance Taylor <iant@golang.org>
Fri, 9 Jul 2021 02:25:55 +0000 (19:25 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 10 Jul 2021 02:48:53 +0000 (19:48 -0700)
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

gcc/go/gofrontend/MERGE
libgo/runtime/proc.c
libgo/runtime/runtime_c.c

index ab1384d698bda39bbe0e3d2a5f1201937fb41e45..4d0f44f2dd2f868507b46549c27ea31f74d6fcdc 100644 (file)
@@ -1,4 +1,4 @@
-01cb2b5e69a2d08ef3cc1ea023c22ed9b79f5114
+adcf10890833026437a94da54934ce50c0018309
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 38bf7a6b2551e1806c1a9ff762bb4607c97963c0..3a30748d3291fb48fd876da6294fb5ce67724d06 100644 (file)
@@ -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();
        }
 }
 
index 18222c14465ca023c84ed7d43623b74dde9ddc06..bc920a5d406fa09444a9e3af9968ccc7fe3c9bc8 100644 (file)
@@ -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)