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

Issue 76810045: code review 76810045: cmd/ld: don't delete output binary if not "ordinary" file. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by mra
Modified:
11 years, 1 month ago
Reviewers:
iant
CC:
golang-codereviews, iant, 0intro, r
Visibility:
Public.

Description

cmd/ld: don't delete output binary if not "ordinary" file. e.g., don't delete /dev/null. this fix inspired by gnu libiberty, unlink-if-ordinary.c. Fixes issue 7563

Patch Set 1 #

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

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

Total comments: 2

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

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

Total comments: 1

Patch Set 6 : diff -r b1f6ff3c9f0e https://code.google.com/p/go #

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

Messages

Total messages: 19
mra
Hello golang-codereviews@googlegroups.com (cc: iant@golang.org), I'd like you to review this change to https://code.google.com/p/go
11 years, 1 month ago (2014-03-22 00:12:05 UTC) #1
mra
my apologies, this new CL just replaces https://codereview.appspot.com/76580044 which seems to have gotten into a ...
11 years, 1 month ago (2014-03-22 00:14:29 UTC) #2
r
https://codereview.appspot.com/76810045/diff/40001/src/cmd/ld/lib.c File src/cmd/ld/lib.c (right): https://codereview.appspot.com/76810045/diff/40001/src/cmd/ld/lib.c#newcode110 src/cmd/ld/lib.c:110: #ifndef _WIN32 this is linux-specific, not anti-windows. https://codereview.appspot.com/76810045/diff/40001/src/cmd/ld/lib.c#newcode113 src/cmd/ld/lib.c:113: ...
11 years, 1 month ago (2014-03-22 22:18:47 UTC) #3
iant
On Sat, Mar 22, 2014 at 3:18 PM, <r@golang.org> wrote: > > https://codereview.appspot.com/76810045/diff/40001/src/cmd/ld/lib.c > File ...
11 years, 1 month ago (2014-03-23 21:21:14 UTC) #4
r
By Linux-specific, I meant Unix-specific. What I really meant is that it won't work on ...
11 years, 1 month ago (2014-03-23 21:34:07 UTC) #5
r
(More generally, none of these constants are defined there.) -rob
11 years, 1 month ago (2014-03-23 21:34:38 UTC) #6
mra
Hello golang-codereviews@googlegroups.com, iant@golang.org (cc: golang-codereviews@googlegroups.com, r@golang.org), Please take another look.
11 years, 1 month ago (2014-03-23 22:12:49 UTC) #7
mra
On 2014/03/23 22:12:49, mra wrote: > Hello mailto:golang-codereviews@googlegroups.com, mailto:iant@golang.org (cc: > mailto:golang-codereviews@googlegroups.com, mailto:r@golang.org), > > ...
11 years, 1 month ago (2014-03-23 22:15:15 UTC) #8
mra
On 2014/03/23 22:15:15, mra wrote: > On 2014/03/23 22:12:49, mra wrote: > > Hello mailto:golang-codereviews@googlegroups.com, ...
11 years, 1 month ago (2014-03-23 22:17:31 UTC) #9
0intro
The issue here is that neither sys/stat.h, nor lstat(), nor S_ISREG() exist on Plan 9. ...
11 years, 1 month ago (2014-03-23 22:26:09 UTC) #10
mra
sounds right to me, thanks 0intro, i will have to get up to speed on ...
11 years, 1 month ago (2014-03-26 00:36:46 UTC) #11
iant
On Tue, Mar 25, 2014 at 5:36 PM, Mike Andrews <mra@xoba.com> wrote: > sounds right ...
11 years, 1 month ago (2014-03-26 01:00:34 UTC) #12
0intro
> sounds right to me, thanks 0intro, i will have to get up to speed ...
11 years, 1 month ago (2014-03-26 06:15:46 UTC) #13
mra
thanks, will do. On Wed, Mar 26, 2014 at 2:15 AM, David du Colombier <0intro@gmail.com>wrote: ...
11 years, 1 month ago (2014-03-26 13:42:54 UTC) #14
mra
David (0intro), i've uploaded a new patch set that works on linux amd64, so could ...
11 years, 1 month ago (2014-03-29 11:57:08 UTC) #15
0intro
It seems fine on Plan 9. https://codereview.appspot.com/76810045/diff/80001/src/cmd/ld/lib.c File src/cmd/ld/lib.c (right): https://codereview.appspot.com/76810045/diff/80001/src/cmd/ld/lib.c#newcode40 src/cmd/ld/lib.c:40: #ifndef PLAN9 We ...
11 years, 1 month ago (2014-03-29 13:42:35 UTC) #16
mra
thanks, i made that change, PTAL? also, do we need to test or #if on ...
11 years, 1 month ago (2014-03-29 13:55:38 UTC) #17
iant
LGTM Thanks.
11 years, 1 month ago (2014-03-29 16:47:14 UTC) #18
iant
11 years, 1 month ago (2014-03-29 16:50:53 UTC) #19
*** Submitted as https://code.google.com/p/go/source/detail?r=dee4c7a24398 ***

cmd/ld: don't delete output binary if not "ordinary" file.

e.g., don't delete /dev/null. this fix inspired by gnu libiberty,
unlink-if-ordinary.c.

Fixes issue 7563

LGTM=iant
R=golang-codereviews, iant, 0intro
CC=golang-codereviews, r
https://codereview.appspot.com/76810045

Committer: Ian Lance Taylor <iant@golang.org>
Sign in to reply to this message.

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