tools/go/pointer
Alan Donovan 43c97eab79 go.tools/go/pointer: fix solver nontermination bug due to reflective type construction cycles.
Programs such as this cause the PtrTo solver to attempt to
enumerate an infinite set of types {T, *T, ..., *******T, etc}.

        t := reflect.TypeOf(T{})
        for {
                t = reflect.PtrTo(t)
        }

The fix is to bound the depth of reflectively created types at
about 4 map/chan/slice/pointer constructors.

+ test.

LGTM=gri
R=gri
CC=crawshaw, golang-codereviews
https://golang.org/cl/102030044
2014-05-30 16:27:51 -04:00
..
testdata go.tools/go/pointer: fix solver nontermination bug due to reflective type construction cycles. 2014-05-30 16:27:51 -04:00
TODO go.tools: rename packages. 2014-01-16 09:33:58 -05:00
analysis.go go.tools/go/pointer: add TODO comment. 2014-04-15 15:41:02 -04:00
api.go go.tools/go/callgraph: simplifications to API. 2014-02-20 11:57:48 -05:00
callgraph.go go.tools/go/callgraph: simplifications to API. 2014-02-20 11:57:48 -05:00
constraint.go go.tools/go/pointer: node renumbering 2014-03-11 18:37:19 -04:00
doc.go go.tools: fix various typos 2014-05-02 14:38:08 -07:00
example_test.go go.tools/go/loader: add Config.ParserMode configuration parameter. 2014-03-27 12:50:26 -04:00
gen.go go.tools: fix various typos 2014-05-02 14:38:08 -07:00
intrinsics.go go.tools/go/pointer: node renumbering 2014-03-11 18:37:19 -04:00
labels.go go.tools: fix various typos 2014-05-02 14:38:08 -07:00
opt.go go.tools/go/pointer: node renumbering 2014-03-11 18:37:19 -04:00
pointer_test.go go.tools: remove dead code 2014-04-25 15:08:13 -04:00
print.go go.tools: rename packages. 2014-01-16 09:33:58 -05:00
reflect.go go.tools/go/pointer: fix solver nontermination bug due to reflective type construction cycles. 2014-05-30 16:27:51 -04:00
solve.go go.tools/go/pointer: node renumbering 2014-03-11 18:37:19 -04:00
util.go go.tools/pointer: opt: type-based label tracking reduces solver time by up to 75%. 2014-02-18 12:40:44 -08:00