terraform/internal/dag
Katy Moe f8fdb6de3f
do not use pointer addr strings as map keys in set
When creating a Set of BasicEdges, the Hashcode function is used to determine
map keys for the underlying set data structure.

The string hex representation of the two vertices' pointers is unsafe to use
as a map key, since these addresses may change between the time they are added
to the set and the time the set is operated on.

Instead we modify the Hashcode function to maintain the references to the
underlying vertices so they cannot be garbage collected during the lifetime
of the Set.
2022-01-05 11:28:47 +00:00
..
dag.go clarify dag comments 2022-01-04 10:07:31 -05:00
dag_test.go clarify dag comments 2022-01-04 10:07:31 -05:00
dot.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
dot_test.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
edge.go do not use pointer addr strings as map keys in set 2022-01-05 11:28:47 +00:00
edge_test.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
graph.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
graph_test.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
marshal.go de-linting 2021-09-01 11:36:21 -04:00
marshal_test.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
set.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
set_test.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
tarjan.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
tarjan_test.go Move dag/ to internal/dag/ 2021-05-17 14:09:07 -07:00
walk.go Move tfdiags/ to internal/tfdiags/ 2021-05-17 14:09:07 -07:00
walk_test.go Move tfdiags/ to internal/tfdiags/ 2021-05-17 14:09:07 -07:00