mirror of
https://github.com/golang/go
synced 2024-11-19 03:04:42 -07:00
cmd/ld: fix undefined behaviour in pcln.c
Update #8527 Fixes, src/cmd/6l/../ld/pcln.c:93:18: runtime error: left shift of negative value -2 LGTM=r R=golang-codereviews, r CC=golang-codereviews https://golang.org/cl/127440043
This commit is contained in:
parent
ca2db2067f
commit
f129370b3e
@ -90,7 +90,7 @@ renumberfiles(Link *ctxt, LSym **files, int nfiles, Pcdata *d)
|
||||
}
|
||||
dv = val - newval;
|
||||
newval = val;
|
||||
v = (uint32)(dv<<1) ^ (uint32)(int32)(dv>>31);
|
||||
v = ((uint32)dv<<1) ^ (uint32)(int32)(dv>>31);
|
||||
addvarint(&out, v);
|
||||
|
||||
// pc delta
|
||||
|
Loading…
Reference in New Issue
Block a user