Also make invalidptr control the recently added GC pointer check,
as documented.
Change-Id: Iccfdf49480219d12be8b33b8f03d8312d8ceabed
Reviewed-on: https://go-review.googlesource.com/12857
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
// The following ensures that we are rigorous about what data
// structures hold valid pointers.
// TODO(rsc): Check if this still happens.
- if true {
+ if debug.invalidptr != 0 {
// Still happens sometimes. We don't know why.
printlock()
print("runtime:objectstart Span weird: p=", hex(p), " k=", hex(k))
value *int32
}
-// TODO(rsc): Make GC respect debug.invalidptr.
-
// Holds variables parsed from GODEBUG env var,
// except for "memprofilerate" since there is an
// existing int var for that value, which may
}
func parsedebugvars() {
+ // defaults
+ debug.invalidptr = 1
+
for p := gogetenv("GODEBUG"); p != ""; {
field := ""
i := index(p, ",")