]> Cypherpunks repositories - gostls13.git/commit
runtime: fix endianness assumption when decoding ftab
authorAustin Clements <austin@google.com>
Mon, 27 Oct 2014 21:12:48 +0000 (17:12 -0400)
committerAustin Clements <austin@google.com>
Mon, 27 Oct 2014 21:12:48 +0000 (17:12 -0400)
commit3e62d2184ab2d2ac6053e3f4af5e3f99902c1e32
tree75c369872a6122952e70a6f9b1089e2ac21ed4f9
parent77595e462be07b8229f88cbdf947e320bfc7e639
runtime: fix endianness assumption when decoding ftab

The ftab ends with a half functab record consisting only of
the 'entry' field followed by a uint32 giving the offset of
the next table.  Previously, symtabinit assumed it could read
this uint32 as a uintptr.  Since this is unsafe on big endian,
explicitly read the offset as a uint32.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/157660043
src/runtime/symtab.go