public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2234] runtime: remove direct assignments to memory locations
@ 2021-07-10 2:49 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2021-07-10 2:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:1798cac7a8b3331a277da1f106752ce0a34f8937
commit r12-2234-g1798cac7a8b3331a277da1f106752ce0a34f8937
Author: Ian Lance Taylor <iant@golang.org>
Date: Thu Jul 8 19:25:55 2021 -0700
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
Diff:
---
gcc/go/gofrontend/MERGE | 2 +-
libgo/runtime/proc.c | 4 ++--
libgo/runtime/runtime_c.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index ab1384d698b..4d0f44f2dd2 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -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.
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 38bf7a6b255..3a30748d329 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 18222c14465..bc920a5d406 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-10 2:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10 2:49 [gcc r12-2234] runtime: remove direct assignments to memory locations Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).