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

Issue 172510043: [dev.cc] code review 172510043: runtime: fix GODEBUG processing

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by aram
Modified:
10 years, 4 months ago
Reviewers:
CC:
rsc, brad, dave_cheney.net, golang-codereviews, iant, khr, minux, r, rlh
Visibility:
Public.

Description

runtime: fix GODEBUG processing Right now it fails with: $ GODEBUG="allocfreetrace=1,efence=1" `which go` Segmentation fault: 11 It appears there's a bug in the initialization order of global variables. dbgvars is initialized before debug, even though dbgvars references fields of debug, like debug.allocfreetrace. This caused dbgVar.value to always be 0, and parsedebugvars to fail when trying to write to it. Work around this problem by moving dbgvars and its initialization inside parsedebugvars. This is ok because dbgvars is only used inside parsedebugvars anyway.

Patch Set 1 #

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

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

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

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

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

Patch Set 7 : diff -r cc53451c5af3c6f2b45b8889e072c81dfb494164 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -11 lines) Patch
M src/runtime/runtime1.go View 1 2 3 1 chunk +10 lines, -11 lines 0 comments Download

Messages

Total messages: 4
aram
Hello rsc (cc: brad, dfc, golang-codereviews@googlegroups.com, iant, khr, minux, r, rlh), I'd like you to ...
10 years, 5 months ago (2014-11-13 16:26:57 UTC) #1
rsc
that's weird. that should be linker initialized. we should fix that instead of working around ...
10 years, 5 months ago (2014-11-13 17:31:25 UTC) #2
aram
Yes, we should definitely fix that, it probably affects other things as well.
10 years, 5 months ago (2014-11-13 17:32:55 UTC) #3
gobot
10 years, 4 months ago (2014-12-19 05:15:52 UTC) #4
R=close

To the author of this CL:

The Go project has moved to Gerrit Code Review.

If this CL should be continued, please see the latest version of
https://golang.org/doc/contribute.html for instructions on
how to set up Git and the Go project's Gerrit codereview plugin,
and then create a new change with your current code.

If there has been discussion on this CL, please give a link to it
(golang.org/cl/172510043 is best) in the description in your
new CL.

Thanks very much.
Sign in to reply to this message.

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