[Linux-kernel-mentees] [PATCH 1/2] engine: remove circular references in MINUS/NOREPLACEMENT case

Jaskaran Singh jaskaransingh7654321 at gmail.com
Wed Nov 27 17:38:14 UTC 2019


The cocci info tag can sometimes have circular references in the
MINUS/NOREPLACEMENT case in the transformation. Pass the binding
info through clean_env to remove circular references.

Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
---
 engine/transformation_c.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/engine/transformation_c.ml b/engine/transformation_c.ml
index bcde08b8..9f0b0ab2 100644
--- a/engine/transformation_c.ml
+++ b/engine/transformation_c.ml
@@ -380,7 +380,7 @@ module XTRANS = struct
 	  (Ast_cocci.MINUS
 	     (old_pos,Common.union_set old_inst new_inst,old_adj,
 	      Ast_cocci.NOREPLACEMENT),
-	   [tin.binding]);
+	   [clean_env tin.binding]);
         (if !Flag_matcher.show_misc
         then pr2_once "already tagged but only removed, so safe")
 
-- 
2.21.0



More information about the Linux-kernel-mentees mailing list