Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(57)

Issue 7962045: code review 7962045: cmd/nm: don't add filename elements for m symbols (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by ality
Modified:
12 years, 1 month ago
Reviewers:
CC:
iant, dave_cheney.net, gobot, golang-dev, rsc
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : diff -r c76d8e470353 https://code.google.com/p/go/ #

Patch Set 3 : diff -r c76d8e470353 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 64c7c23ad2b9 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 3cadb95c63bd https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M src/cmd/nm/nm.c View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 10
ality
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 1 month ago (2013-03-24 04:00:34 UTC) #1
dave_cheney.net
Hello, This change looks pretty low impact. Could you please give a little bit of ...
12 years, 1 month ago (2013-04-01 12:43:10 UTC) #2
ality
Hello rsc@golang.org, dave@cheney.net (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 1 month ago (2013-04-03 00:47:25 UTC) #3
ality
dave@cheney.net once said: > This change looks pretty low impact. Could you please give a ...
12 years, 1 month ago (2013-04-03 00:49:22 UTC) #4
gobot
R=iant (assigned by dfc)
12 years, 1 month ago (2013-04-03 08:30:01 UTC) #5
iant
LGTM Thanks.
12 years, 1 month ago (2013-04-03 13:17:30 UTC) #6
ality
iant@golang.org once said: > LGTM > > Thanks. Can I submit this before Go 1.1? ...
12 years, 1 month ago (2013-04-03 21:07:32 UTC) #7
dave_cheney.net
I believe this issue had met the cutoff. It would have been good to have ...
12 years, 1 month ago (2013-04-03 21:31:55 UTC) #8
iant
On Wed, Apr 3, 2013 at 2:07 PM, Anthony Martin <ality@pbrane.org> wrote: > iant@golang.org once ...
12 years, 1 month ago (2013-04-04 00:32:54 UTC) #9
ality
12 years, 1 month ago (2013-04-04 01:23:52 UTC) #10
*** Submitted as https://code.google.com/p/go/source/detail?r=267bb9854177 ***

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://codereview.appspot.com/7962045
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b