]> Cypherpunks repositories - gostls13.git/commit
cmd/nm: don't add filename elements for m symbols
authorAnthony Martin <ality@pbrane.org>
Thu, 4 Apr 2013 01:23:43 +0000 (18:23 -0700)
committerAnthony Martin <ality@pbrane.org>
Thu, 4 Apr 2013 01:23:43 +0000 (18:23 -0700)
commit272687ec24ca828f8c7ba22c64e0060436124051
tree34e25f300178cca2f1df434df57682ab3795c669
parent1b9e36356be410adf3b0b80e99996f8f3476d8cf
cmd/nm: don't add filename elements for m symbols

The compilers used to generate only one 'm' symbol
to record the stack frame size for each function.

In cmd/nm, the 'm' and 'f' symbols are handled in
the same switch case with a special exception for
the symbol described above called ".frame".

Now that the compilers emit additional 'm' symbols
for precise garbage collection of the stack, the
current logic is incorrect. cmd/nm will attempt to
interpret these new 'm' symbols as 'f' symbols and
add them to the file name index table.

This fails with an out-of-memory condition when
zenter encounters an 'm' symbol with a very large
value (usually the .args symbol indicating a
variadic NOSPLIT function).

R=iant
CC=dave, gobot, golang-dev, rsc
https://golang.org/cl/7962045
src/cmd/nm/nm.c