From: Matthias Maennich via libabigail Date: Mon, 15 Apr 2019 17:05:22 +0000 (+0100) Subject: dwarf-reader: fix recursion in expr_result::operator& X-Git-Tag: libabigail-1.7~124 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=90c32a8df5a4ebd3509504211fbf5bd082b4897c;p=libabigail.git dwarf-reader: fix recursion in expr_result::operator& operator& was implemented in terms of itself, leading to infinite recursion. Fix that by implementing it in terms of &='ing the const value. That is consistent with all other ?= operators. * src/abg-dwarf-reader.cc: fix expr_result::operator& Signed-off-by: Matthias Maennich --- diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index be0f6cf7..93f10e7d 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -2626,7 +2626,7 @@ public: operator&(const expr_result& o) { expr_result r(*this); - r.const_value_ = *this & o; + r.const_value_ &= o.const_value_; r.is_const_ = r.is_const_ && o.is_const_; return r; }