]> sourceware.org Git - libabigail.git/commit
Don't walk diff trees indefinitely when applying suppressions
authorDodji Seketeli <dodji@redhat.com>
Tue, 23 Aug 2016 10:38:36 +0000 (12:38 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 23 Aug 2016 10:38:36 +0000 (12:38 +0200)
commit09154361a446fcd86f2d5db8da686126150be872
tree5c16356a206db6bfdc1c2f42e8088bd9d60c9b99
parent103a6eb94faee7950fa57e4becffd453d7e4d1f7
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:

    abidiff --d1 rh-mariadb101-mariadb-10.1.14-2.el6.x86_64/usr/lib/debug --d2 rh-mariadb101-mariadb-10.1.16-1.el6.x86_64/usr/lib/debug rh-mariadb101-mariadb-10.1.14-2.el6.x86_64/opt/rh/rh-mariadb101/root/usr/lib64/mysql/plugin/ha_connect.so rh-mariadb101-mariadb-10.1.16-1.el6.x86_64/opt/rh/rh-mariadb101/root/usr/lib64/mysql/plugin/ha_connect.so

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

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-comparison.cc
This page took 0.170886 seconds and 5 git commands to generate.