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

Issue 1982041: code review 1982041: gopack: handle long lines in export data (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 7 months ago by rsc
Modified:
15 years, 7 months ago
Reviewers:
CC:
r, golang-dev
Visibility:
Public.

Description

gopack: handle long lines in export data Also, if the header is bad, exit with a non-zero status. Other calls to Brdline in the tree, by category: Reading symbol name from object file: ./cmd/5l/obj.c:486: name = Brdline(f, '\0'); ./cmd/6l/obj.c:535: name = Brdline(f, '\0'); ./cmd/8l/obj.c:564: name = Brdline(f, '\0'); ./libmach/sym.c:292: cp = Brdline(bp, '\0'); Reading archive header line (fixed, short): ./cmd/gc/lex.c:287: if((a = Brdline(b, '\n')) == nil) ./cmd/gc/lex.c:303: if((p = Brdline(b, '\n')) == nil) Reading object file header line (fixed, short): ./cmd/ld/lib.c:421: line = Brdline(f, '\n'); Reading undefined symbol list (unused code): ./cmd/ld/lib.c:773: while((l = Brdline(b, '\n')) != nil){ Implementing Brdstr: ./libbio/brdstr.c:36: p = Brdline(bp, delim); The symbol names ones will cause a problem loudly if they fail: they'll error out with symbol name too long. This means that you can't define an enormous struct without giving the type a name and then stick it in an interface, because the type's symbol name will be too long for the object file. Since this will be a loud failure instead of a silent one, I'm willing to wait until it comes up in practice.

Patch Set 1 #

Patch Set 2 : code review 1982041: gopack: handle long lines in export data #

Patch Set 3 : code review 1982041: gopack: handle long lines in export data #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -6 lines) Patch
M src/cmd/gopack/ar.c View 1 5 chunks +15 lines, -4 lines 0 comments Download
M test/fixedbugs/bug302.go View 1 chunk +1 line, -1 line 0 comments Download
M test/fixedbugs/bug302.dir/main.go View 1 chunk +5 lines, -0 lines 0 comments Download
M test/run View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3
rsc
Hello r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
15 years, 7 months ago (2010-08-12 04:51:25 UTC) #1
r2
LGTM
15 years, 7 months ago (2010-08-12 04:54:53 UTC) #2
rsc
15 years, 7 months ago (2010-08-12 05:17:26 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=e91b76c5a30b ***

gopack: handle long lines in export data
Also, if the header is bad, exit with a non-zero status.

Other calls to Brdline in the tree, by category:

Reading symbol name from object file:
./cmd/5l/obj.c:486: 		name = Brdline(f, '\0');
./cmd/6l/obj.c:535: 		name = Brdline(f, '\0');
./cmd/8l/obj.c:564: 		name = Brdline(f, '\0');
./libmach/sym.c:292: 		cp = Brdline(bp, '\0');

Reading archive header line (fixed, short):
./cmd/gc/lex.c:287: 	if((a = Brdline(b, '\n')) == nil)
./cmd/gc/lex.c:303: 	if((p = Brdline(b, '\n')) == nil)

Reading object file header line (fixed, short):
./cmd/ld/lib.c:421: 	line = Brdline(f, '\n');

Reading undefined symbol list (unused code):
./cmd/ld/lib.c:773: 	while((l = Brdline(b, '\n')) != nil){

Implementing Brdstr:
./libbio/brdstr.c:36: 		p = Brdline(bp, delim);

The symbol names ones will cause a problem loudly if they
fail: they'll error out with symbol name too long.  This means
that you can't define an enormous struct without giving the
type a name and then stick it in an interface, because the
type's symbol name will be too long for the object file.
Since this will be a loud failure instead of a silent one,
I'm willing to wait until it comes up in practice.

R=r
CC=golang-dev
http://codereview.appspot.com/1982041
Sign in to reply to this message.

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