mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: round return value address in runtime.equal
Fixes #3866. R=rsc, r, nigeltao CC=golang-dev https://golang.org/cl/6452046
This commit is contained in:
parent
f2b8f6b451
commit
e07958f7df
2 changed files with 74 additions and 4 deletions
|
|
@ -469,10 +469,11 @@ void
|
|||
runtime·equal(Type *t, ...)
|
||||
{
|
||||
byte *x, *y;
|
||||
bool *ret;
|
||||
uintptr ret;
|
||||
|
||||
x = (byte*)(&t+1);
|
||||
y = x + t->size;
|
||||
ret = (bool*)(y + t->size);
|
||||
t->alg->equal(ret, t->size, x, y);
|
||||
y = x + ROUND(t->size, t->align);
|
||||
ret = (uintptr)(y + t->size);
|
||||
ret = ROUND(ret, Structrnd);
|
||||
t->alg->equal((bool*)ret, t->size, x, y);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue