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
This commit is contained in:
Ian Lance Taylor 2021-07-08 19:25:55 -07:00
parent b9119edc09
commit 1798cac7a8
3 changed files with 4 additions and 4 deletions

View 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.

View 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();
}
}

View 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)