Don't walk diff trees indefinitely when applying suppressions
When applying suppressions to diff graphs, if the same diff node
appears twice in the graph in a way that creates a cycle, we can get
trapped in the cycle when walking the graph. That results in a an
infinite loop. Note that the infinite loop appears in the
diff::traverse member function, in the for-loop that walks the
children nodes of a given node.
This patch avoids walking the same node twice when applying
suppressions.
The test binaries that exhibit the issue come from the two following
packages:
rh-mariadb101-mariadb-10.1.14-2.el6 and rh-mariadb101-mariadb-10.1.16-1.el6.
The sub-packages compared are
rh-mariadb101-mariadb-server-10.1.14-2.el6.x86_64.rpm and
rh-mariadb101-mariadb-server-10.1.16-1.el6.x86_64.rpm.
The debug info packages are
rh-mariadb101-mariadb-debuginfo-10.1.16-1.el6.x86_64.rpm and
rh-mariadb101-mariadb-debuginfo-10.1.14-2.el6.x86_64.rpm.
Once the packages are properly extracted the command line that
exhibits the infinite loop is:
This patch has no test because of the cheer size of these packages;
the debug info packages alone take more than 100MB :-( I really hope
we set up a separate repository with big test packages to overcome
this. Maybe something using fedabipkgdiff ...