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 <jaskaransingh7654...@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

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to