)]}' { "commit": "e94544cf012535da6b3c9e735bc4026e2db1c99c", "tree": "cf60197c95b00fbabb9cbb6977a5ac6013e124cb", "parents": [ "268dd2e5a7a8919bd26f0a59c847f8268a2437d1" ], "author": { "name": "Matthew Dempsky", "email": "mdempsky@google.com", "time": "Wed Aug 19 21:39:12 2020 -0700" }, "committer": { "name": "Matthew Dempsky", "email": "mdempsky@google.com", "time": "Thu Aug 20 17:48:29 2020 +0000" }, "message": "cmd/compile: fix checkptr handling of \u0026^\n\ncheckptr has code to recognize \u0026^ expressions, but it didn\u0027t take into\naccount that \"p \u0026^ x\" gets rewritten to \"p \u0026 ^x\" during walk, which\nresulted in false positive diagnostics.\n\nThis CL changes walkexpr to mark OANDNOT expressions with Implicit\nwhen they\u0027re rewritten to OAND, so that walkCheckPtrArithmetic can\nstill recognize them later.\n\nIt would be slightly more idiomatic to instead mark the OBITNOT\nexpression as Implicit (as it\u0027s a compiler-generated Node), but the\nOBITNOT expression might get constant folded. It\u0027s not worth the extra\ncomplexity/subtlety of relying on n.Right.Orig, so we set Implicit on\nthe OAND node instead.\n\nTo atone for this transgression, I add documentation for nodeImplicit.\n\nFixes #40917.\n\nChange-Id: I386304171ad299c530e151e5924f179e9a5fd5b8\nReviewed-on: https://go-review.googlesource.com/c/go/+/249477\nRun-TryBot: Matthew Dempsky \u003cmdempsky@google.com\u003e\nTryBot-Result: Gobot Gobot \u003cgobot@golang.org\u003e\nReviewed-by: Keith Randall \u003ckhr@golang.org\u003e\nReviewed-by: Cuong Manh Le \u003ccuong.manhle.vn@gmail.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "b658410c53cd513e3772c7925ca155cf2bc7075a", "old_mode": 33188, "old_path": "src/cmd/compile/internal/gc/syntax.go", "new_id": "47e5e59156c92074b224944491dca00b4450858c", "new_mode": 33188, "new_path": "src/cmd/compile/internal/gc/syntax.go" }, { "type": "modify", "old_id": "8ae3d9a5c7bc599d80e44cb89ac7421fd8557411", "old_mode": 33188, "old_path": "src/cmd/compile/internal/gc/walk.go", "new_id": "74ed0411bd80b6f00b8537ac779e15775f5fb98d", "new_mode": 33188, "new_path": "src/cmd/compile/internal/gc/walk.go" }, { "type": "modify", "old_id": "8ab8a4937c2bedb97abbd700bf8259f3a75f633f", "old_mode": 33188, "old_path": "src/runtime/checkptr_test.go", "new_id": "194cc1243a96ccca3f709e45af187d28ab8bd984", "new_mode": 33188, "new_path": "src/runtime/checkptr_test.go" }, { "type": "modify", "old_id": "45e6fb1aa53f6c463ad7a8196439505372a00526", "old_mode": 33188, "old_path": "src/runtime/testdata/testprog/checkptr.go", "new_id": "e0a2794f4c1da108a7883285a20526e3738bebed", "new_mode": 33188, "new_path": "src/runtime/testdata/testprog/checkptr.go" }, { "type": "add", "old_id": "0000000000000000000000000000000000000000", "old_mode": 0, "old_path": "/dev/null", "new_id": "2128be5eca48bfe02bac711fa259d58851a4a198", "new_mode": 33188, "new_path": "test/fixedbugs/issue40917.go" } ] }