diff options
author | Andrey Ponomarenko <andrewponomarenko@yandex.ru> | 2015-12-11 23:40:03 +0300 |
---|---|---|
committer | Andrey Ponomarenko <andrewponomarenko@yandex.ru> | 2015-12-11 23:40:03 +0300 |
commit | 86b503bd85e3a0e8b32616d5af67c7d176a6263e (patch) | |
tree | 231498f19d4e74ee3dbf105b9c3ac8b506d091b5 | |
parent | dfd124548b3439a0a40764128a7f6506f68ab4ee (diff) | |
download | abi-compliance-checker-86b503bd85e3a0e8b32616d5af67c7d176a6263e.tar.gz |
Fixed false positives in the report if input ABI dumps contain __unknown__ types.
-rw-r--r-- | INSTALL | 77 | ||||
-rw-r--r-- | abi-compliance-checker.pl | 33 | ||||
-rw-r--r-- | doc/Changelog.html | 8 | ||||
-rw-r--r-- | doc/index.html | 2 |
4 files changed, 80 insertions, 40 deletions
@@ -9,8 +9,8 @@ All rights reserved. RELEASE INFORMATION Project: ABI Compliance Checker (ACC) -Version: 1.99.14.2 -Date: 2015-11-12 +Version: 1.99.15 +Date: 2015-12-11 This file explains how to install and setup environment @@ -22,8 +22,8 @@ Content: 1. Requirements for Linux and FreeBSD 2. Requirements for Mac OS X 3. Requirements for MS Windows - 4. Configuring and Installing - 5. Running the Tool + 4. Configure and Install + 5. Usage 6. Usage with ABI Dumper @@ -62,8 +62,8 @@ Content: -4. CONFIGURING AND INSTALLING -============================= +4. CONFIGURE AND INSTALL +======================== This command will install the abi-compliance-checker program into the PREFIX/bin system directory and private modules into the PREFIX/share: @@ -76,48 +76,51 @@ Content: -5. RUNNING THE TOOL -=================== +5. USAGE +======== - 1. Create XML-descriptors for two versions - of a library (OLD.xml and NEW.xml): + Create XML-descriptors for two versions + of a library (OLD.xml and NEW.xml): - <version> - 1.0 - </version> + <version> + 1.0 + </version> - <headers> - /path1/to/header(s)/ - /path2/to/header(s)/ - ... - </headers> + <headers> + /path1/to/header(s)/ + /path2/to/header(s)/ + ... + </headers> - <libs> - /path1/to/library(ies)/ - /path2/to/library(ies)/ - ... - </libs> + <libs> + /path1/to/library(ies)/ + /path2/to/library(ies)/ + ... + </libs> - 2. abi-compliance-checker -lib NAME -old OLD.xml -new NEW.xml - 3. For advanced usage, see doc/Readme.html or --help option + Check compatibility: + + abi-compliance-checker -lib NAME -old OLD.xml -new NEW.xml + + For advanced usage, see doc/Readme.html or --help option. 6. USAGE WITH ABI DUMPER ======================== - 1. Library should be compiled with -g - option to contain DWARF debug info - - 2. Create ABI dumps for both library versions - using the ABI Dumper tool (https://github.com/lvc/abi-dumper): - - abi-dumper OLD.so -o ABI-0.dump -lver 0 - abi-dumper NEW.so -o ABI-1.dump -lver 1 - - 3. Compare ABI dumps: - - abi-compliance-checker -l NAME -old ABI-0.dump -new ABI-1.dump + Library should be compiled with -g + option to contain DWARF debug info. + + Create ABI dumps for both library versions + using the ABI Dumper tool (https://github.com/lvc/abi-dumper): + + abi-dumper OLD.so -o ABI-0.dump -lver 0 + abi-dumper NEW.so -o ABI-1.dump -lver 1 + + Compare ABI dumps: + + abi-compliance-checker -l NAME -old ABI-0.dump -new ABI-1.dump Enjoy! diff --git a/abi-compliance-checker.pl b/abi-compliance-checker.pl index e9a1c2b..6366088 100644 --- a/abi-compliance-checker.pl +++ b/abi-compliance-checker.pl @@ -11406,7 +11406,7 @@ sub mergeTypes($$$) my ($Type1_Id, $Type2_Id, $Level) = @_; return {} if(not $Type1_Id or not $Type2_Id); - if($Cache{"mergeTypes"}{$Level}{$Type1_Id}{$Type2_Id}) + if(defined $Cache{"mergeTypes"}{$Level}{$Type1_Id}{$Type2_Id}) { # already merged return $Cache{"mergeTypes"}{$Level}{$Type1_Id}{$Type2_Id}; } @@ -11423,6 +11423,15 @@ sub mergeTypes($$$) $CheckedTypes{$Level}{$Type1_Pure{"Name"}} = 1; + if(defined $UsedDump{1}{"DWARF"}) + { + if($Type1_Pure{"Name"} eq "__unknown__" + or $Type2_Pure{"Name"} eq "__unknown__") + { # Error ABI dump + return ($Cache{"mergeTypes"}{$Level}{$Type1_Id}{$Type2_Id} = {}); + } + } + my %SubProblems = (); if($Type1_Pure{"Name"} eq $Type2_Pure{"Name"}) @@ -11535,6 +11544,16 @@ sub mergeTypes($$$) } my %Base1_Pure = get_PureType($Base_1{"Tid"}, $TypeInfo{1}); my %Base2_Pure = get_PureType($Base_2{"Tid"}, $TypeInfo{2}); + + if(defined $UsedDump{1}{"DWARF"}) + { + if($Base1_Pure{"Name"}=~/\b__unknown__\b/ + or $Base2_Pure{"Name"}=~/\b__unknown__\b/) + { # Error ABI dump + return ($Cache{"mergeTypes"}{$Level}{$Type1_Id}{$Type2_Id} = {}); + } + } + if(tNameLock($Base_1{"Tid"}, $Base_2{"Tid"})) { if(diffTypes($Base1_Pure{"Tid"}, $Base2_Pure{"Tid"}, $Level)) @@ -14600,9 +14619,21 @@ sub detectTypeChange($$$$) my %Type2 = get_Type($Type2_Id, 2); my %Type1_Pure = get_PureType($Type1_Id, $TypeInfo{1}); my %Type2_Pure = get_PureType($Type2_Id, $TypeInfo{2}); + my %Type1_Base = ($Type1_Pure{"Type"} eq "Array")?get_OneStep_BaseType($Type1_Pure{"Tid"}, $TypeInfo{1}):get_BaseType($Type1_Id, 1); my %Type2_Base = ($Type2_Pure{"Type"} eq "Array")?get_OneStep_BaseType($Type2_Pure{"Tid"}, $TypeInfo{2}):get_BaseType($Type2_Id, 2); + if(defined $UsedDump{1}{"DWARF"}) + { + if($Type1_Pure{"Name"} eq "__unknown__" + or $Type2_Pure{"Name"} eq "__unknown__" + or $Type1_Base{"Name"} eq "__unknown__" + or $Type2_Base{"Name"} eq "__unknown__") + { # Error ABI dump + return (); + } + } + my $Type1_PLevel = get_PLevel($Type1_Id, 1); my $Type2_PLevel = get_PLevel($Type2_Id, 2); return () if(not $Type1{"Name"} or not $Type2{"Name"}); diff --git a/doc/Changelog.html b/doc/Changelog.html index b7c3f92..6ff72a6 100644 --- a/doc/Changelog.html +++ b/doc/Changelog.html @@ -44,12 +44,18 @@ <p/> <br/> -<b>Version 1.99.14.1 (November 11, 2015)</b><br/> +<b>Version 1.99.15 (December 11, 2015)</b><br/> <b>Bug Fixes</b> <ul> <li> Fixed hang on some template instances </li> + <li> + Fixed support for old ABI dumps (formatting of data types) + </li> + <li> + Fixed false positives in the report if input ABI dumps contain __unknown__ types + </li> </ul> <br/> diff --git a/doc/index.html b/doc/index.html index 56b377e..cbe6f55 100644 --- a/doc/index.html +++ b/doc/index.html @@ -94,7 +94,7 @@ <h2>Downloads</h2> <p>All releases can be downloaded from <a href="https://github.com/lvc/abi-compliance-checker/">this page</a>.</p> -<p>Latest release: <a href="https://github.com/lvc/abi-compliance-checker/archive/1.99.14.1.tar.gz">abi-compliance-checker-1.99.14.1.tar.gz</a></p> +<p>Latest release: <a href="https://github.com/lvc/abi-compliance-checker/archive/1.99.15.tar.gz">abi-compliance-checker-1.99.15.tar.gz</a></p> <p>Read-only access to the latest development version:</p> |