Merge lp:~pedronis/ubuntu-push/truncate-runtime-Stack-result into lp:ubuntu-push/automatic

Proposed by Samuele Pedroni
Status: Merged
Approved by: Samuele Pedroni
Approved revision: 402
Merged at revision: 402
Proposed branch: lp:~pedronis/ubuntu-push/truncate-runtime-Stack-result
Merge into: lp:ubuntu-push/automatic
Diff against target: 14 lines (+2/-2)
1 file modified
ubuntu-push-client.go (+2/-2)
To merge this branch: bzr merge lp:~pedronis/ubuntu-push/truncate-runtime-Stack-result
Reviewer Review Type Date Requested Status
Bret Barker (community) Approve
Review via email: mp+259252@code.launchpad.net

Commit message

truncate runtime.Stack result to size, otherwise we log \x00s or old stuff

Description of the change

truncate runtime.Stack result to size, otherwise we log \x00s or old stuff

To post a comment you must log in.
Revision history for this message
Bret Barker (noise) wrote :

yup.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-push-client.go'
2--- ubuntu-push-client.go 2015-01-21 21:31:39 +0000
3+++ ubuntu-push-client.go 2015-05-15 14:28:44 +0000
4@@ -35,8 +35,8 @@
5 buf := make([]byte, 1<<20)
6 for {
7 <-sigs
8- runtime.Stack(buf, true)
9- log.Printf("=== received SIGQUIT ===\n*** goroutine dump...\n%s\n*** end\n", buf)
10+ sz := runtime.Stack(buf, true)
11+ log.Printf("=== received SIGQUIT ===\n*** goroutine dump...\n%s\n*** end", buf[:sz])
12 }
13 }()
14 }

Subscribers

People subscribed via source and target branches