diff options
author | Andrey Ponomarenko <aponomarenko@rosalab.ru> | 2013-02-07 19:11:42 +0400 |
---|---|---|
committer | Andrey Ponomarenko <aponomarenko@rosalab.ru> | 2013-02-07 19:11:42 +0400 |
commit | 8f4b981ae1f0ff8962e14c17229f6fc512d12f6a (patch) | |
tree | c01f85b73925c2c3662fb5b91c023043192a0b35 | |
parent | 74b33ee9348fd163e65f1879e860c7067ae2f61f (diff) | |
download | abi-compliance-checker-8f4b981ae1f0ff8962e14c17229f6fc512d12f6a.tar.gz |
ABI Compliance Checker 1.98.8
-rw-r--r-- | INSTALL | 6 | ||||
-rwxr-xr-x | Makefile.pl | 17 | ||||
-rwxr-xr-x | abi-compliance-checker.pl | 1288 | ||||
-rw-r--r-- | doc/Changes.html | 135 | ||||
-rw-r--r-- | doc/Descriptor.html | 51 | ||||
-rw-r--r-- | doc/Options.html | 16 | ||||
-rw-r--r-- | doc/Readme.html | 11 | ||||
-rw-r--r-- | doc/SysCheck/Descriptor.html | 2 | ||||
-rw-r--r-- | doc/SysCheck/Examples.html | 2 | ||||
-rw-r--r-- | doc/SysCheck/Usage.html | 2 | ||||
-rw-r--r-- | modules/Internals/CallConv.pm | 2 | ||||
-rw-r--r-- | modules/Internals/RegTests.pm | 140 | ||||
-rw-r--r-- | modules/Internals/Styles/Report.css | 9 | ||||
-rw-r--r-- | modules/Internals/SysCheck.pm | 3 | ||||
-rw-r--r-- | modules/Internals/XmlDump.pm | 2 | ||||
-rw-r--r-- | modules/RulesBin.xml | 60 | ||||
-rw-r--r-- | modules/RulesSrc.xml | 58 |
17 files changed, 1304 insertions, 500 deletions
@@ -2,15 +2,15 @@ Copyright (C) 2009-2010 The Linux Foundation Copyright (C) 2009-2011 Institute for System Programming, RAS Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies) -Copyright (C) 2011-2012 ROSA Laboratory +Copyright (C) 2011-2013 ROSA Laboratory All rights reserved. RELEASE INFORMATION Project: ABI Compliance Checker (ACC) -Version: 1.98.7 -Date: 2012-12-14 +Version: 1.98.8 +Date: 2013-02-07 This file explains how to install and setup environment diff --git a/Makefile.pl b/Makefile.pl index ee13291..d6cd4fe 100755 --- a/Makefile.pl +++ b/Makefile.pl @@ -6,7 +6,7 @@ # Copyright (C) 2009-2010 The Linux Foundation # Copyright (C) 2009-2011 Institute for System Programming, RAS # Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2011-2012 ROSA Laboratory +# Copyright (C) 2011-2013 ROSA Laboratory # # Written by Andrey Ponomarenko # @@ -218,8 +218,19 @@ sub scenario() } # check PATH - if($ENV{"PATH"}!~/(\A|[:;])\Q$EXE_PATH\E[\/\\]?(\Z|[:;])/) { - print "WARNING: your PATH variable doesn't include \'$EXE_PATH\'\n"; + my $Warn = "WARNING: your PATH variable doesn't include \'$EXE_PATH\'\n"; + + if($Config{"osname"}=~/win/i) + { + if($ENV{"PATH"}!~/(\A|[:;])\Q$EXE_PATH\E[\/\\]?(\Z|[:;])/i) { + print $Warn; + } + } + else + { + if($ENV{"PATH"}!~/(\A|[:;])\Q$EXE_PATH\E[\/\\]?(\Z|[:;])/) { + print $Warn; + } } } exit(0); diff --git a/abi-compliance-checker.pl b/abi-compliance-checker.pl index ea8d832..c9687b3 100755 --- a/abi-compliance-checker.pl +++ b/abi-compliance-checker.pl @@ -1,12 +1,12 @@ #!/usr/bin/perl ########################################################################### -# ABI Compliance Checker (ACC) 1.98.7 +# ABI Compliance Checker (ACC) 1.98.8 # A tool for checking backward compatibility of a C/C++ library API # # Copyright (C) 2009-2010 The Linux Foundation # Copyright (C) 2009-2011 Institute for System Programming, RAS # Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2011-2012 ROSA Laboratory +# Copyright (C) 2011-2013 ROSA Laboratory # # Written by Andrey Ponomarenko # @@ -57,9 +57,8 @@ use File::Copy qw(copy move); use Cwd qw(abs_path cwd realpath); use Data::Dumper; use Config; -use Fcntl; -my $TOOL_VERSION = "1.98.7"; +my $TOOL_VERSION = "1.98.8"; my $ABI_DUMP_VERSION = "2.20"; my $OLDEST_SUPPORTED_VERSION = "1.18"; my $XML_REPORT_VERSION = "1.0"; @@ -87,7 +86,7 @@ $TargetComponent_Opt, $TargetSysInfo, $TargetHeader, $ExtendedCheck, $Quiet, $SkipHeadersPath, $CppCompat, $LogMode, $StdOut, $ListAffected, $ReportFormat, $UserLang, $TargetHeadersPath, $BinaryOnly, $SourceOnly, $BinaryReportPath, $SourceReportPath, $UseXML, $Browse, $OpenReport, $SortDump, $DumpFormat, -$ExtraInfo, $ExtraDump, $Force); +$ExtraInfo, $ExtraDump, $Force, $Tolerance, $Tolerant); my $CmdName = get_filename($0); my %OS_LibExt = ( @@ -263,7 +262,9 @@ GetOptions("h|help!" => \$Help, "open!" => \$OpenReport, "extra-info=s" => \$ExtraInfo, "extra-dump!" => \$ExtraDump, - "force!" => \$Force + "force!" => \$Force, + "tolerance=s" => \$Tolerance, + "tolerant!" => \$Tolerant ) or ERR_MESSAGE(); sub ERR_MESSAGE() @@ -742,6 +743,19 @@ OTHER OPTIONS: -force Try to use this option if the tool doesn't work. + + -tolerance LEVEL + Apply a set of heuristics to successfully compile input + header files. You can enable several tolerance levels by + joining them into one string (e.g. 13, 124, etc.). + Levels: + 1 - skip non-Linux headers (e.g. win32_*.h, etc.) + 2 - skip internal headers (e.g. *_p.h, impl/*.h, etc.) + 3 - skip headers that iclude non-Linux headers + 4 - skip headers included by others + + -tolerant + Enable highest tolerance level [1234]. REPORT: Compatibility report will be generated to: @@ -966,8 +980,8 @@ my %NodeType= ( "union_type" => "Union", "var_decl" => "Other", "void_type" => "Intrinsic", - # "nop_expr" => "Other", - # "addr_expr" => "Other", + "nop_expr" => "Other", # + "addr_expr" => "Other", # "offset_type" => "Other" ); my %CppKeywords_C = map {$_=>1} ( @@ -1032,7 +1046,8 @@ my %CppKeywords_O = map {$_=>1} ( my %CppKeywords_A = map {$_=>1} ( "this", - "throw" + "throw", + "template" ); foreach (keys(%CppKeywords_C), @@ -1332,9 +1347,11 @@ my (%WORD_SIZE, %CPU_ARCH, %GCC_VERSION); my $STDCXX_TESTING = 0; my $GLIBC_TESTING = 0; +my $CPP_HEADERS = 0; my $CheckHeadersOnly = $CheckHeadersOnly_Opt; my $CheckObjectsOnly = $CheckObjectsOnly_Opt; + my $TargetComponent; my $CheckUndefined = 0; @@ -1471,6 +1488,7 @@ my %Skip_Include_Paths; my %RegisteredDirs; my %Header_ErrorRedirect; my %Header_Includes; +my %Header_Includes_R; my %Header_ShouldNotBeUsed; my %RecursiveIncludes; my %Header_Include_Prefix; @@ -1557,6 +1575,7 @@ my %Type_MaxSeverity; # Recursion locks my @RecurLib; my @RecurTypes; +my @RecurTypes_Diff; my @RecurInclude; my @RecurConstant; @@ -1576,8 +1595,8 @@ my %SymVer = ( # Problem descriptions my %CompatProblems; -my %ProblemsWithConstants; -my %ImplProblems; +my %CompatProblems_Constants; +my %CompatProblems_Impl; my %TotalAffected; # Reports @@ -1936,6 +1955,7 @@ sub readDescriptor($$) if(not -d $Path) { exitStatus("Access_Error", "can't access directory \'$Path\'"); } + $Path = get_abs_path($Path); $Path = path_format($Path, $OSgroup); push_U($SystemPaths{"include"}, $Path); } @@ -1944,6 +1964,7 @@ sub readDescriptor($$) if(not -d $Path) { exitStatus("Access_Error", "can't access directory \'$Path\'"); } + $Path = get_abs_path($Path); $Path = path_format($Path, $OSgroup); push_U($SystemPaths{"lib"}, $Path); } @@ -1952,6 +1973,7 @@ sub readDescriptor($$) if(not -d $Path) { exitStatus("Access_Error", "can't access directory \'$Path\'"); } + $Path = get_abs_path($Path); $Path = path_format($Path, $OSgroup); push_U($SystemPaths{"bin"}, $Path); $TargetTools{$Path}=1; @@ -1965,6 +1987,7 @@ sub readDescriptor($$) if(not -d $Path) { exitStatus("Access_Error", "can't access directory \'$Path\'"); } + $Path = get_abs_path($Path); $Path = path_format($Path, $OSgroup); push(@{$Descriptor{$LibVersion}{"IncludePaths"}}, $Path); } @@ -1974,24 +1997,30 @@ sub readDescriptor($$) if(not -d $Path) { exitStatus("Access_Error", "can't access directory \'$Path\'"); } + $Path = get_abs_path($Path); $Path = path_format($Path, $OSgroup); push(@{$Descriptor{$LibVersion}{"AddIncludePaths"}}, $Path); } foreach my $Path (split(/\s*\n\s*/, parseTag(\$Content, "skip_include_paths"))) - { - # skip some auto-generated include paths + { # skip some auto-generated include paths + if(not is_abs($Path)) + { + if(my $P = abs_path($Path)) { + $Path = $P; + } + } $Skip_Include_Paths{$LibVersion}{path_format($Path)} = 1; } foreach my $Path (split(/\s*\n\s*/, parseTag(\$Content, "skip_including"))) - { - # skip direct including of some headers + { # skip direct including of some headers my ($CPath, $Type) = classifyPath($Path); $SkipHeaders{$LibVersion}{$Type}{$CPath} = 2; } $Descriptor{$LibVersion}{"GccOptions"} = parseTag(\$Content, "gcc_options"); foreach my $Option (split(/\s*\n\s*/, $Descriptor{$LibVersion}{"GccOptions"})) { - if(index($Option, "-Wl")==-1) { + if($Option!~/\A\-(Wl|l|L)/) + { # skip linker options $CompilerOptions{$LibVersion} .= " ".$Option; } } @@ -2193,7 +2222,7 @@ sub simplifyConstants() { my $Value = $Constants{$Version}{$Constant}{"Value"}; if(defined $EnumConstants{$Version}{$Value}) { - $Constants{$Version}{$Constant}{"Value"} = $EnumConstants{$Version}{$Constant}{"Value"}; + $Constants{$Version}{$Constant}{"Value"} = $EnumConstants{$Version}{$Value}{"Value"}; } } } @@ -2745,6 +2774,12 @@ sub getTypeAttr($) { # anon typedef to anon type: ._N return (); } + + if($LibInfo{$Version}{"info"}{$TypeDeclId}=~/ artificial /i) + { # artificial typedef of "struct X" to "X" + $TypeAttr{"Artificial"} = 1; + } + if(my $NS = getNameSpace($TypeDeclId)) { my $TypeName = $TypeAttr{"Name"}; @@ -2779,7 +2814,7 @@ sub getTypeAttr($) } } } - if($TypeAttr{"Name"} ne $BTAttr{"Name"} + if($TypeAttr{"Name"} ne $BTAttr{"Name"} and not $TypeAttr{"Artificial"} and $TypeAttr{"Name"}!~/>(::\w+)+\Z/ and $BTAttr{"Name"}!~/>(::\w+)+\Z/) { if(not defined $Typedef_BaseName{$Version}{$TypeAttr{"Name"}}) @@ -2795,11 +2830,6 @@ sub getTypeAttr($) } } ($TypeAttr{"Header"}, $TypeAttr{"Line"}) = getLocation($TypeDeclId); - - if($LibInfo{$Version}{"info"}{$TypeDeclId}=~/ artificial /i) - { # artificial typedef of "struct X" to "X" - $TypeAttr{"Artificial"} = 1; - } } if(not $TypeAttr{"Size"}) { @@ -3703,10 +3733,18 @@ sub getTrivialTypeAttr($) foreach my $Pos (keys(%{$TypeAttr{"Memb"}})) { my $MName = $TypeAttr{"Memb"}{$Pos}{"name"}; + my $MVal = $TypeAttr{"Memb"}{$Pos}{"value"}; $EnumConstants{$Version}{$MName} = { - "Value"=>$TypeAttr{"Memb"}{$Pos}{"value"}, + "Value"=>$MVal, "Header"=>$TypeAttr{"Header"} }; + if(isAnon($TypeAttr{"Name"})) + { + %{$Constants{$Version}{$MName}} = ( + "Value" => $MVal, + "Header" => $TypeAttr{"Header"} + ); + } } } } @@ -4456,22 +4494,14 @@ sub getDataVal($$) { if(defined $LibInfo{$Version}{"info_type"}{$1} and $LibInfo{$Version}{"info_type"}{$1} eq "nop_expr") - { # char const* data = "str" - # NOTE: disabled - if(my $NopExpr = $LibInfo{$Version}{"info"}{$1}) + { + if(my $Nop = getTreeAttr_Op($1)) { - if($NopExpr=~/op 0[ ]*:[ ]*@(\d+) /) + if(defined $LibInfo{$Version}{"info_type"}{$Nop} + and $LibInfo{$Version}{"info_type"}{$Nop} eq "addr_expr") { - if(defined $LibInfo{$Version}{"info_type"}{$1} - and $LibInfo{$Version}{"info_type"}{$1} eq "addr_expr") - { - if(my $AddrExpr = $LibInfo{$Version}{"info"}{$1}) - { - if($AddrExpr=~/op 0[ ]*:[ ]*@(\d+) /) - { - return getInitVal($1, $TypeId); - } - } + if(my $Addr = getTreeAttr_Op($1)) { + return getInitVal($Addr, $TypeId); } } } @@ -4725,18 +4755,6 @@ sub getSymbolInfo($) return; } } - if(not $CheckHeadersOnly) - { - if($SymbolInfo{$Version}{$InfoId}{"Type"} eq "Function" - and not $SymbolInfo{$Version}{$InfoId}{"Class"} - and link_symbol($SymbolInfo{$Version}{$InfoId}{"ShortName"}, $Version, "-Deps")) - { # functions (C++): not mangled in library, but are mangled in TU dump - if(not $SymbolInfo{$Version}{$InfoId}{"MnglName"} - or not link_symbol($SymbolInfo{$Version}{$InfoId}{"MnglName"}, $Version, "-Deps")) { - $SymbolInfo{$Version}{$InfoId}{"MnglName"} = $SymbolInfo{$Version}{$InfoId}{"ShortName"}; - } - } - } if($LibInfo{$Version}{"info"}{$InfoId}=~/ lang:[ ]*C /i) { # extern "C" $SymbolInfo{$Version}{$InfoId}{"Lang"} = "C"; @@ -4772,6 +4790,34 @@ sub getSymbolInfo($) } } } + if(not $CheckHeadersOnly + and $SymbolInfo{$Version}{$InfoId}{"Type"} eq "Function" + and not $SymbolInfo{$Version}{$InfoId}{"Class"}) + { + my $Incorrect = 0; + + if($SymbolInfo{$Version}{$InfoId}{"MnglName"}) + { + if(index($SymbolInfo{$Version}{$InfoId}{"MnglName"}, "_Z")==0 + and not link_symbol($SymbolInfo{$Version}{$InfoId}{"MnglName"}, $Version, "-Deps")) + { # mangled in the TU dump, but not mangled in the library + $Incorrect = 1; + } + } + else + { + if($SymbolInfo{$Version}{$InfoId}{"Lang"} ne "C") + { # all C++ functions are not mangled in the TU dump + $Incorrect = 1; + } + } + if($Incorrect) + { + if(link_symbol($SymbolInfo{$Version}{$InfoId}{"ShortName"}, $Version, "-Deps")) { + $SymbolInfo{$Version}{$InfoId}{"MnglName"} = $SymbolInfo{$Version}{$InfoId}{"ShortName"}; + } + } + } if(not $SymbolInfo{$Version}{$InfoId}{"MnglName"}) { # can't detect symbol name delete($SymbolInfo{$Version}{$InfoId}); @@ -5153,6 +5199,10 @@ sub setFuncArgs($$) { # default arguments if(my $PurpType = $LibInfo{$Version}{"info_type"}{$PurpId}) { + if($PurpType eq "nop_expr") + { # func ( const char* arg = (const char*)(void*)0 ) + $PurpId = getTreeAttr_Op($PurpId); + } my $Val = getInitVal($PurpId, $ParamTypeId); if(defined $Val) { $SymbolInfo{$Version}{$InfoId}{"Param"}{$Pos}{"default"} = $Val; @@ -5286,6 +5336,17 @@ sub getTreeAttr_Purp($) return ""; } +sub getTreeAttr_Op($) +{ + if($_[0] and my $Info = $LibInfo{$Version}{"info"}{$_[0]}) + { + if($Info=~/op 0[ ]*:[ ]*@(\d+) /) { + return $1; + } + } + return ""; +} + sub getTreeAttr_Valu($) { if($_[0] and my $Info = $LibInfo{$Version}{"info"}{$_[0]}) @@ -5603,6 +5664,19 @@ sub registerHeader($$) { detect_header_includes($Header_Path, $LibVersion); + if(defined $Tolerance and $Tolerance=~/3/) + { # 3 - skip headers that include non-Linux headers + if($OSgroup ne "windows") + { + foreach my $Inc (keys(%{$Header_Includes{$LibVersion}{$Header_Path}})) + { + if(specificHeader($Inc, "windows")) { + return ""; + } + } + } + } + if(my $RHeader_Path = $Header_ErrorRedirect{$LibVersion}{$Header_Path}) { # redirect if($Registered_Headers{$LibVersion}{$RHeader_Path}{"Identity"} @@ -5625,8 +5699,9 @@ sub registerHeader($$) if(($Header=~/\.(\w+)\Z/ and $1 ne "h") or $Header!~/\.(\w+)\Z/) - { # hpp, hh + { # hpp, hh, etc. setLanguage($LibVersion, "C++"); + $CPP_HEADERS = 1; } if($CheckHeadersOnly @@ -5640,7 +5715,7 @@ sub registerHeader($$) return ""; } -sub register_directory($$$) +sub registerDir($$$) { my ($Dir, $WithDeps, $LibVersion) = @_; $Dir=~s/[\/\\]+\Z//g; @@ -5693,7 +5768,7 @@ sub register_directory($$$) { # search for "lib/include/" directory my $LibDir = $Dir; if($LibDir=~s/([\/\\])include\Z/$1lib/g and -d $LibDir) { - register_directory($LibDir, $WithDeps, $LibVersion); + registerDir($LibDir, $WithDeps, $LibVersion); } } } @@ -5800,12 +5875,20 @@ sub sortByWord($$) sub sortHeaders($$) { my ($H1, $H2) = @_; + $H1=~s/\.[a-z]+\Z//ig; $H2=~s/\.[a-z]+\Z//ig; - my ($HDir1, $Hname1) = separate_path($H1); - my ($HDir2, $Hname2) = separate_path($H2); + + my $Hname1 = get_filename($H1); + my $Hname2 = get_filename($H2); + my $HDir1 = get_dirname($H1); + my $HDir2 = get_dirname($H2); my $Dirname1 = get_filename($HDir1); my $Dirname2 = get_filename($HDir2); + + $HDir1=~s/\A.*[\/\\]+([^\/\\]+[\/\\]+[^\/\\]+)\Z/$1/; + $HDir2=~s/\A.*[\/\\]+([^\/\\]+[\/\\]+[^\/\\]+)\Z/$1/; + if($_[0] eq $_[1] or $H1 eq $H2) { return 0; @@ -5846,19 +5929,22 @@ sub sortHeaders($$) { # include/alsa/asoundlib.h return 1; } - elsif(checkRelevance($H1) - and not checkRelevance($H2)) - { # libebook/e-book.h - return -1; - } - elsif(checkRelevance($H2) - and not checkRelevance($H1)) - { # libebook/e-book.h - return 1; - } else { - return (lc($H1) cmp lc($H2)); + my $R1 = checkRelevance($H1); + my $R2 = checkRelevance($H2); + if($R1 and not $R2) + { # libebook/e-book.h + return -1; + } + elsif($R2 and not $R1) + { # libebook/e-book.h + return 1; + } + else + { + return (lc($H1) cmp lc($H2)); + } } } @@ -5894,7 +5980,7 @@ sub searchForHeaders($) elsif(-d $Path) { $Path = get_abs_path($Path); - register_directory($Path, 0, $LibVersion); + registerDir($Path, 0, $LibVersion); if(grep {$IPath eq $_} @{$Descriptor{$LibVersion}{"AddIncludePaths"}}) { push(@{$Add_Include_Paths{$LibVersion}}, $Path); } @@ -5914,7 +6000,7 @@ sub searchForHeaders($) $Path = get_abs_path($Path); $Path = path_format($Path, $OSgroup); if(-d $Path) { - register_directory($Path, 1, $LibVersion); + registerDir($Path, 1, $LibVersion); } elsif(-f $Path) { @@ -5922,12 +6008,12 @@ sub searchForHeaders($) if(not grep { $Dir eq $_ } (@{$SystemPaths{"include"}}) and not $LocalIncludes{$Dir}) { - register_directory($Dir, 1, $LibVersion); + registerDir($Dir, 1, $LibVersion); if(my $OutDir = get_dirname($Dir)) { # registering the outer directory if(not grep { $OutDir eq $_ } (@{$SystemPaths{"include"}}) and not $LocalIncludes{$OutDir}) { - register_directory($OutDir, 0, $LibVersion); + registerDir($OutDir, 0, $LibVersion); } } } @@ -5972,6 +6058,18 @@ sub searchForHeaders($) exitStatus("Access_Error", "can't identify \'$Dest\' as a header file"); } } + + if(defined $Tolerance and $Tolerance=~/4/) + { # 4 - skip headers included by others + foreach my $Path (keys(%{$Registered_Headers{$LibVersion}})) + { + if(defined $Header_Includes_R{$LibVersion}{$Path}) + { + delete($Registered_Headers{$LibVersion}{$Path}); + } + } + } + if(my $HList = $Descriptor{$LibVersion}{"IncludePreamble"}) { # preparing preamble headers foreach my $Header (split(/\s*\n\s*/, $HList)) @@ -6023,7 +6121,7 @@ sub searchForHeaders($) foreach my $HeaderName (keys(%{$Include_Order{$LibVersion}})) { # ordering headers according to descriptor - my $PairName=$Include_Order{$LibVersion}{$HeaderName}; + my $PairName = $Include_Order{$LibVersion}{$HeaderName}; my ($Pos, $PairPos) = (-1, -1); my ($Path, $PairPath) = (); my @Paths = keys(%{$Registered_Headers{$LibVersion}}); @@ -6120,6 +6218,14 @@ sub detect_header_includes($$) foreach my $Include (keys(%{$Inc})) { # detect includes $Header_Includes{$LibVersion}{$Path}{$Include} = $Inc->{$Include}; + + if(defined $Tolerance and $Tolerance=~/4/) + { + if(my $HPath = identifyHeader($Include, $LibVersion)) + { + $Header_Includes_R{$LibVersion}{$HPath}{$Path} = 1; + } + } } } } @@ -6328,21 +6434,28 @@ sub cmp_paths($$) sub checkRelevance($) { - my ($Path) = @_; + my $Path = $_[0]; return 0 if(not $Path); + if($SystemRoot) { $Path = cut_path_prefix($Path, $SystemRoot); } - my ($Dir, $Name) = separate_path($Path); + + my $Name = lc(get_filename($Path)); + my $Dir = lc(get_dirname($Path)); + $Name=~s/\.\w+\Z//g; # remove extension (.h) - my @Tokens = split(/[_\d\W]+/, $Name); - foreach (@Tokens) + + foreach my $Token (split(/[_\d\W]+/, $Name)) { - next if(not $_); - if($Dir=~/(\A|lib|[_\d\W])\Q$_\E([_\d\W]|lib|\Z)/i - or length($_)>=4 and $Dir=~/\Q$_\E/i) + my $Len = length($Token); + next if($Len<=1); + if($Dir=~/(\A|lib|[_\d\W])\Q$Token\E([_\d\W]|lib|\Z)/) + { # include/evolution-data-server-1.4/libebook/e-book.h + return 1; + } + if($Len>=4 and index($Dir, $Token)!=-1) { # include/gupnp-1.0/libgupnp/gupnp-context.h - # include/evolution-data-server-1.4/libebook/e-book.h return 1; } } @@ -6668,7 +6781,15 @@ sub getNameByInfo($) { if($NInfo=~/strg[ ]*:[ ]*(.*?)[ ]+lngt/) { # short unsigned int (may include spaces) - return $1; + my $Str = $1; + if($CppMode{$Version} + and $Str=~/\Ac99_(.+)\Z/) + { + if($CppKeywords_A{$1}) { + $Str=$1; + } + } + return $Str; } } } @@ -6930,24 +7051,24 @@ sub get_Signature($$) { # non-public global data return get_SignatureNoInfo($Symbol, $LibVersion); } - my ($Func_Signature, @Param_Types_FromUnmangledName) = (); + my ($Signature, @Param_Types_FromUnmangledName) = (); my $ShortName = $CompleteSignature{$LibVersion}{$Symbol}{"ShortName"}; if($Symbol=~/\A(_Z|\?)/) { if(my $ClassId = $CompleteSignature{$LibVersion}{$Symbol}{"Class"}) { - $Func_Signature = $TypeInfo{$LibVersion}{$ClassId}{"Name"}."::".(($CompleteSignature{$LibVersion}{$Symbol}{"Destructor"})?"~":"").$ShortName; + $Signature = $TypeInfo{$LibVersion}{$ClassId}{"Name"}."::".(($CompleteSignature{$LibVersion}{$Symbol}{"Destructor"})?"~":"").$ShortName; } elsif(my $NameSpace = $CompleteSignature{$LibVersion}{$Symbol}{"NameSpace"}) { - $Func_Signature = $NameSpace."::".$ShortName; + $Signature = $NameSpace."::".$ShortName; } else { - $Func_Signature = $ShortName; + $Signature = $ShortName; } my ($Short, $Params) = split_Signature($tr_name{$MnglName}); @Param_Types_FromUnmangledName = separate_Params($Params, 0, 1); } else { - $Func_Signature = $MnglName; + $Signature = $MnglName; } my @ParamArray = (); foreach my $Pos (sort {int($a) <=> int($b)} keys(%{$CompleteSignature{$LibVersion}{$Symbol}{"Param"}})) @@ -6961,8 +7082,9 @@ sub get_Signature($$) } foreach my $Typedef (keys(%ChangedTypedef)) { - my $Base = $Typedef_BaseName{$LibVersion}{$Typedef}; - $ParamTypeName=~s/\b\Q$Typedef\E\b/$Base/g; + if(my $Base = $Typedef_BaseName{$LibVersion}{$Typedef}) { + $ParamTypeName=~s/\b\Q$Typedef\E\b/$Base/g; + } } if(my $ParamName = $CompleteSignature{$LibVersion}{$Symbol}{"Param"}{$Pos}{"name"}) { push(@ParamArray, create_member_decl($ParamTypeName, $ParamName)); @@ -6973,37 +7095,37 @@ sub get_Signature($$) } if($CompleteSignature{$LibVersion}{$Symbol}{"Data"} or $GlobalDataObject{$LibVersion}{$Symbol}) { - $Func_Signature .= " [data]"; + $Signature .= " [data]"; } else { if(my $ChargeLevel = get_ChargeLevel($Symbol, $LibVersion)) { # add [in-charge] - $Func_Signature .= " ".$ChargeLevel; + $Signature .= " ".$ChargeLevel; } - $Func_Signature .= " (".join(", ", @ParamArray).")"; + $Signature .= " (".join(", ", @ParamArray).")"; if($CompleteSignature{$LibVersion}{$Symbol}{"Const"} or $Symbol=~/\A_ZN(V|)K/) { - $Func_Signature .= " const"; + $Signature .= " const"; } if($CompleteSignature{$LibVersion}{$Symbol}{"Volatile"} or $Symbol=~/\A_ZN(K|)V/) { - $Func_Signature .= " volatile"; + $Signature .= " volatile"; } if($CompleteSignature{$LibVersion}{$Symbol}{"Static"} and $Symbol=~/\A(_Z|\?)/) { # for static methods - $Func_Signature .= " [static]"; + $Signature .= " [static]"; } } if(defined $ShowRetVal and my $ReturnTId = $CompleteSignature{$LibVersion}{$Symbol}{"Return"}) { - $Func_Signature .= ":".$TypeInfo{$LibVersion}{$ReturnTId}{"Name"}; + $Signature .= ":".$TypeInfo{$LibVersion}{$ReturnTId}{"Name"}; } if($SymbolVersion) { - $Func_Signature .= $VersionSpec.$SymbolVersion; + $Signature .= $VersionSpec.$SymbolVersion; } - return ($Cache{"get_Signature"}{$LibVersion}{$Symbol} = $Func_Signature); + return ($Cache{"get_Signature"}{$LibVersion}{$Symbol} = $Signature); } sub create_member_decl($$) @@ -7600,119 +7722,46 @@ sub checkCTags($) close(CTAGS); } -sub getDump() +sub preChange($$) { - if(not $GCC_PATH) { - exitStatus("Error", "internal error - GCC path is not set"); - } - my $TmpHeaderPath = $TMP_DIR."/dump".$Version.".h"; - my $MHeaderPath = $TmpHeaderPath; - open(TMP_HEADER, ">", $TmpHeaderPath) || die ("can't open file \'$TmpHeaderPath\': $!\n"); - if(my $AddDefines = $Descriptor{$Version}{"Defines"}) - { - $AddDefines=~s/\n\s+/\n /g; - print TMP_HEADER "\n // add defines\n ".$AddDefines."\n"; - } - print TMP_HEADER "\n // add includes\n"; - foreach my $HPath (@{$Include_Preamble{$Version}}) { - print TMP_HEADER " #include \"".path_format($HPath, "unix")."\"\n"; - } - my @Headers = keys(%{$Registered_Headers{$Version}}); - @Headers = sort {int($Registered_Headers{$Version}{$a}{"Pos"})<=>int($Registered_Headers{$Version}{$b}{"Pos"})} @Headers; - foreach my $HPath (@Headers) - { - if(not grep {$HPath eq $_} (@{$Include_Preamble{$Version}})) { - print TMP_HEADER " #include \"".path_format($HPath, "unix")."\"\n"; - } - } - close(TMP_HEADER); - my $IncludeString = getIncString(getIncPaths(@{$Include_Preamble{$Version}}, @Headers), "GCC"); - - if($ExtraInfo) - { # extra information for other tools - if($IncludeString) { - writeFile($ExtraInfo."/include-string", $IncludeString); - } - writeFile($ExtraInfo."/recursive-includes", Dumper($RecursiveIncludes{$Version})); - writeFile($ExtraInfo."/direct-includes", Dumper($Header_Includes{$Version})); - - if(my @Redirects = keys(%{$Header_ErrorRedirect{$Version}})) - { - my $REDIR = ""; - foreach my $P1 (sort @Redirects) { - $REDIR .= $P1.";".$Header_ErrorRedirect{$Version}{$P1}."\n"; - } - writeFile($ExtraInfo."/include-redirect", $REDIR); - } - } - - if(not keys(%{$TargetHeaders{$Version}})) - { # Target headers - addTargetHeaders($Version); - } + my ($HeaderPath, $IncStr) = @_; - # clean memory - %RecursiveIncludes = (); - %Header_Include_Prefix = (); - %Header_Includes = (); - - # clean cache - delete($Cache{"identifyHeader"}); - delete($Cache{"detect_header_includes"}); - delete($Cache{"selectSystemHeader"}); - - # preprocessing stage - my $Pre = callPreprocessor($TmpHeaderPath, $IncludeString, $Version); - checkPreprocessedUnit($Pre); - - if($ExtraInfo) - { # extra information for other tools - writeFile($ExtraInfo."/header-paths", join("\n", sort keys(%{$PreprocessedHeaders{$Version}}))); - } + my $PreprocessCmd = getCompileCmd($HeaderPath, "-E", $IncStr); + my $Content = undef; - # clean memory - delete($Include_Neighbors{$Version}); - delete($PreprocessedHeaders{$Version}); - - if($COMMON_LANGUAGE{$Version} eq "C++") { - checkCTags($Pre); - } - - my $MContent = ""; - my $PreprocessCmd = getCompileCmd($TmpHeaderPath, "-E", $IncludeString); if($OStarget eq "windows" and get_dumpmachine($GCC_PATH)=~/mingw/i and $MinGWMode{$Version}!=-1) { # modify headers to compile by MinGW - if(not $MContent) + if(not $Content) { # preprocessing - $MContent = `$PreprocessCmd 2>\"$TMP_DIR/null\"`; + $Content = `$PreprocessCmd 2>\"$TMP_DIR/null\"`; } - if($MContent=~s/__asm\s*(\{[^{}]*?\}|[^{};]*)//g) + if($Content=~s/__asm\s*(\{[^{}]*?\}|[^{};]*)//g) { # __asm { ... } $MinGWMode{$Version}=1; } - if($MContent=~s/\s+(\/ \/.*?)\n/\n/g) + if($Content=~s/\s+(\/ \/.*?)\n/\n/g) { # comments after preprocessing $MinGWMode{$Version}=1; } - if($MContent=~s/(\W)(0x[a-f]+|\d+)(i|ui)(8|16|32|64)(\W)/$1$2$5/g) + if($Content=~s/(\W)(0x[a-f]+|\d+)(i|ui)(8|16|32|64)(\W)/$1$2$5/g) { # 0xffui8 $MinGWMode{$Version}=1; } - if($MinGWMode{$Version}) - { + + if($MinGWMode{$Version}) { printMsg("INFO", "Using MinGW compatibility mode"); - $MHeaderPath = $TMP_DIR."/dump$Version.i"; } } + if(($COMMON_LANGUAGE{$Version} eq "C" or $CheckHeadersOnly) - and $CppMode{$Version}!=-1 and not $CppCompat) + and $CppMode{$Version}!=-1 and not $CppCompat and not $CPP_HEADERS) { # rename C++ keywords in C code # disable this code by -cpp-compatible option - if(not $MContent) + if(not $Content) { # preprocessing - $MContent = `$PreprocessCmd 2>\"$TMP_DIR/null\"`; + $Content = `$PreprocessCmd 2>\"$TMP_DIR/null\"`; } my $RegExp_C = join("|", keys(%CppKeywords_C)); my $RegExp_F = join("|", keys(%CppKeywords_F)); @@ -7720,7 +7769,7 @@ sub getDump() my $Detected = undef; - while($MContent=~s/(\A|\n[^\#\/\n][^\n]*?|\n)(\*\s*|\s+|\@|\,|\()($RegExp_C|$RegExp_F)(\s*(\,|\)|\;|\-\>|\.|\:\s*\d))/$1$2c99_$3$4/g) + while($Content=~s/(\A|\n[^\#\/\n][^\n]*?|\n)(\*\s*|\s+|\@|\,|\()($RegExp_C|$RegExp_F)(\s*(\,|\)|\;|\-\>|\.|\:\s*\d))/$1$2c99_$3$4/g) { # MATCH: # int foo(int new, int class, int (*new)(int)); # unsigned private: 8; @@ -7729,7 +7778,7 @@ sub getDump() $CppMode{$Version} = 1; $Detected = "$1$2$3$4" if(not defined $Detected); } - if($MContent=~s/([^\w\s]|\w\s+)(?<!operator )(delete)(\s*\()/$1c99_$2$3/g) + if($Content=~s/([^\w\s]|\w\s+)(?<!operator )(delete)(\s*\()/$1c99_$2$3/g) { # MATCH: # int delete(...); # int explicit(...); @@ -7738,7 +7787,7 @@ sub getDump() $CppMode{$Version} = 1; $Detected = "$1$2$3" if(not defined $Detected); } - if($MContent=~s/(\s+)($RegExp_O)(\s*(\;|\:))/$1c99_$2$3/g) + if($Content=~s/(\s+)($RegExp_O)(\s*(\;|\:))/$1c99_$2$3/g) { # MATCH: # int bool; # DO NOT MATCH: @@ -7748,7 +7797,7 @@ sub getDump() $CppMode{$Version} = 1; $Detected = "$1$2$3" if(not defined $Detected); } - if($MContent=~s/(\s+)(operator)(\s*(\(\s*\)\s*[^\(\s]|\(\s*[^\)\s]))/$1c99_$2$3/g) + if($Content=~s/(\s+)(operator)(\s*(\(\s*\)\s*[^\(\s]|\(\s*[^\)\s]))/$1c99_$2$3/g) { # MATCH: # int operator(...); # DO NOT MATCH: @@ -7756,7 +7805,7 @@ sub getDump() $CppMode{$Version} = 1; $Detected = "$1$2$3" if(not defined $Detected); } - if($MContent=~s/([^\w\(\,\s]\s*|\s+)(operator)(\s*(\,\s*[^\(\s]|\)))/$1c99_$2$3/g) + if($Content=~s/([^\w\(\,\s]\s*|\s+)(operator)(\s*(\,\s*[^\(\s]|\)))/$1c99_$2$3/g) { # MATCH: # int foo(int operator); # int foo(int operator, int other); @@ -7765,7 +7814,7 @@ sub getDump() $CppMode{$Version} = 1; $Detected = "$1$2$3" if(not defined $Detected); } - if($MContent=~s/(\*\s*|\w\s+)(bool)(\s*(\,|\)))/$1c99_$2$3/g) + if($Content=~s/(\*\s*|\w\s+)(bool)(\s*(\,|\)))/$1c99_$2$3/g) { # MATCH: # int foo(gboolean *bool); # DO NOT MATCH: @@ -7773,7 +7822,7 @@ sub getDump() $CppMode{$Version} = 1; $Detected = "$1$2$3" if(not defined $Detected); } - if($MContent=~s/(\w)(\s*[^\w\(\,\s]\s*|\s+)(this|throw)(\s*[\,\)])/$1$2c99_$3$4/g) + if($Content=~s/(\w)(\s*[^\w\(\,\s]\s*|\s+)(this|throw)(\s*[\,\)])/$1$2c99_$3$4/g) { # MATCH: # int foo(int* this); # int bar(int this); @@ -7783,6 +7832,13 @@ sub getDump() $CppMode{$Version} = 1; $Detected = "$1$2$3$4" if(not defined $Detected); } + if($Content=~s/(struct |extern )(template) /$1c99_$2 /g) + { # MATCH: + # struct template {...}; + # extern template foo(...); + $CppMode{$Version} = 1; + $Detected = "$1$2" if(not defined $Detected); + } if($CppMode{$Version} == 1) { @@ -7794,33 +7850,122 @@ sub getDump() } # remove typedef enum NAME NAME; - my @FwdTypedefs = $MContent=~/typedef\s+enum\s+(\w+)\s+(\w+);/g; + my @FwdTypedefs = $Content=~/typedef\s+enum\s+(\w+)\s+(\w+);/g; my $N = 0; while($N<=$#FwdTypedefs-1) { my $S = $FwdTypedefs[$N]; if($S eq $FwdTypedefs[$N+1]) { - $MContent=~s/typedef\s+enum\s+\Q$S\E\s+\Q$S\E;//g; + $Content=~s/typedef\s+enum\s+\Q$S\E\s+\Q$S\E;//g; $CppMode{$Version}=1; } $N+=2; } - if($CppMode{$Version}==1) - { # try to change C++ "keyword" to "c99_keyword" + if($CppMode{$Version}==1) { printMsg("INFO", "Using C++ compatibility mode"); - $MHeaderPath = $TMP_DIR."/dump$Version.i"; } } + if($CppMode{$Version}==1 or $MinGWMode{$Version}==1) - { # compile the corrected preprocessor output - writeFile($MHeaderPath, $MContent); + { + my $IPath = $TMP_DIR."/dump$Version.i"; + writeFile($IPath, $Content); + return $IPath; + } + + return undef; +} + +sub getDump() +{ + if(not $GCC_PATH) { + exitStatus("Error", "internal error - GCC path is not set"); + } + + my @Headers = keys(%{$Registered_Headers{$Version}}); + @Headers = sort {int($Registered_Headers{$Version}{$a}{"Pos"})<=>int($Registered_Headers{$Version}{$b}{"Pos"})} @Headers; + + my $IncludeString = getIncString(getIncPaths(@{$Include_Preamble{$Version}}, @Headers), "GCC"); + + my $TmpHeaderPath = $TMP_DIR."/dump".$Version.".h"; + my $HeaderPath = $TmpHeaderPath; + + # write tmp-header + open(TMP_HEADER, ">", $TmpHeaderPath) || die ("can't open file \'$TmpHeaderPath\': $!\n"); + if(my $AddDefines = $Descriptor{$Version}{"Defines"}) + { + $AddDefines=~s/\n\s+/\n /g; + print TMP_HEADER "\n // add defines\n ".$AddDefines."\n"; + } + print TMP_HEADER "\n // add includes\n"; + foreach my $HPath (@{$Include_Preamble{$Version}}) { + print TMP_HEADER " #include \"".path_format($HPath, "unix")."\"\n"; + } + foreach my $HPath (@Headers) + { + if(not grep {$HPath eq $_} (@{$Include_Preamble{$Version}})) { + print TMP_HEADER " #include \"".path_format($HPath, "unix")."\"\n"; + } + } + close(TMP_HEADER); + + if($ExtraInfo) + { # extra information for other tools + if($IncludeString) { + writeFile($ExtraInfo."/include-string", $IncludeString); + } + writeFile($ExtraInfo."/recursive-includes", Dumper($RecursiveIncludes{$Version})); + writeFile($ExtraInfo."/direct-includes", Dumper($Header_Includes{$Version})); + + if(my @Redirects = keys(%{$Header_ErrorRedirect{$Version}})) + { + my $REDIR = ""; + foreach my $P1 (sort @Redirects) { + $REDIR .= $P1.";".$Header_ErrorRedirect{$Version}{$P1}."\n"; + } + writeFile($ExtraInfo."/include-redirect", $REDIR); + } + } + + if(not keys(%{$TargetHeaders{$Version}})) + { # Target headers + addTargetHeaders($Version); } # clean memory - undef $MContent; + %RecursiveIncludes = (); + %Header_Include_Prefix = (); + %Header_Includes = (); + + # clean cache + delete($Cache{"identifyHeader"}); + delete($Cache{"detect_header_includes"}); + delete($Cache{"selectSystemHeader"}); + + # preprocessing stage + my $Pre = callPreprocessor($TmpHeaderPath, $IncludeString, $Version); + checkPreprocessedUnit($Pre); + + if($ExtraInfo) + { # extra information for other tools + writeFile($ExtraInfo."/header-paths", join("\n", sort keys(%{$PreprocessedHeaders{$Version}}))); + } + + # clean memory + delete($Include_Neighbors{$Version}); + delete($PreprocessedHeaders{$Version}); + + if($COMMON_LANGUAGE{$Version} eq "C++") { + checkCTags($Pre); + } + + if(my $PrePath = preChange($TmpHeaderPath, $IncludeString)) + { # try to correct the preprocessor output + $HeaderPath = $PrePath; + } if($COMMON_LANGUAGE{$Version} eq "C++") { # add classes and namespaces to the dump @@ -7829,7 +7974,7 @@ sub getDump() or $MinGWMode{$Version}==1) { $CHdump .= " -fpreprocessed"; } - my $ClassHierarchyCmd = getCompileCmd($MHeaderPath, $CHdump, $IncludeString); + my $ClassHierarchyCmd = getCompileCmd($HeaderPath, $CHdump, $IncludeString); chdir($TMP_DIR); system($ClassHierarchyCmd." >null 2>&1"); chdir($ORIG_DIR); @@ -7876,7 +8021,7 @@ sub getDump() # add namespaces and classes if(my $NS_Add = get_namespace_additions($TUnit_NameSpaces{$Version})) { # GCC on all supported platforms does not include namespaces to the dump by default - appendFile($MHeaderPath, "\n // add namespaces\n".$NS_Add); + appendFile($HeaderPath, "\n // add namespaces\n".$NS_Add); } # some GCC versions don't include class methods to the TU dump by default my ($AddClass, $ClassNum) = ("", 0); @@ -7914,7 +8059,7 @@ sub getDump() $AddClass .= " $CName* tmp_add_class_".($ClassNum++).";\n"; } if($AddClass) { - appendFile($MHeaderPath, "\n // add classes\n".$AddClass); + appendFile($HeaderPath, "\n // add classes\n".$AddClass); } } writeLog($Version, "Temporary header file \'$TmpHeaderPath\' with the following content will be compiled to create GCC translation unit dump:\n".readFile($TmpHeaderPath)."\n"); @@ -7924,7 +8069,7 @@ sub getDump() or $MinGWMode{$Version}==1) { $TUdump .= " -fpreprocessed"; } - my $SyntaxTreeCmd = getCompileCmd($MHeaderPath, $TUdump, $IncludeString); + my $SyntaxTreeCmd = getCompileCmd($HeaderPath, $TUdump, $IncludeString); writeLog($Version, "The GCC parameters:\n $SyntaxTreeCmd\n\n"); chdir($TMP_DIR); system($SyntaxTreeCmd." >\"$TMP_DIR/tu_errors\" 2>&1"); @@ -7998,7 +8143,7 @@ sub getDump() } chdir($ORIG_DIR); unlink($TmpHeaderPath); - unlink($MHeaderPath); + unlink($HeaderPath); if(my @TUs = cmd_find($TMP_DIR,"f","*.tu",1)) { return $TUs[0]; @@ -8127,11 +8272,14 @@ sub cmd_find($;$$$$) } my @Files = split(/\n/, `$Cmd 2>\"$TMP_DIR/null\"`); if($Name) - { # FIXME: how to search file names in MS shell? - if(not $UseRegex) { + { + if(not $UseRegex) + { # FIXME: how to search file names in MS shell? + # wildcard to regexp $Name=~s/\*/.*/g; + $Name='\A'.$Name.'\Z'; } - @Files = grep { /\A$Name\Z/i } @Files; + @Files = grep { /$Name/i } @Files; } my @AbsPaths = (); foreach my $File (@Files) @@ -8174,13 +8322,13 @@ sub cmd_find($;$$$$) $Cmd .= " -name \"$Name\""; } my $Res = `$Cmd 2>\"$TMP_DIR/null\"`; - if($?) { + if($? and $!) { printMsg("ERROR", "problem with \'find\' utility ($?): $!"); } my @Files = split(/\n/, $Res); if($Name and $UseRegex) { # regex - @Files = grep { /\A$Name\Z/ } @Files; + @Files = grep { /$Name/ } @Files; } return @Files; } @@ -8876,6 +9024,12 @@ sub selectSymbol($$$$) if(my $Header = $SInfo->{"Header"}) { $Target = (is_target_header($Header, 1) or is_target_header($Header, 2)); } + if($ExtendedCheck) + { + if(index($Symbol,"external_func_")==0) { + $Target = 1; + } + } if($CheckHeadersOnly) { if($Target) @@ -9125,11 +9279,13 @@ sub selfTypedef($$) sub addExtension($) { my $LibVersion = $_[0]; - foreach my $Tid (keys(%{$TypeInfo{$LibVersion}})) + foreach my $Tid (sort {int($a)<=>int($b)} keys(%{$TypeInfo{$LibVersion}})) { if(selectType($Tid, $LibVersion)) { - my $Symbol = "external_func_".$TypeInfo{$LibVersion}{$Tid}{"Name"}; + my $TName = $TypeInfo{$LibVersion}{$Tid}{"Name"}; + $TName=~s/\A(struct|union|class|enum) //; + my $Symbol = "external_func_".$TName; %{$CompleteSignature{$LibVersion}{$Symbol}} = ( "Header" => "extended.h", @@ -9138,14 +9294,14 @@ sub addExtension($) "Param" => { 0 => { "type"=>$Tid, "name"=>"p1" } } ); - $ExtendedSymbols{$Symbol}=1; - $CheckedSymbols{"Binary"}{$Symbol}=1; - $CheckedSymbols{"Source"}{$Symbol}=1; + $ExtendedSymbols{$Symbol} = 1; + $CheckedSymbols{"Binary"}{$Symbol} = 1; + $CheckedSymbols{"Source"}{$Symbol} = 1; } } - $ExtendedSymbols{"external_func_0"}=1; - $CheckedSymbols{"Binary"}{"external_func_0"}=1; - $CheckedSymbols{"Source"}{"external_func_0"}=1; + $ExtendedSymbols{"external_func_0"} = 1; + $CheckedSymbols{"Binary"}{"external_func_0"} = 1; + $CheckedSymbols{"Source"}{"external_func_0"} = 1; } sub findMethod($$$) @@ -10358,9 +10514,9 @@ sub getProblemSeverity($$) return $CompatRules{$Level}{$Kind}{"Severity"}; } -sub isRecurType($$) +sub isRecurType($$$) { - foreach (@RecurTypes) + foreach (@{$_[2]}) { if( $_->{"T1"} eq $_[0] and $_->{"T2"} eq $_[1] ) @@ -10371,13 +10527,13 @@ sub isRecurType($$) return 0; } -sub pushType($$) +sub pushType($$$) { - my %TypeIDs=( - "T1" => $_[0], #Tid1 - "T2" => $_[1] #Tid2 + my %IDs = ( + "T1" => $_[0], + "T2" => $_[1] ); - push(@RecurTypes, \%TypeIDs); + push(@{$_[2]}, \%IDs); } sub isRenamed($$$$$) @@ -10498,7 +10654,7 @@ sub mergeTypes($$$) { # including a case when "class Class { ... };" changed to "class Class;" return (); } - if(isRecurType($Type1_Pure{"Tid"}, $Type2_Pure{"Tid"})) + if(isRecurType($Type1_Pure{"Tid"}, $Type2_Pure{"Tid"}, \@RecurTypes)) { # skip recursive declarations return (); } @@ -10540,11 +10696,25 @@ sub mergeTypes($$$) "Old_Size"=>$Type1{"Size"}*$BYTE_SIZE, "New_Size"=>$Type2{"Size"}*$BYTE_SIZE ); } - %{$SubProblems{"Typedef_BaseType"}{$Typedef_1{"Name"}}}=( - "Target"=>$Typedef_1{"Name"}, - "Type_Name"=>$Typedef_1{"Name"}, - "Old_Value"=>$Base_1{"Name"}, - "New_Value"=>$Base_2{"Name"} ); + my %Base1_Pure = get_PureType($Base_1{"Tid"}, $TypeInfo{1}); + my %Base2_Pure = get_PureType($Base_2{"Tid"}, $TypeInfo{2}); + if(diffTypes($Base1_Pure{"Tid"}, $Base2_Pure{"Tid"}, $Level)) + { + %{$SubProblems{"Typedef_BaseType_Format"}{$Typedef_1{"Name"}}}=( + "Target"=>$Typedef_1{"Name"}, + "Type_Name"=>$Typedef_1{"Name"}, + "Old_Value"=>$Base_1{"Name"}, + "New_Value"=>$Base_2{"Name"} ); + } + else + { + %{$SubProblems{"Typedef_BaseType"}{$Typedef_1{"Name"}}}=( + "Target"=>$Typedef_1{"Name"}, + "Type_Name"=>$Typedef_1{"Name"}, + "Old_Value"=>$Base_1{"Name"}, + "New_Value"=>$Base_2{"Name"} ); + } + } } if(nonComparable(\%Type1_Pure, \%Type2_Pure)) @@ -10573,7 +10743,7 @@ sub mergeTypes($$$) %{$Cache{"mergeTypes"}{$Level}{$Type1_Id}{$Type2_Id}} = %SubProblems; return %SubProblems; } - pushType($Type1_Pure{"Tid"}, $Type2_Pure{"Tid"}); + pushType($Type1_Pure{"Tid"}, $Type2_Pure{"Tid"}, \@RecurTypes); if(($Type1_Pure{"Name"} eq $Type2_Pure{"Name"} or (isAnon($Type1_Pure{"Name"}) and isAnon($Type2_Pure{"Name"}))) and $Type1_Pure{"Type"}=~/\A(Struct|Class|Union)\Z/) @@ -10782,6 +10952,14 @@ sub mergeTypes($$$) next if(not $Member_Name); if(my $RenamedTo = $RenamedField{$Member_Pos}) { # renamed + if(defined $Constants{2}{$Member_Name}) + { + if($Constants{2}{$Member_Name}{"Value"} eq $RenamedTo) + { # define OLD NEW + next; # Safe + } + } + if($Type2_Pure{"Type"}=~/\A(Struct|Class|Union)\Z/) { if(isPublic(\%Type1_Pure, $Member_Pos)) @@ -11536,7 +11714,7 @@ sub mergeImpl() $Diff=~s/\n\@\@/\n \n\@\@/g; unlink("$TMP_DIR/impl1"); unlink("$TMP_DIR/impl2"); - %{$ImplProblems{$Interface}}=( + %{$CompatProblems_Impl{$Interface}}=( "Diff" => get_CodeView($Diff) ); } } @@ -12046,7 +12224,7 @@ sub getSymKind($$) return "Function"; } -sub mergeSignatures($) +sub mergeSymbols($) { my $Level = $_[0]; my %SubProblems = (); @@ -13252,11 +13430,30 @@ sub getTypeIdByName($$) return $TName_Tid{$Version}{formatName($TypeName, "T")}; } -sub checkFormatChange($$$) +sub diffTypes($$$) +{ + if(defined $Cache{"diffTypes"}{$_[2]}{$_[0]}{$_[1]}) { + return $Cache{"diffTypes"}{$_[2]}{$_[0]}{$_[1]}; + } + if(isRecurType($_[0], $_[1], \@RecurTypes_Diff)) + { # skip recursive declarations + return 0; + } + + pushType($_[0], $_[1], \@RecurTypes_Diff); + my $Diff = diffTypes_I(@_); + pop(@RecurTypes_Diff); + + return ($Cache{"diffTypes"}{$_[2]}{$_[0]}{$_[1]} = $Diff); +} + +sub diffTypes_I($$$) { my ($Type1_Id, $Type2_Id, $Level) = @_; + my %Type1_Pure = get_PureType($Type1_Id, $TypeInfo{1}); my %Type2_Pure = get_PureType($Type2_Id, $TypeInfo{2}); + if($Type1_Pure{"Name"} eq $Type2_Pure{"Name"}) { # equal types return 0; @@ -13270,6 +13467,7 @@ sub checkFormatChange($$$) { # compared in detectTypeChange() return 0; } + my %FloatType = map {$_=>1} ( "float", "double", @@ -13336,19 +13534,7 @@ sub checkFormatChange($$$) else { foreach my $Pos (@Membs1) - { # compare elements by type name - my $MT1 = $TypeInfo{1}{$Type1_Pure{"Memb"}{$Pos}{"type"}}{"Name"}; - my $MT2 = $TypeInfo{2}{$Type2_Pure{"Memb"}{$Pos}{"type"}}{"Name"}; - - $MT1 = uncover_typedefs($MT1, 1); - $MT2 = uncover_typedefs($MT2, 2); - - if($MT1 ne $MT2) - { # different types - if(not isAnon($MT1) and not isAnon($MT2)) { - return 1; - } - } + { if($Level eq "Source") { if($Type1_Pure{"Memb"}{$Pos}{"name"} ne $Type2_Pure{"Memb"}{$Pos}{"name"}) @@ -13356,9 +13542,37 @@ sub checkFormatChange($$$) return 1; } } + + my %MT1 = %{$TypeInfo{1}{$Type1_Pure{"Memb"}{$Pos}{"type"}}}; + my %MT2 = %{$TypeInfo{2}{$Type2_Pure{"Memb"}{$Pos}{"type"}}}; + + if($MT1{"Name"} ne $MT2{"Name"} + or isAnon($MT1{"Name"}) or isAnon($MT2{"Name"})) + { + my $PL1 = get_PLevel($MT1{"Tid"}, 1); + my $PL2 = get_PLevel($MT2{"Tid"}, 2); + + if($PL1 ne $PL2) + { # different pointer level + return 1; + } + + # compare base types + my %BT1 = get_BaseType($MT1{"Tid"}, 1); + my %BT2 = get_BaseType($MT2{"Tid"}, 2); + + if(diffTypes($BT1{"Tid"}, $BT2{"Tid"}, $Level)) + { # different types + return 1; + } + } } } } + else + { + # TODO: arrays, etc. + } } return 0; } @@ -13406,8 +13620,8 @@ sub detectTypeChange($$$$) if($Type1_Base{"Name"}!~/anon\-/ and $Type2_Base{"Name"}!~/anon\-/) { if($Level eq "Binary" - and $Type1_Base{"Size"} ne $Type2_Base{"Size"} - and $Type1_Base{"Size"} and $Type2_Base{"Size"}) + and $Type1_Base{"Size"} and $Type2_Base{"Size"} + and $Type1_Base{"Size"} ne $Type2_Base{"Size"}) { %{$LocalProblems{$Prefix."_BaseType_And_Size"}}=( "Old_Value"=>$Type1_Base{"Name"}, @@ -13418,7 +13632,7 @@ sub detectTypeChange($$$$) } else { - if(checkFormatChange($Type1_Base{"Tid"}, $Type2_Base{"Tid"}, $Level)) + if(diffTypes($Type1_Base{"Tid"}, $Type2_Base{"Tid"}, $Level)) { # format change %{$LocalProblems{$Prefix."_BaseType_Format"}}=( "Old_Value"=>$Type1_Base{"Name"}, @@ -13474,7 +13688,7 @@ sub detectTypeChange($$$$) } else { - if(checkFormatChange($Type1_Id, $Type2_Id, $Level)) + if(diffTypes($Type1_Id, $Type2_Id, $Level)) { # format change %{$LocalProblems{$Prefix."_Type_Format"}}=( "Old_Value"=>$Type1{"Name"}, @@ -13557,14 +13771,16 @@ sub tNameLock($$) $Changed = 1; } } + + my $TN1 = $TypeInfo{1}{$Tid1}{"Name"}; + my $TN2 = $TypeInfo{2}{$Tid2}{"Name"}; + if($Changed) { # different formats if($UseOldDumps) { # old dumps return 0; } - my $TN1 = $TypeInfo{1}{$Tid1}{"Name"}; - my $TN2 = $TypeInfo{2}{$Tid2}{"Name"}; my $TT1 = $TypeInfo{1}{$Tid1}{"Type"}; my $TT2 = $TypeInfo{2}{$Tid2}{"Type"}; @@ -13611,6 +13827,23 @@ sub tNameLock($$) } } } + else + { + # typedef struct {...} type_t + # typedef struct type_t {...} type_t + if(index($TN1, " ".$TN2)!=-1) + { + if($TN1=~/\A(struct|union|enum) \Q$TN2\E\Z/) { + return 0; + } + } + if(index($TN2, " ".$TN1)!=-1) + { + if($TN2=~/\A(struct|union|enum) \Q$TN1\E\Z/) { + return 0; + } + } + } return 1; } @@ -13658,9 +13891,10 @@ sub htmlSpecChars($) $Str=~s/</</g; $Str=~s/\-\>/->/g; # − $Str=~s/>/>/g; - $Str=~s/([^ ])( )([^ ])/$1\@ALONE_SP\@$3/g; + $Str=~s/([^ ]) ([^ ])/$1\@SP\@$2/g; + $Str=~s/([^ ]) ([^ ])/$1\@SP\@$2/g; $Str=~s/ / /g; # - $Str=~s/\@ALONE_SP\@/ /g; + $Str=~s/\@SP\@/ /g; $Str=~s/\n/<br\/>/g; $Str=~s/\"/"/g; $Str=~s/\'/'/g; @@ -13753,7 +13987,7 @@ sub highLight_Signature_PPos_Italic($$$$$) if(not $SCenter) { # global data $Signature = htmlSpecChars($Signature); - $Signature=~s!(\[data\])!<span style='color:Black;font-weight:normal;'>$1</span>!g; + $Signature=~s!(\[data\])!<span class='attr'>$1</span>!g; $Signature .= (($SymbolVersion)?"<span class='sym_ver'> $VersionSpec $SymbolVersion</span>":""); if($Return and $ShowReturn) { $Signature .= "<span class='sym_p nowrap'>  <b>:</b>  ".htmlSpecChars($Return)."</span>"; @@ -13777,7 +14011,8 @@ sub highLight_Signature_PPos_Italic($$$$$) elsif($Part=~/(\w+)[\,\)]*\Z/i) { $ParamName = $1; } - if(not $ParamName) { + if(not $ParamName) + { push(@Parts, $Part_Styled); next; } @@ -13819,8 +14054,11 @@ sub highLight_Signature_PPos_Italic($$$$$) } $Signature=~s!\[\]![ ]!g; $Signature=~s!operator=!operator =!g; - $Signature=~s!(\[in-charge\]|\[not-in-charge\]|\[in-charge-deleting\]|\[static\])!<span class='sym_kind'>$1</span>!g; - return $Signature.(($SymbolVersion)?"<span class='sym_ver'> $VersionSpec $SymbolVersion</span>":""); + $Signature=~s!(\[in-charge\]|\[not-in-charge\]|\[in-charge-deleting\]|\[static\])!<span class='attr'>$1</span>!g; + if($SymbolVersion) { + $Signature .= "<span class='sym_ver'> $VersionSpec $SymbolVersion</span>"; + } + return $Signature; } sub split_Signature($) @@ -14193,7 +14431,7 @@ sub get_Summary($) { my $Level = $_[0]; my ($Added, $Removed, $I_Problems_High, $I_Problems_Medium, $I_Problems_Low, $T_Problems_High, - $C_Problems_Low, $T_Problems_Medium, $T_Problems_Low, $I_Other, $T_Other) = (0,0,0,0,0,0,0,0,0,0,0); + $C_Problems_Low, $T_Problems_Medium, $T_Problems_Low, $I_Other, $T_Other, $C_Other) = (0,0,0,0,0,0,0,0,0,0,0,0); %{$RESULT{$Level}} = ( "Problems"=>0, "Warnings"=>0, @@ -14214,6 +14452,21 @@ sub get_Summary($) } } } + foreach my $Constant (sort keys(%{$CompatProblems_Constants{$Level}})) + { + foreach my $Kind (keys(%{$CompatProblems_Constants{$Level}{$Constant}})) + { + if(not defined $CompatRules{$Level}{$Kind}) + { # unknown rule + if(not $UnknownRules{$Level}{$Kind}) + { # only one warning + printMsg("WARNING", "unknown rule \"$Kind\" (\"$Level\")"); + $UnknownRules{$Level}{$Kind}=1; + } + delete($CompatProblems_Constants{$Level}{$Constant}{$Kind}); + } + } + } foreach my $Interface (sort keys(%{$CompatProblems{$Level}})) { foreach my $Kind (sort keys(%{$CompatProblems{$Level}{$Interface}})) @@ -14328,30 +14581,38 @@ sub get_Summary($) $RESULT{$Level}{"Warnings"} += $T_Problems_Low + $I_Problems_Low; } - if($C_Problems_Low = keys(%{$ProblemsWithConstants{$Level}})) + foreach my $Constant (keys(%{$CompatProblems_Constants{$Level}})) { - if(defined $CompatRules{$Level}{"Changed_Constant"}) + foreach my $Kind (keys(%{$CompatProblems_Constants{$Level}{$Constant}})) { - if($StrictCompat) { - $RESULT{$Level}{"Problems"} += $C_Problems_Low; + my $Severity = getProblemSeverity($Level, $Kind); + if($Severity eq "Safe") + { + $C_Other+=1; } - else { - $RESULT{$Level}{"Warnings"} += $C_Problems_Low; + elsif($Severity eq "Low") + { + $C_Problems_Low+=1; } } - else - { - printMsg("WARNING", "unknown rule \"Changed_Constant\" (\"$Level\")"); - $C_Problems_Low = 0; + } + + if($C_Problems_Low) + { + if($StrictCompat) { + $RESULT{$Level}{"Problems"} += $C_Problems_Low; + } + else { + $RESULT{$Level}{"Warnings"} += $C_Problems_Low; } } if($CheckImpl and $Level eq "Binary") { if($StrictCompat) { - $RESULT{$Level}{"Problems"} += keys(%ImplProblems); + $RESULT{$Level}{"Problems"} += keys(%CompatProblems_Impl); } else { - $RESULT{$Level}{"Warnings"} += keys(%ImplProblems); + $RESULT{$Level}{"Warnings"} += keys(%CompatProblems_Impl); } } if($RESULT{$Level}{"Problems"} @@ -14439,7 +14700,7 @@ sub get_Summary($) if($CheckImpl and $Level eq "Binary") { $Problem_Summary .= " <impl>\n"; - $Problem_Summary .= " <low>".keys(%ImplProblems)."</low>\n"; + $Problem_Summary .= " <low>".keys(%CompatProblems_Impl)."</low>\n"; $Problem_Summary .= " </impl>\n"; } $Problem_Summary = "<problem_summary>\n".$Problem_Summary."</problem_summary>\n\n"; @@ -14605,14 +14866,8 @@ sub get_Summary($) $Problem_Summary .= "<tr><td>Low</td><td".getStyle("I", "L", $I_Problems_Low).">$IL_Link</td></tr>\n"; my $ChangedConstants_Link = "0"; - if(keys(%{$CheckedSymbols{$Level}}) and $C_Problems_Low) - { - if($JoinReport) { - $ChangedConstants_Link = "<a href='#".$Level."_Changed_Constants' style='color:Blue;'>$C_Problems_Low</a>"; - } - else { - $ChangedConstants_Link = "<a href='#Changed_Constants' style='color:Blue;'>$C_Problems_Low</a>"; - } + if(keys(%{$CheckedSymbols{$Level}}) and $C_Problems_Low) { + $ChangedConstants_Link = "<a href='#".get_Anchor("Constant", $Level, "Low")."' style='color:Blue;'>$C_Problems_Low</a>"; } $ChangedConstants_Link = "n/a" if($CheckObjectsOnly); $META_DATA .= "changed_constants:$C_Problems_Low;"; @@ -14621,10 +14876,10 @@ sub get_Summary($) if($CheckImpl and $Level eq "Binary") { my $ChangedImpl_Link = "0"; - $ChangedImpl_Link = "<a href='#Changed_Implementation' style='color:Blue;'>".keys(%ImplProblems)."</a>" if(keys(%ImplProblems)>0); + $ChangedImpl_Link = "<a href='#Changed_Implementation' style='color:Blue;'>".keys(%CompatProblems_Impl)."</a>" if(keys(%CompatProblems_Impl)>0); $ChangedImpl_Link = "n/a" if($CheckHeadersOnly); - $META_DATA .= "changed_implementation:".keys(%ImplProblems).";"; - $Problem_Summary .= "<tr><th>Problems with<br/>Implementation</th><td>Low</td><td".getStyle("Imp", "L", int(keys(%ImplProblems))).">$ChangedImpl_Link</td></tr>\n"; + $META_DATA .= "changed_implementation:".keys(%CompatProblems_Impl).";"; + $Problem_Summary .= "<tr><th>Problems with<br/>Implementation</th><td>Low</td><td".getStyle("Imp", "L", int(keys(%CompatProblems_Impl))).">$ChangedImpl_Link</td></tr>\n"; } # Safe Changes if($T_Other and not $CheckObjectsOnly) @@ -14639,6 +14894,12 @@ sub get_Summary($) $Problem_Summary .= "<tr><th>Other Changes<br/>in Symbols</th><td>-</td><td".getStyle("I", "S", $I_Other).">$IS_Link</td></tr>\n"; } + if($C_Other and not $CheckObjectsOnly) + { + my $CS_Link = "<a href='#".get_Anchor("Constant", $Level, "Safe")."' style='color:Blue;'>$C_Other</a>"; + $Problem_Summary .= "<tr><th>Other Changes<br/>in Constants</th><td>-</td><td".getStyle("C", "S", $C_Other).">$CS_Link</td></tr>\n"; + } + $META_DATA .= "tool_version:$TOOL_VERSION"; $Problem_Summary .= "</table>\n"; # $TestInfo = getLegend().$TestInfo; @@ -14712,18 +14973,32 @@ sub cut_off_number($$$) return $num; } -sub get_Report_ChangedConstants($) +sub get_Report_ChangedConstants($$) { - my $Level = $_[0]; + my ($TargetSeverity, $Level) = @_; my $CHANGED_CONSTANTS = ""; + my %ReportMap = (); - foreach my $Constant (keys(%{$ProblemsWithConstants{$Level}})) { - $ReportMap{$Constants{1}{$Constant}{"Header"}}{$Constant} = 1; - } - my $Kind = "Changed_Constant"; - if(not defined $CompatRules{$Level}{$Kind}) { - return ""; + foreach my $Constant (keys(%{$CompatProblems_Constants{$Level}})) + { + my $Header = $Constants{1}{$Constant}{"Header"}; + if(not $Header) + { # added + $Header = $Constants{2}{$Constant}{"Header"} + } + + foreach my $Kind (sort {lc($a) cmp lc($b)} keys(%{$CompatProblems_Constants{$Level}{$Constant}})) + { + if(not defined $CompatRules{$Level}{$Kind}) { + next; + } + if($TargetSeverity ne getProblemSeverity($Level, $Kind)) { + next; + } + $ReportMap{$Header}{$Constant}{$Kind} = 1; + } } + if($ReportFormat eq "xml") { # XML foreach my $HeaderName (sort {lc($a) cmp lc($b)} keys(%ReportMap)) @@ -14732,14 +15007,17 @@ sub get_Report_ChangedConstants($) foreach my $Constant (sort {lc($a) cmp lc($b)} keys(%{$ReportMap{$HeaderName}})) { $CHANGED_CONSTANTS .= " <constant name=\"$Constant\">\n"; - my $Change = $CompatRules{$Level}{$Kind}{"Change"}; - my $Effect = $CompatRules{$Level}{$Kind}{"Effect"}; - my $Overcome = $CompatRules{$Level}{$Kind}{"Overcome"}; - $CHANGED_CONSTANTS .= " <problem id=\"$Kind\">\n"; - $CHANGED_CONSTANTS .= " <change".getXmlParams($Change, $ProblemsWithConstants{$Level}{$Constant}).">$Change</change>\n"; - $CHANGED_CONSTANTS .= " <effect".getXmlParams($Effect, $ProblemsWithConstants{$Level}{$Constant}).">$Effect</effect>\n"; - $CHANGED_CONSTANTS .= " <overcome".getXmlParams($Overcome, $ProblemsWithConstants{$Level}{$Constant}).">$Overcome</overcome>\n"; - $CHANGED_CONSTANTS .= " </problem>\n"; + foreach my $Kind (sort {lc($a) cmp lc($b)} keys(%{$ReportMap{$HeaderName}{$Constant}})) + { + my $Change = $CompatRules{$Level}{$Kind}{"Change"}; + my $Effect = $CompatRules{$Level}{$Kind}{"Effect"}; + my $Overcome = $CompatRules{$Level}{$Kind}{"Overcome"}; + $CHANGED_CONSTANTS .= " <problem id=\"$Kind\">\n"; + $CHANGED_CONSTANTS .= " <change".getXmlParams($Change, $CompatProblems_Constants{$Level}{$Constant}{$Kind}).">$Change</change>\n"; + $CHANGED_CONSTANTS .= " <effect".getXmlParams($Effect, $CompatProblems_Constants{$Level}{$Constant}{$Kind}).">$Effect</effect>\n"; + $CHANGED_CONSTANTS .= " <overcome".getXmlParams($Overcome, $CompatProblems_Constants{$Level}{$Constant}{$Kind}).">$Overcome</overcome>\n"; + $CHANGED_CONSTANTS .= " </problem>\n"; + } $CHANGED_CONSTANTS .= " </constant>\n"; } $CHANGED_CONSTANTS .= " </header>\n"; @@ -14752,25 +15030,35 @@ sub get_Report_ChangedConstants($) foreach my $HeaderName (sort {lc($a) cmp lc($b)} keys(%ReportMap)) { $CHANGED_CONSTANTS .= "<span class='h_name'>$HeaderName</span><br/>\n"; - foreach my $Name (sort {lc($a) cmp lc($b)} keys(%{$ReportMap{$HeaderName}})) + foreach my $Constant (sort {lc($a) cmp lc($b)} keys(%{$ReportMap{$HeaderName}})) { - $Number += 1; - my $Change = applyMacroses($Level, $Kind, $CompatRules{$Level}{$Kind}{"Change"}, $ProblemsWithConstants{$Level}{$Name}); - my $Effect = $CompatRules{$Level}{$Kind}{"Effect"}; - my $Report = "<tr><th>1</th><td align='left' valign='top'>".$Change."</td><td align='left' valign='top'>$Effect</td></tr>\n"; - $Report = $ContentDivStart."<table class='ptable'><tr><th width='2%'></th><th width='47%'>Change</th><th>Effect</th></tr>".$Report."</table><br/>$ContentDivEnd\n"; - $Report = $ContentSpanStart."<span class='extendable'>[+]</span> ".$Name.$ContentSpanEnd."<br/>\n".$Report; - $CHANGED_CONSTANTS .= insertIDs($Report); + my $Report = ""; + + foreach my $Kind (sort {lc($a) cmp lc($b)} keys(%{$ReportMap{$HeaderName}{$Constant}})) + { + my $Change = applyMacroses($Level, $Kind, $CompatRules{$Level}{$Kind}{"Change"}, $CompatProblems_Constants{$Level}{$Constant}{$Kind}); + my $Effect = $CompatRules{$Level}{$Kind}{"Effect"}; + $Report .= "<tr><th>1</th><td align='left' valign='top'>".$Change."</td><td align='left' valign='top'>$Effect</td></tr>\n"; + $Number += 1; + } + if($Report) + { + $Report = $ContentDivStart."<table class='ptable'><tr><th width='2%'></th><th width='47%'>Change</th><th>Effect</th></tr>".$Report."</table><br/>$ContentDivEnd\n"; + $Report = $ContentSpanStart."<span class='extendable'>[+]</span> ".$Constant.$ContentSpanEnd."<br/>\n".$Report; + $Report = insertIDs($Report); + } + $CHANGED_CONSTANTS .= $Report; } $CHANGED_CONSTANTS .= "<br/>\n"; } if($CHANGED_CONSTANTS) { - my $Anchor = "<a name='Changed_Constants'></a>"; - if($JoinReport) { - $Anchor = "<a name='".$Level."_Changed_Constants'></a>"; + my $Title = "Problems with Constants, $TargetSeverity Severity"; + if($TargetSeverity eq "Safe") + { # Safe Changes + $Title = "Other Changes in Constants"; } - $CHANGED_CONSTANTS = $Anchor."<h2>Problems with Constants ($Number)</h2><hr/>\n".$CHANGED_CONSTANTS.$TOP_REF."<br/>\n"; + $CHANGED_CONSTANTS = "<a name='".get_Anchor("Constant", $Level, $TargetSeverity)."'></a><h2>$Title ($Number)</h2><hr/>\n".$CHANGED_CONSTANTS.$TOP_REF."<br/>\n"; } } return $CHANGED_CONSTANTS; @@ -14780,7 +15068,7 @@ sub get_Report_Impl() { my $CHANGED_IMPLEMENTATION = ""; my %ReportMap = (); - foreach my $Interface (sort keys(%ImplProblems)) + foreach my $Interface (sort keys(%CompatProblems_Impl)) { my $HeaderName = $CompleteSignature{1}{$Interface}{"Header"}; my $DyLib = $Symbol_Library{1}{$Interface}; @@ -14806,7 +15094,7 @@ sub get_Report_Impl() if($NameSpace) { $Signature=~s/\b\Q$NameSpace\E::\b//g; } - $CHANGED_IMPLEMENTATION .= $ContentSpanStart.highLight_Signature_Italic_Color($Signature).$ContentSpanEnd."<br/>\n".$ContentDivStart."<span class='mangled'>[symbol: <b>$Interface</b>]</span>".$ImplProblems{$Interface}{"Diff"}."<br/><br/>".$ContentDivEnd."\n"; + $CHANGED_IMPLEMENTATION .= $ContentSpanStart.highLight_Signature_Italic_Color($Signature).$ContentSpanEnd."<br/>\n".$ContentDivStart."<span class='mangled'>[symbol: <b>$Interface</b>]</span>".$CompatProblems_Impl{$Interface}{"Diff"}."<br/><br/>".$ContentDivEnd."\n"; } $CHANGED_IMPLEMENTATION .= "<br/>\n"; } @@ -14819,7 +15107,7 @@ sub get_Report_Impl() } # clean memory - %ImplProblems = (); + %CompatProblems_Impl = (); return $CHANGED_IMPLEMENTATION; } @@ -15868,7 +16156,7 @@ sub getAffectDescription($$$$) } } if($ExtendedSymbols{$Symbol}) { - push(@Sentence, " This is a symbol from an artificial external library that may use the \'$TargetLibraryName\' library and change its ABI after recompiling."); + push(@Sentence, " This is a symbol from an external library that may use the \'$TargetLibraryName\' library and change the ABI after recompiling."); } return join(" ", @Sentence); } @@ -15885,8 +16173,9 @@ sub get_XmlSign($$) my $TypeName = $TypeInfo{$LibVersion}{$Type}{"Name"}; foreach my $Typedef (keys(%ChangedTypedef)) { - my $Base = $Typedef_BaseName{$LibVersion}{$Typedef}; - $TypeName=~s/\b\Q$Typedef\E\b/$Base/g; + if(my $Base = $Typedef_BaseName{$LibVersion}{$Typedef}) { + $TypeName=~s/\b\Q$Typedef\E\b/$Base/g; + } } $Report .= " <param pos=\"$Pos\">\n"; $Report .= " <name>".$Name."</name>\n"; @@ -16036,7 +16325,7 @@ sub openReport($) and $OSgroup ne "macos") { if($Cmd!~/lynx|links/) { - $Cmd .= " >\"$TMP_DIR/null\" 2>&1 &"; + $Cmd .= " >\"/dev/null\" 2>&1 &"; } } system($Cmd); @@ -16179,7 +16468,7 @@ sub get_Report_Problems($$) } if($Priority eq "Low") { - $Report .= get_Report_ChangedConstants($Level); + $Report .= get_Report_ChangedConstants("Low", $Level); if($ReportFormat eq "html") { if($CheckImpl and $Level eq "Binary") { @@ -16187,6 +16476,10 @@ sub get_Report_Problems($$) } } } + if($Priority eq "Safe") + { + $Report .= get_Report_ChangedConstants("Safe", $Level); + } if($ReportFormat eq "html") { if($Report) @@ -16427,6 +16720,52 @@ my %IgnoreConstant = map {$_=>1} ( "Version" ); +sub constantFilter($$$) +{ + my ($Name, $Value, $Level) = @_; + + if($Level eq "Binary") + { + foreach (keys(%IgnoreConstant)) + { + if($Name=~/(\A|_)$_(_|\Z)/) + { # version + return 1; + } + if(/\A[A-Z].*[a-z]\Z/) + { + if($Name=~/(\A|[a-z])$_([A-Z]|\Z)/) + { # version + return 1; + } + } + } + if($Name=~/(\A|_)(lib|open|)$TargetLibraryShortName(_|)(VERSION|VER|DATE|API|PREFIX)(_|\Z)/i) + { # version + return 1; + } + if($Value=~/\A('|"|)[\/\\]\w+([\/\\]|:|('|"|)\Z)/ or $Value=~/[\/\\]\w+[\/\\]\w+/) + { # /lib64:/usr/lib64:/lib:/usr/lib:/usr/X11R6/lib/Xaw3d ... + return 1; + } + if($Value=~/\A\(*[a-z_]+(\s+|\|)/i) + { # static int gcry_pth_init ( void) { return ... + # (RE_BACKSLASH_ESCAPE_IN_LISTS | RE... + return 1; + } + if($Value=~/\(/i and $Value!~/\A[\"\']/i) + { # foo(p) + return 1; + } + if($Value=~/\A[a-z]+\w*\Z/i) + { # asn1_node_st + return 1; + } + } + + return 0; +} + sub mergeConstants($) { my $Level = $_[0]; @@ -16436,64 +16775,48 @@ sub mergeConstants($) { # skipped by the user next; } - if(not defined $Constants{2}{$Constant}{"Value"} - or $Constants{2}{$Constant}{"Value"} eq "") - { # empty value - next; - } + my $Header = $Constants{1}{$Constant}{"Header"}; if(not is_target_header($Header, 1) and not is_target_header($Header, 2)) { # user-defined header next; } - my ($Old_Value, $New_Value, $Old_Value_Pure, $New_Value_Pure); - $Old_Value = $Old_Value_Pure = uncoverConstant(1, $Constant); - $New_Value = $New_Value_Pure = uncoverConstant(2, $Constant); + + my $Old_Value = uncoverConstant(1, $Constant); + + if(constantFilter($Constant, $Old_Value, $Level)) + { # separate binary and source problems + next; + } + + if(not defined $Constants{2}{$Constant}{"Value"}) + { # removed + %{$CompatProblems_Constants{$Level}{$Constant}{"Removed_Constant"}} = ( + "Target"=>$Constant, + "Old_Value"=>$Old_Value ); + next; + } + + if($Constants{2}{$Constant}{"Value"} eq "") + { # empty value + # TODO: implement a rule + next; + } + + my $New_Value = uncoverConstant(2, $Constant); + + my $Old_Value_Pure = $Old_Value; + my $New_Value_Pure = $New_Value; + $Old_Value_Pure=~s/(\W)\s+/$1/g; $Old_Value_Pure=~s/\s+(\W)/$1/g; $New_Value_Pure=~s/(\W)\s+/$1/g; $New_Value_Pure=~s/\s+(\W)/$1/g; + next if($New_Value_Pure eq "" or $Old_Value_Pure eq ""); if($New_Value_Pure ne $Old_Value_Pure) { # different values - if($Level eq "Binary") - { - foreach (keys(%IgnoreConstant)) - { - if($Constant=~/(\A|_)$_(_|\Z)/) - { # ignore library version - next; - } - if(/\A[A-Z].*[a-z]\Z/) - { - if($Constant=~/(\A|[a-z])$_([A-Z]|\Z)/) - { # ignore library version - next; - } - } - } - if($Constant=~/(\A|_)(lib|open|)$TargetLibraryShortName(_|)(VERSION|VER|DATE|API|PREFIX)(_|\Z)/i) - { # ignore library version - next; - } - if($Old_Value=~/\A('|"|)[\/\\]\w+([\/\\]|:|('|"|)\Z)/ or $Old_Value=~/[\/\\]\w+[\/\\]\w+/) - { # ignoring path defines: - # /lib64:/usr/lib64:/lib:/usr/lib:/usr/X11R6/lib/Xaw3d ... - next; - } - if($Old_Value=~/\A\(*[a-z_]+(\s+|\|)/i) - { # ignore source defines: - # static int gcry_pth_init ( void) { return ... - # (RE_BACKSLASH_ESCAPE_IN_LISTS | RE... - next; - } - if($Old_Value=~/\(/i and $Old_Value!~/\A[\"\']/i) - { # ignore source defines: - # foo(p) - next; - } - } if(convert_integer($Old_Value) eq convert_integer($New_Value)) { # 0x0001 and 0x1, 0x1 and 1 equal constants next; @@ -16506,12 +16829,44 @@ sub mergeConstants($) { # NULL => 0 next; } - %{$ProblemsWithConstants{$Level}{$Constant}} = ( + %{$CompatProblems_Constants{$Level}{$Constant}{"Changed_Constant"}} = ( "Target"=>$Constant, "Old_Value"=>$Old_Value, "New_Value"=>$New_Value ); } } + + foreach my $Constant (keys(%{$Constants{2}})) + { + if(not defined $Constants{1}{$Constant}{"Value"}) + { + if($SkipConstants{2}{$Constant}) + { # skipped by the user + next; + } + + my $Header = $Constants{2}{$Constant}{"Header"}; + if(not is_target_header($Header, 1) + and not is_target_header($Header, 2)) + { # user-defined header + next; + } + + my $New_Value = uncoverConstant(2, $Constant); + if(not defined $New_Value or $New_Value eq "") { + next; + } + + if(constantFilter($Constant, $New_Value, $Level)) + { # separate binary and source problems + next; + } + + %{$CompatProblems_Constants{$Level}{$Constant}{"Added_Constant"}} = ( + "Target"=>$Constant, + "New_Value"=>$New_Value ); + } + } } sub convert_integer($) @@ -16664,7 +17019,8 @@ my %Symbol_Lib_Map=( "move_panel" => "libpanel", "XOpenDisplay" => "libX11", "resize_term" => "libncurses", - "clock_gettime" => "librt" + "clock_gettime" => "librt", + "crypt" => "libcrypt" ); sub find_SymbolLibs($$) @@ -17557,7 +17913,7 @@ sub detectSystemHeaders() next if(not -d $DevelPath); # search for all header files in the /usr/include # with or without extension (ncurses.h, QtCore, ...) - @SysHeaders = (@SysHeaders, cmd_find($DevelPath,"f")); + push(@SysHeaders, cmd_find($DevelPath,"f")); foreach my $Link (cmd_find($DevelPath,"l")) { # add symbolic links if(-f $Link) { @@ -17568,14 +17924,13 @@ sub detectSystemHeaders() foreach my $DevelPath (@{$SystemPaths{"lib"}}) { # search for config headers in the /usr/lib next if(not -d $DevelPath); - foreach (cmd_find($DevelPath,"f")) + foreach (cmd_find($DevelPath,"f",'\.h(pp|xx)?\Z|\/include\/',"",1)) { - if(not /\/(gcc|jvm|syslinux|kbd|parrot|xemacs)/) - { - if(/\.h\Z|\/include\//) { - push(@SysHeaders, $_); - } + if(/\/(gcc|jvm|syslinux|kbd|parrot|xemacs)/) + { # skip useless headers + next; } + push(@SysHeaders, $_); } } get_prefixes_I(\@SysHeaders, \%SystemHeaders); @@ -17610,7 +17965,7 @@ sub getSOPaths($) return sort @Paths; } -sub skip_lib($$) +sub skipLib($$) { my ($Path, $LibVersion) = @_; return 1 if(not $Path or not $LibVersion); @@ -17640,16 +17995,122 @@ sub skip_lib($$) return 0; } +sub specificHeader($$) +{ + my ($Header, $Spec) = @_; + my $Name = get_filename($Header); + + if($Spec eq "windows") + {# MS Windows + return 1 if($Name=~/(\A|[._-])(win|wince|wnt)(\d\d|[._-]|\Z)/i); + return 1 if($Name=~/([._-]w|win)(32|64)/i); + return 1 if($Name=~/\A(Win|Windows)[A-Z]/); + return 1 if($Name=~/\A(w|win|windows)(32|64|\.)/i); + my @Dirs = ( + "win32", + "win64", + "win", + "windows", + "msvcrt" + ); # /gsf-win32/ + if(my $DIRs = join("|", @Dirs)) { + return 1 if($Header=~/[\/\\](|[^\/\\]+[._-])($DIRs)(|[._-][^\/\\]+)([\/\\]|\Z)/i); + } + } + elsif($Spec eq "macos") + { # Mac OS + return 1 if($Name=~/(\A|[_-])mac[._-]/i); + } + + return 0; +} + +sub skipAlienHeader($) +{ + my $Path = $_[0]; + my $Name = get_filename($Path); + my $Dir = get_dirname($Path); + + if($Tolerance=~/2/) + { # 2 - skip internal headers + my @Terms = ( + "p", + "priv", + "int", + "impl", + "implementation", + "internal", + "private", + "old", + "compat", + "debug", + "test", + "gen" + ); + + my @Dirs = ( + "private", + "priv", + "port", + "impl", + "internal", + "detail", + "details", + "old", + "compat", + "debug", + "config", + "compiler", + "platform", + "test" + ); + + if(my $TERMs = join("|", @Terms)) { + return 1 if($Name=~/(\A|[._-])($TERMs)([._-]|\Z)/i); + } + if(my $DIRs = join("|", @Dirs)) { + return 1 if($Dir=~/(\A|[\/\\])(|[^\/\\]+[._-])($DIRs)(|[._-][^\/\\]+)([\/\\]|\Z)/i); + } + + return 1 if($Name=~/[a-z](Imp|Impl|I|P)(\.|\Z)/); + } + + if($Tolerance=~/1/) + { # 1 - skip non-Linux headers + if($OSgroup ne "windows") + { + if(specificHeader($Path, "windows")) { + return 1; + } + } + if($OSgroup ne "macos") + { + if(specificHeader($Path, "macos")) { + return 1; + } + } + } + + # valid + return 0; +} + sub skipHeader($$) { my ($Path, $LibVersion) = @_; return 1 if(not $Path or not $LibVersion); - if(not keys(%{$SkipHeaders{$LibVersion}})) { - return 0; - } if(defined $Cache{"skipHeader"}{$Path}) { return $Cache{"skipHeader"}{$Path}; } + if(defined $Tolerance and $Tolerance=~/1|2/) + { # --tolerant + if(skipAlienHeader($Path)) { + return ($Cache{"skipHeader"}{$Path} = 1); + } + } + if(not keys(%{$SkipHeaders{$LibVersion}})) { + return 0; + } return ($Cache{"skipHeader"}{$Path} = skipHeader_I(@_)); } @@ -17683,6 +18144,7 @@ sub skipHeader_I($$) } } } + return 0; } @@ -17700,7 +18162,7 @@ sub registerObject_Dir($$) foreach my $Path (find_libs($Dir,"",1)) { next if(ignore_path($Path)); - next if(skip_lib($Path, $LibVersion)); + next if(skipLib($Path, $LibVersion)); registerObject($Path, $LibVersion); } $RegisteredObject_Dirs{$LibVersion}{$Dir} = 1; @@ -17751,7 +18213,7 @@ sub getSONAME($) sub getSOPaths_Dest($$) { my ($Dest, $LibVersion) = @_; - if(skip_lib($Dest, $LibVersion)) { + if(skipLib($Dest, $LibVersion)) { return (); } if(-f $Dest) @@ -17784,7 +18246,7 @@ sub getSOPaths_Dest($$) foreach my $Path (find_libs($Dest,"","")) { next if(ignore_path($Path)); - next if(skip_lib($Path, $LibVersion)); + next if(skipLib($Path, $LibVersion)); registerObject($Path, $LibVersion); $Libs{realpath($Path)}=1; } @@ -17793,7 +18255,7 @@ sub getSOPaths_Dest($$) foreach my $Path (cmd_find($Dest,"f")) { next if(ignore_path($Path)); - next if(skip_lib($Path, $LibVersion)); + next if(skipLib($Path, $LibVersion)); if(get_filename($Path)!~/\./ and cmd_file($Path)=~/(shared|dynamic)\s+library/i) { @@ -18235,7 +18697,8 @@ sub read_ABI_Dump($$) } } } - if($TInfo{"Type"} eq "Typedef" and defined $TInfo{"BaseType"}) + if($TInfo{"Type"} eq "Typedef" and not $TInfo{"Artificial"} + and defined $TInfo{"BaseType"}) { if(my $BTid = $TInfo{"BaseType"}{"Tid"}) { @@ -18246,7 +18709,7 @@ sub read_ABI_Dump($$) } if($TInfo{"Name"} eq $BName) { # typedef to "class Class" - # should not be registered in TName_Tid + # should not be registered in TName_Tid next; } if(not $Typedef_BaseName{$LibVersion}{$TInfo{"Name"}}) { @@ -18377,7 +18840,7 @@ sub find_libs($$$) { my ($Path, $Type, $MaxDepth) = @_; # FIXME: correct the search pattern - return cmd_find($Path, $Type, ".*\\.".$LIB_EXT."[0-9.]*", $MaxDepth, 1); + return cmd_find($Path, $Type, '\.'.$LIB_EXT.'[0-9.]*\Z', $MaxDepth, 1); } sub createDescriptor($$) @@ -18718,7 +19181,7 @@ sub detect_default_paths($) { # try to find gcc-X.Y foreach my $Path (@{$SystemPaths{"bin"}}) { - if(my @GCCs = cmd_find($Path, "", ".*/gcc-[0-9.]*", 1, 1)) + if(my @GCCs = cmd_find($Path, "", '/gcc-[0-9.]*\Z', 1, 1)) { # select the latest version @GCCs = sort {$b cmp $a} @GCCs; if(check_gcc($GCCs[0], "3")) @@ -19554,23 +20017,33 @@ sub create_ABI_Dump() initLogging(1); detect_default_paths("inc|lib|bin|gcc"); # complete analysis - # check the archive utilities - if($OSgroup eq "windows") - { # using zip - my $ZipCmd = get_CmdPath("zip"); - if(not $ZipCmd) { - exitStatus("Not_Found", "can't find \"zip\""); - } + my $DumpPath = "abi_dumps/$TargetLibraryName/".$TargetLibraryName."_".$Descriptor{1}{"Version"}.".abi"; + $DumpPath .= ".".$AR_EXT; # gzipped by default + if($OutputDumpPath) + { # user defined path + $DumpPath = $OutputDumpPath; } - else - { # using tar and gzip - my $TarCmd = get_CmdPath("tar"); - if(not $TarCmd) { - exitStatus("Not_Found", "can't find \"tar\""); + my $Archive = ($DumpPath=~s/\Q.$AR_EXT\E\Z//g); + + if(not $Archive and not $StdOut) + { # check archive utilities + if($OSgroup eq "windows") + { # using zip + my $ZipCmd = get_CmdPath("zip"); + if(not $ZipCmd) { + exitStatus("Not_Found", "can't find \"zip\""); + } } - my $GzipCmd = get_CmdPath("gzip"); - if(not $GzipCmd) { - exitStatus("Not_Found", "can't find \"gzip\""); + else + { # using tar and gzip + my $TarCmd = get_CmdPath("tar"); + if(not $TarCmd) { + exitStatus("Not_Found", "can't find \"tar\""); + } + my $GzipCmd = get_CmdPath("gzip"); + if(not $GzipCmd) { + exitStatus("Not_Found", "can't find \"gzip\""); + } } } @@ -19696,13 +20169,6 @@ sub create_ABI_Dump() } else { # write to gzipped file - my $DumpPath = "abi_dumps/$TargetLibraryName/".$TargetLibraryName."_".$Descriptor{1}{"Version"}.".abi"; - $DumpPath .= ".".$AR_EXT; # gzipped by default - if($OutputDumpPath) - { # user defined path - $DumpPath = $OutputDumpPath; - } - my $Archive = ($DumpPath=~s/\Q.$AR_EXT\E\Z//g); my ($DDir, $DName) = separate_path($DumpPath); my $DPath = $TMP_DIR."/".$DName; if(not $Archive) { @@ -20317,7 +20783,7 @@ sub compareAPIs($) } if(not $CheckObjectsOnly) { - mergeSignatures($Level); + mergeSymbols($Level); if(keys(%{$CheckedSymbols{$Level}})) { mergeConstants($Level); } @@ -20469,6 +20935,10 @@ sub scenario() { # --test && --use-dumps == --test-dump $TestDump = 1; } + if($Tolerant) + { # enable all + $Tolerance = 1234; + } if($Help) { HELP_MESSAGE(); diff --git a/doc/Changes.html b/doc/Changes.html index 1a883e0..7dabe3d 100644 --- a/doc/Changes.html +++ b/doc/Changes.html @@ -21,7 +21,7 @@ </style> <script src="/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=monobook&*"></script> <script>if(window.mw){ - mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker_Downloads", "wgTitle": "ABI Compliance Checker Downloads", "wgCurRevisionId": 8212, "wgArticleId": 2293, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); + mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker_Downloads", "wgTitle": "ABI Compliance Checker Downloads", "wgCurRevisionId": 8253, "wgArticleId": 2293, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); } </script><script>if(window.mw){ mw.loader.load(["mediawiki.page.startup"]); @@ -43,52 +43,92 @@ </p> <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div> <ul> -<li class="toclevel-1 tocsection-1"><a href="#Version_1.98.7_.28December_14.2C_2012.29"><span class="tocnumber">1</span> <span class="toctext">Version 1.98.7 (December 14, 2012)</span></a></li> -<li class="toclevel-1 tocsection-2"><a href="#Version_1.98.6_.28December_04.2C_2012.29"><span class="tocnumber">2</span> <span class="toctext">Version 1.98.6 (December 04, 2012)</span></a></li> -<li class="toclevel-1 tocsection-3"><a href="#Version_1.98.5_.28November_30.2C_2012.29"><span class="tocnumber">3</span> <span class="toctext">Version 1.98.5 (November 30, 2012)</span></a></li> -<li class="toclevel-1 tocsection-4"><a href="#Version_1.98.4_.28October_18.2C_2012.29"><span class="tocnumber">4</span> <span class="toctext">Version 1.98.4 (October 18, 2012)</span></a></li> -<li class="toclevel-1 tocsection-5"><a href="#Version_1.98.3_.28July_19.2C_2012.29"><span class="tocnumber">5</span> <span class="toctext">Version 1.98.3 (July 19, 2012)</span></a></li> -<li class="toclevel-1 tocsection-6"><a href="#Version_1.98.2_.28June_26.2C_2012.29"><span class="tocnumber">6</span> <span class="toctext">Version 1.98.2 (June 26, 2012)</span></a></li> -<li class="toclevel-1 tocsection-7"><a href="#Version_1.98.1_.28June_18.2C_2012.29"><span class="tocnumber">7</span> <span class="toctext">Version 1.98.1 (June 18, 2012)</span></a></li> -<li class="toclevel-1 tocsection-8"><a href="#Version_1.98.0_.28June_14.2C_2012.29"><span class="tocnumber">8</span> <span class="toctext">Version 1.98.0 (June 14, 2012)</span></a></li> -<li class="toclevel-1 tocsection-9"><a href="#Version_1.97.8_.28June_08.2C_2012.29"><span class="tocnumber">9</span> <span class="toctext">Version 1.97.8 (June 08, 2012)</span></a></li> -<li class="toclevel-1 tocsection-10"><a href="#Version_1.97.5_.28May_14.2C_2012.29"><span class="tocnumber">10</span> <span class="toctext">Version 1.97.5 (May 14, 2012)</span></a></li> -<li class="toclevel-1 tocsection-11"><a href="#Version_1.97.4_.28April_16.2C_2012.29"><span class="tocnumber">11</span> <span class="toctext">Version 1.97.4 (April 16, 2012)</span></a></li> -<li class="toclevel-1 tocsection-12"><a href="#Version_1.97.3_.28April_03.2C_2012.29"><span class="tocnumber">12</span> <span class="toctext">Version 1.97.3 (April 03, 2012)</span></a></li> -<li class="toclevel-1 tocsection-13"><a href="#Version_1.96.8_.28February_17.2C_2012.29"><span class="tocnumber">13</span> <span class="toctext">Version 1.96.8 (February 17, 2012)</span></a></li> -<li class="toclevel-1 tocsection-14"><a href="#Version_1.94_.28September_09.2C_2011.29"><span class="tocnumber">14</span> <span class="toctext">Version 1.94 (September 09, 2011)</span></a></li> -<li class="toclevel-1 tocsection-15"><a href="#Version_1.93.8_.28September_08.2C_2011.29"><span class="tocnumber">15</span> <span class="toctext">Version 1.93.8 (September 08, 2011)</span></a></li> -<li class="toclevel-1 tocsection-16"><a href="#Version_1.23.5_.28July_01.2C_2011.29"><span class="tocnumber">16</span> <span class="toctext">Version 1.23.5 (July 01, 2011)</span></a></li> -<li class="toclevel-1 tocsection-17"><a href="#Version_1.23_.28June_07.2C_2011.29"><span class="tocnumber">17</span> <span class="toctext">Version 1.23 (June 07, 2011)</span></a></li> -<li class="toclevel-1 tocsection-18"><a href="#Version_1.21.12_.28April_29.2C_2011.29"><span class="tocnumber">18</span> <span class="toctext">Version 1.21.12 (April 29, 2011)</span></a></li> -<li class="toclevel-1 tocsection-19"><a href="#Version_1.21_.28August_19.2C_2010.29"><span class="tocnumber">19</span> <span class="toctext">Version 1.21 (August 19, 2010)</span></a></li> -<li class="toclevel-1 tocsection-20"><a href="#Version_1.20_.28August_30.2C_2010.29"><span class="tocnumber">20</span> <span class="toctext">Version 1.20 (August 30, 2010)</span></a></li> -<li class="toclevel-1 tocsection-21"><a href="#Version_1.19_.28July_22.2C_2010.29"><span class="tocnumber">21</span> <span class="toctext">Version 1.19 (July 22, 2010)</span></a></li> -<li class="toclevel-1 tocsection-22"><a href="#Version_1.18_.28June_25.2C_2010.29"><span class="tocnumber">22</span> <span class="toctext">Version 1.18 (June 25, 2010)</span></a></li> -<li class="toclevel-1 tocsection-23"><a href="#Version_1.17.2_.28June_16.2C_2010.29"><span class="tocnumber">23</span> <span class="toctext">Version 1.17.2 (June 16, 2010)</span></a></li> -<li class="toclevel-1 tocsection-24"><a href="#Version_1.17.1_.28June_09.2C_2010.29"><span class="tocnumber">24</span> <span class="toctext">Version 1.17.1 (June 09, 2010)</span></a></li> -<li class="toclevel-1 tocsection-25"><a href="#Version_1.17_.28June_08.2C_2010.29"><span class="tocnumber">25</span> <span class="toctext">Version 1.17 (June 08, 2010)</span></a></li> -<li class="toclevel-1 tocsection-26"><a href="#Version_1.16_.28May_05.2C_2010.29"><span class="tocnumber">26</span> <span class="toctext">Version 1.16 (May 05, 2010)</span></a></li> -<li class="toclevel-1 tocsection-27"><a href="#Version_1.15_.28March_26.2C_2010.29"><span class="tocnumber">27</span> <span class="toctext">Version 1.15 (March 26, 2010)</span></a></li> -<li class="toclevel-1 tocsection-28"><a href="#Version_1.14_.28March_03.2C_2010.29"><span class="tocnumber">28</span> <span class="toctext">Version 1.14 (March 03, 2010)</span></a></li> -<li class="toclevel-1 tocsection-29"><a href="#Version_1.13_.28February_16.2C_2010.29"><span class="tocnumber">29</span> <span class="toctext">Version 1.13 (February 16, 2010)</span></a></li> -<li class="toclevel-1 tocsection-30"><a href="#Version_1.12_.28December_04.2C_2009.29"><span class="tocnumber">30</span> <span class="toctext">Version 1.12 (December 04, 2009)</span></a></li> -<li class="toclevel-1 tocsection-31"><a href="#Version_1.11_.28November_10.2C_2009.29"><span class="tocnumber">31</span> <span class="toctext">Version 1.11 (November 10, 2009)</span></a></li> -<li class="toclevel-1 tocsection-32"><a href="#Version_1.10_.28November_02.2C_2009.29"><span class="tocnumber">32</span> <span class="toctext">Version 1.10 (November 02, 2009)</span></a></li> -<li class="toclevel-1 tocsection-33"><a href="#Version_1.9_.28October_12.2C_2009.29"><span class="tocnumber">33</span> <span class="toctext">Version 1.9 (October 12, 2009)</span></a></li> -<li class="toclevel-1 tocsection-34"><a href="#Version_1.8_.28September_29.2C_2009.29"><span class="tocnumber">34</span> <span class="toctext">Version 1.8 (September 29, 2009)</span></a></li> -<li class="toclevel-1 tocsection-35"><a href="#Version_1.7_.28September_11.2C_2009.29"><span class="tocnumber">35</span> <span class="toctext">Version 1.7 (September 11, 2009)</span></a></li> -<li class="toclevel-1 tocsection-36"><a href="#Version_1.6_.28August_31.2C_2009.29"><span class="tocnumber">36</span> <span class="toctext">Version 1.6 (August 31, 2009)</span></a></li> -<li class="toclevel-1 tocsection-37"><a href="#Version_1.5_.28August_25.2C_2009.29"><span class="tocnumber">37</span> <span class="toctext">Version 1.5 (August 25, 2009)</span></a></li> -<li class="toclevel-1 tocsection-38"><a href="#Version_1.4_.28August_18.2C_2009.29"><span class="tocnumber">38</span> <span class="toctext">Version 1.4 (August 18, 2009)</span></a></li> -<li class="toclevel-1 tocsection-39"><a href="#Version_1.3_.28August_14.2C_2009.29"><span class="tocnumber">39</span> <span class="toctext">Version 1.3 (August 14, 2009)</span></a></li> -<li class="toclevel-1 tocsection-40"><a href="#Version_1.2_.28August_07.2C_2009.29"><span class="tocnumber">40</span> <span class="toctext">Version 1.2 (August 07, 2009)</span></a></li> -<li class="toclevel-1 tocsection-41"><a href="#Version_1.1_.28August_06.2C_2009.29"><span class="tocnumber">41</span> <span class="toctext">Version 1.1 (August 06, 2009)</span></a></li> -<li class="toclevel-1 tocsection-42"><a href="#Version_1.0_.28July_31.2C_2009.29"><span class="tocnumber">42</span> <span class="toctext">Version 1.0 (July 31, 2009)</span></a></li> +<li class="toclevel-1 tocsection-1"><a href="#Version_1.98.8_.28February_07.2C_2013.29"><span class="tocnumber">1</span> <span class="toctext">Version 1.98.8 (February 07, 2013)</span></a></li> +<li class="toclevel-1 tocsection-2"><a href="#Version_1.98.7_.28December_14.2C_2012.29"><span class="tocnumber">2</span> <span class="toctext">Version 1.98.7 (December 14, 2012)</span></a></li> +<li class="toclevel-1 tocsection-3"><a href="#Version_1.98.6_.28December_04.2C_2012.29"><span class="tocnumber">3</span> <span class="toctext">Version 1.98.6 (December 04, 2012)</span></a></li> +<li class="toclevel-1 tocsection-4"><a href="#Version_1.98.5_.28November_30.2C_2012.29"><span class="tocnumber">4</span> <span class="toctext">Version 1.98.5 (November 30, 2012)</span></a></li> +<li class="toclevel-1 tocsection-5"><a href="#Version_1.98.4_.28October_18.2C_2012.29"><span class="tocnumber">5</span> <span class="toctext">Version 1.98.4 (October 18, 2012)</span></a></li> +<li class="toclevel-1 tocsection-6"><a href="#Version_1.98.3_.28July_19.2C_2012.29"><span class="tocnumber">6</span> <span class="toctext">Version 1.98.3 (July 19, 2012)</span></a></li> +<li class="toclevel-1 tocsection-7"><a href="#Version_1.98.2_.28June_26.2C_2012.29"><span class="tocnumber">7</span> <span class="toctext">Version 1.98.2 (June 26, 2012)</span></a></li> +<li class="toclevel-1 tocsection-8"><a href="#Version_1.98.1_.28June_18.2C_2012.29"><span class="tocnumber">8</span> <span class="toctext">Version 1.98.1 (June 18, 2012)</span></a></li> +<li class="toclevel-1 tocsection-9"><a href="#Version_1.98.0_.28June_14.2C_2012.29"><span class="tocnumber">9</span> <span class="toctext">Version 1.98.0 (June 14, 2012)</span></a></li> +<li class="toclevel-1 tocsection-10"><a href="#Version_1.97.8_.28June_08.2C_2012.29"><span class="tocnumber">10</span> <span class="toctext">Version 1.97.8 (June 08, 2012)</span></a></li> +<li class="toclevel-1 tocsection-11"><a href="#Version_1.97.5_.28May_14.2C_2012.29"><span class="tocnumber">11</span> <span class="toctext">Version 1.97.5 (May 14, 2012)</span></a></li> +<li class="toclevel-1 tocsection-12"><a href="#Version_1.97.4_.28April_16.2C_2012.29"><span class="tocnumber">12</span> <span class="toctext">Version 1.97.4 (April 16, 2012)</span></a></li> +<li class="toclevel-1 tocsection-13"><a href="#Version_1.97.3_.28April_03.2C_2012.29"><span class="tocnumber">13</span> <span class="toctext">Version 1.97.3 (April 03, 2012)</span></a></li> +<li class="toclevel-1 tocsection-14"><a href="#Version_1.96.8_.28February_17.2C_2012.29"><span class="tocnumber">14</span> <span class="toctext">Version 1.96.8 (February 17, 2012)</span></a></li> +<li class="toclevel-1 tocsection-15"><a href="#Version_1.94_.28September_09.2C_2011.29"><span class="tocnumber">15</span> <span class="toctext">Version 1.94 (September 09, 2011)</span></a></li> +<li class="toclevel-1 tocsection-16"><a href="#Version_1.93.8_.28September_08.2C_2011.29"><span class="tocnumber">16</span> <span class="toctext">Version 1.93.8 (September 08, 2011)</span></a></li> +<li class="toclevel-1 tocsection-17"><a href="#Version_1.23.5_.28July_01.2C_2011.29"><span class="tocnumber">17</span> <span class="toctext">Version 1.23.5 (July 01, 2011)</span></a></li> +<li class="toclevel-1 tocsection-18"><a href="#Version_1.23_.28June_07.2C_2011.29"><span class="tocnumber">18</span> <span class="toctext">Version 1.23 (June 07, 2011)</span></a></li> +<li class="toclevel-1 tocsection-19"><a href="#Version_1.21.12_.28April_29.2C_2011.29"><span class="tocnumber">19</span> <span class="toctext">Version 1.21.12 (April 29, 2011)</span></a></li> +<li class="toclevel-1 tocsection-20"><a href="#Version_1.21_.28August_19.2C_2010.29"><span class="tocnumber">20</span> <span class="toctext">Version 1.21 (August 19, 2010)</span></a></li> +<li class="toclevel-1 tocsection-21"><a href="#Version_1.20_.28August_30.2C_2010.29"><span class="tocnumber">21</span> <span class="toctext">Version 1.20 (August 30, 2010)</span></a></li> +<li class="toclevel-1 tocsection-22"><a href="#Version_1.19_.28July_22.2C_2010.29"><span class="tocnumber">22</span> <span class="toctext">Version 1.19 (July 22, 2010)</span></a></li> +<li class="toclevel-1 tocsection-23"><a href="#Version_1.18_.28June_25.2C_2010.29"><span class="tocnumber">23</span> <span class="toctext">Version 1.18 (June 25, 2010)</span></a></li> +<li class="toclevel-1 tocsection-24"><a href="#Version_1.17.2_.28June_16.2C_2010.29"><span class="tocnumber">24</span> <span class="toctext">Version 1.17.2 (June 16, 2010)</span></a></li> +<li class="toclevel-1 tocsection-25"><a href="#Version_1.17.1_.28June_09.2C_2010.29"><span class="tocnumber">25</span> <span class="toctext">Version 1.17.1 (June 09, 2010)</span></a></li> +<li class="toclevel-1 tocsection-26"><a href="#Version_1.17_.28June_08.2C_2010.29"><span class="tocnumber">26</span> <span class="toctext">Version 1.17 (June 08, 2010)</span></a></li> +<li class="toclevel-1 tocsection-27"><a href="#Version_1.16_.28May_05.2C_2010.29"><span class="tocnumber">27</span> <span class="toctext">Version 1.16 (May 05, 2010)</span></a></li> +<li class="toclevel-1 tocsection-28"><a href="#Version_1.15_.28March_26.2C_2010.29"><span class="tocnumber">28</span> <span class="toctext">Version 1.15 (March 26, 2010)</span></a></li> +<li class="toclevel-1 tocsection-29"><a href="#Version_1.14_.28March_03.2C_2010.29"><span class="tocnumber">29</span> <span class="toctext">Version 1.14 (March 03, 2010)</span></a></li> +<li class="toclevel-1 tocsection-30"><a href="#Version_1.13_.28February_16.2C_2010.29"><span class="tocnumber">30</span> <span class="toctext">Version 1.13 (February 16, 2010)</span></a></li> +<li class="toclevel-1 tocsection-31"><a href="#Version_1.12_.28December_04.2C_2009.29"><span class="tocnumber">31</span> <span class="toctext">Version 1.12 (December 04, 2009)</span></a></li> +<li class="toclevel-1 tocsection-32"><a href="#Version_1.11_.28November_10.2C_2009.29"><span class="tocnumber">32</span> <span class="toctext">Version 1.11 (November 10, 2009)</span></a></li> +<li class="toclevel-1 tocsection-33"><a href="#Version_1.10_.28November_02.2C_2009.29"><span class="tocnumber">33</span> <span class="toctext">Version 1.10 (November 02, 2009)</span></a></li> +<li class="toclevel-1 tocsection-34"><a href="#Version_1.9_.28October_12.2C_2009.29"><span class="tocnumber">34</span> <span class="toctext">Version 1.9 (October 12, 2009)</span></a></li> +<li class="toclevel-1 tocsection-35"><a href="#Version_1.8_.28September_29.2C_2009.29"><span class="tocnumber">35</span> <span class="toctext">Version 1.8 (September 29, 2009)</span></a></li> +<li class="toclevel-1 tocsection-36"><a href="#Version_1.7_.28September_11.2C_2009.29"><span class="tocnumber">36</span> <span class="toctext">Version 1.7 (September 11, 2009)</span></a></li> +<li class="toclevel-1 tocsection-37"><a href="#Version_1.6_.28August_31.2C_2009.29"><span class="tocnumber">37</span> <span class="toctext">Version 1.6 (August 31, 2009)</span></a></li> +<li class="toclevel-1 tocsection-38"><a href="#Version_1.5_.28August_25.2C_2009.29"><span class="tocnumber">38</span> <span class="toctext">Version 1.5 (August 25, 2009)</span></a></li> +<li class="toclevel-1 tocsection-39"><a href="#Version_1.4_.28August_18.2C_2009.29"><span class="tocnumber">39</span> <span class="toctext">Version 1.4 (August 18, 2009)</span></a></li> +<li class="toclevel-1 tocsection-40"><a href="#Version_1.3_.28August_14.2C_2009.29"><span class="tocnumber">40</span> <span class="toctext">Version 1.3 (August 14, 2009)</span></a></li> +<li class="toclevel-1 tocsection-41"><a href="#Version_1.2_.28August_07.2C_2009.29"><span class="tocnumber">41</span> <span class="toctext">Version 1.2 (August 07, 2009)</span></a></li> +<li class="toclevel-1 tocsection-42"><a href="#Version_1.1_.28August_06.2C_2009.29"><span class="tocnumber">42</span> <span class="toctext">Version 1.1 (August 06, 2009)</span></a></li> +<li class="toclevel-1 tocsection-43"><a href="#Version_1.0_.28July_31.2C_2009.29"><span class="tocnumber">43</span> <span class="toctext">Version 1.0 (July 31, 2009)</span></a></li> </ul> </td></tr></table> +<h2> <span class="mw-headline" id="Version_1.98.8_.28February_07.2C_2013.29"> Version 1.98.8 (February 07, 2013) </span></h2> +<p><a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/1.98.8.tar.gz">abi-compliance-checker-1.98.8.tar.gz</a><br /> +</p><p><b>ACC 2.0</b> pre-release. +</p><p>This is a bug-fix release with a few new features. +</p> +<ul><li> <b>Improvements</b> +<ul><li> Show added and removed constants (#defines) in the report +</li><li> Show changes in unnamed enumerations +</li><li> Avoid false alarm about renamed field if old name of this field is defined to new (SC) +</li><li> Recursive comparing of structured data types in *_Format rules +</li><li> Added Typedef_BaseType_Format rule to check format changes in the typedef base type +</li></ul> +</li></ul> +<ul><li> <b>New Options</b> +<ul><li> <a href="Options.html" title="ABI Compliance Checker Options">-tolerant</a> +</li><li> <a href="Options.html" title="ABI Compliance Checker Options">-tolerance</a> +</li></ul> +</li></ul> +<ul><li> <b>Bug Fixes</b> +<ul><li> Increased severity of Parameter_BaseType_And_Size BC rule (Low to Medium) +</li><li> Increased severity of Added_Field SC rule (Safe to Low) +</li><li> Corrected handling of the tool error codes in the test suite +</li><li> Corrected handling of relative paths in descriptor options +</li><li> Skipping linker-related options in gcc_options option of the descriptor +</li><li> Corrected internal mangler for C++ functions +</li><li> Corrected conditions for enabling of C++ compatibility mode +</li><li> Corrected handling of C++ keywords in C-code +</li><li> Corrected <a href="Options.html" title="ABI Compliance Checker Options">-extended</a> option +</li><li> Corrected Typedef_BaseType rule +</li><li> Corrected parsing of default function arguments +</li><li> Do not check presence of archive utilities if not used +</li><li> Other fixes +</li></ul> +</li></ul> +<ul><li> <b>Other</b> +<ul><li> Extended test suite +</li><li> Code cleaning +</li></ul> +</li></ul> <h2> <span class="mw-headline" id="Version_1.98.7_.28December_14.2C_2012.29"> Version 1.98.7 (December 14, 2012) </span></h2> -<p><a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/abi-compliance-checker-1.98.7.tar.gz">abi-compliance-checker-1.98.7.tar.gz</a><br /> +<p><a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/1.98.7.tar.gz">abi-compliance-checker-1.98.7.tar.gz</a><br /> </p><p><b>ACC 2.0</b> pre-release. </p><p>This is a bug-fix release with a few new features. </p> @@ -114,8 +154,6 @@ <ul><li> Code cleaning and refactoring </li></ul> </li></ul> -<p><br /> -</p> <h2> <span class="mw-headline" id="Version_1.98.6_.28December_04.2C_2012.29"> Version 1.98.6 (December 04, 2012) </span></h2> <p><a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/downloads/abi-compliance-checker-1.98.6.tar.gz">abi-compliance-checker-1.98.6.tar.gz</a><br /> </p><p><b>ACC 2.0</b> pre-release. @@ -181,6 +219,7 @@ <ul><li> <b>Bug Fixes</b> <ul><li> Fixed an issue with diagnostics of added virtual functions </li><li> Corrected the list of functions affected by the compatibility problem +</li><li> Avoid false alarm about removed function if this function became macro (SC) </li><li> Corrected parser of C header files </li><li> Other fixes </li></ul> @@ -910,11 +949,11 @@ Initial prototype of the tool. </p> <!-- NewPP limit report -Preprocessor node count: 167/1000000 +Preprocessor node count: 171/1000000 Post-expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Expensive parser function count: 0/100 --> -<!-- Saved in parser cache with key rasispdb:pcache:idhash:2293-0!*!0!!en!*!* and timestamp 20121214111728 --> +<!-- Saved in parser cache with key rasispdb:pcache:idhash:2293-0!*!0!!en!*!* and timestamp 20130207150735 --> </div></div></div></div></div></body></html>
\ No newline at end of file diff --git a/doc/Descriptor.html b/doc/Descriptor.html index 14c93f1..d68fc00 100644 --- a/doc/Descriptor.html +++ b/doc/Descriptor.html @@ -21,7 +21,7 @@ </style> <script src="/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=monobook&*"></script> <script>if(window.mw){ - mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "Library_Descriptor", "wgTitle": "Library Descriptor", "wgCurRevisionId": 7948, "wgArticleId": 2415, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["API Sanity Checker", "ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); + mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "Library_Descriptor", "wgTitle": "Library Descriptor", "wgCurRevisionId": 8241, "wgArticleId": 2415, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["API Sanity Checker", "ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); } </script><script>if(window.mw){ mw.loader.load(["mediawiki.page.startup"]); @@ -41,6 +41,14 @@ <!-- start content --> <div lang="en" dir="ltr" class="mw-content-ltr"><p><i>Library descriptor</i> is a simple XML-file that specifies version number, paths to header files and shared libraries and optionally some other information. </p> +<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div> +<ul> +<li class="toclevel-1 tocsection-1"><a href="#Primary_Sections"><span class="tocnumber">1</span> <span class="toctext">Primary Sections</span></a></li> +<li class="toclevel-1 tocsection-2"><a href="#Optional_Sections"><span class="tocnumber">2</span> <span class="toctext">Optional Sections</span></a></li> +<li class="toclevel-1 tocsection-3"><a href="#Extra_Sections_.28API_Sanity_Checker.29"><span class="tocnumber">3</span> <span class="toctext">Extra Sections (API Sanity Checker)</span></a></li> +<li class="toclevel-1 tocsection-4"><a href="#Examples"><span class="tocnumber">4</span> <span class="toctext">Examples</span></a></li> +</ul> +</td></tr></table> <h2> <span class="mw-headline" id="Primary_Sections"> Primary Sections </span></h2> <pre> <span style="color:Green;"><version></span> /* Version of the library */ @@ -152,6 +160,17 @@ arm-none-symbianelf */ <span style="color:Green;"></cross_prefix></span> </pre> +<h2> <span class="mw-headline" id="Extra_Sections_.28API_Sanity_Checker.29"> Extra Sections (API Sanity Checker) </span></h2> +<pre> <span style="color:Green;"><test_include_preamble></span> + /* The list of header files that should be + included in each test case before other + headers, one per line */ + <span style="color:Green;"></test_include_preamble></span> + + <span style="color:Green;"><test_defines></span> + /* Add defines to test cases */ + <span style="color:Green;"></test_defines></span> +</pre> <h2> <span class="mw-headline" id="Examples"> Examples </span></h2> <ul><li> <b>libssh</b> </li></ul> @@ -222,6 +241,32 @@ Xlib.h <span style="color:Green;"></include_preamble></span> </pre> +<ul><li> <b>BlackBerry 10 Native SDK</b> +</li></ul> +<pre> <span style="color:Green;"><version></span> + 10 + <span style="color:Green;"></version></span> + + <span style="color:Green;"><headers></span> + /home/RIM/bbndk/target_10_0_9_1673/qnx6/usr/include/bb/ + <span style="color:Green;"></headers></span> + + <span style="color:Green;"><search_headers></span> + /home/RIM/bbndk/target_10_0_9_1673/qnx6/usr/include/ + <span style="color:Green;"></search_headers></span> + + <span style="color:Green;"><libs></span> + /home/RIM/bbndk/target_10_0_9_1673/qnx6/x86/usr/lib/ + <span style="color:Green;"></libs></span> + + <span style="color:Green;"><tools></span> + /home/RIM/bbndk/host_10_0_9_404/linux/x86/usr/bin/ + <span style="color:Green;"></tools></span> + + <span style="color:Green;"><cross_prefix></span> + i486-pc-nto-qnx8.0.0 + <span style="color:Green;"></cross_prefix></span> +</pre> <ul><li> <b>libQtCore</b> </li></ul> <pre> <span style="color:Green;"><version></span> @@ -459,11 +504,11 @@ </pre> <!-- NewPP limit report -Preprocessor node count: 175/1000000 +Preprocessor node count: 195/1000000 Post-expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Expensive parser function count: 0/100 --> -<!-- Saved in parser cache with key rasispdb:pcache:idhash:2415-0!*!*!!*!*!* and timestamp 20121213184241 --> +<!-- Saved in parser cache with key rasispdb:pcache:idhash:2415-0!*!*!!en!*!* and timestamp 20130207090644 --> </div></div></div></div></div></body></html>
\ No newline at end of file diff --git a/doc/Options.html b/doc/Options.html index b2537e0..3b01894 100644 --- a/doc/Options.html +++ b/doc/Options.html @@ -21,7 +21,7 @@ </style> <script src="/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=monobook&*"></script> <script>if(window.mw){ - mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker_Options", "wgTitle": "ABI Compliance Checker Options", "wgCurRevisionId": 8158, "wgArticleId": 2442, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); + mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker_Options", "wgTitle": "ABI Compliance Checker Options", "wgCurRevisionId": 8247, "wgArticleId": 2442, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); } </script><script>if(window.mw){ mw.loader.load(["mediawiki.page.startup"]); @@ -210,7 +210,7 @@ <div style="padding-left:40px;">Enable sorting of data in ABI dumps.</div><br /> <ul><li><b>-report-path PATH</b> </li></ul> -<div style="padding-left:40px;">Specify the file path where to generate the compatibility report. Default report path: compat_reports/<library name>/<v1>_to_<v2>/abi_compat_report.html</div><br /> +<div style="padding-left:40px;">Specify the file path where to generate the compatibility report. Default report path: compat_reports/LIB_NAME/V1_to_V2/abi_compat_report.html</div><br /> <ul><li><b>-bin-report-path PATH</b> </li></ul> <div style="padding-left:40px;">Path to binary-compatibility report. Default: compat_reports/LIB_NAME/V1_to_V2/abi_compat_report.html</div><br /> @@ -237,7 +237,7 @@ <div style="padding-left:40px;">The component name in the title and summary of the HTML report. Default: library</div><br /> <ul><li><b>-l-full|-lib-full NAME</b> </li></ul> -<div style="padding-left:40px;">Change library name in the report title to <name>. By default will be displayed a name specified by -l option.</div><br /> +<div style="padding-left:40px;">Change library name in the report title to NAME. By default will be displayed a name specified by -l option.</div><br /> <ul><li><b>-b|-browse PROGRAM</b> </li></ul> <div style="padding-left:40px;">Open report(s) in the browser (firefox, opera, etc.).</div><br /> @@ -253,14 +253,20 @@ <ul><li><b>-force</b> </li></ul> <div style="padding-left:40px;">Try to use this option if the tool doesn't work.</div><br /> +<ul><li><b>-tolerance LEVEL</b> +</li></ul> +<div style="padding-left:40px;">Apply a set of heuristics to successfully compile input header files. You can enable several tolerance levels by joining them into one string (e.g. 13, 124, etc.). Levels: 1 - skip non-Linux headers (e.g. win32_*.h, etc.), 2 - skip internal headers (e.g. *_p.h, impl/*.h, etc.), 3 - skip headers that iclude non-Linux headers, 4 - skip headers included by others.</div><br /> +<ul><li><b>-tolerant</b> +</li></ul> +<div style="padding-left:40px;">Enable highest tolerance level [1234].</div><br /> <!-- NewPP limit report -Preprocessor node count: 81/1000000 +Preprocessor node count: 83/1000000 Post-expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Expensive parser function count: 0/100 --> -<!-- Saved in parser cache with key rasispdb:pcache:idhash:2442-0!*!0!!en!*!* and timestamp 20121214090740 --> +<!-- Saved in parser cache with key rasispdb:pcache:idhash:2442-0!*!0!!en!*!* and timestamp 20130207091345 --> </div></div></div></div></div></body></html>
\ No newline at end of file diff --git a/doc/Readme.html b/doc/Readme.html index 33ab7a4..9534979 100644 --- a/doc/Readme.html +++ b/doc/Readme.html @@ -21,7 +21,7 @@ </style> <script src="/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=monobook&*"></script> <script>if(window.mw){ - mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker", "wgTitle": "ABI Compliance Checker", "wgCurRevisionId": 8213, "wgArticleId": 2292, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); + mw.config.set({"wgCanonicalNamespace": "", "wgCanonicalSpecialPageName": false, "wgNamespaceNumber": 0, "wgPageName": "ABI_compliance_checker", "wgTitle": "ABI Compliance Checker", "wgCurRevisionId": 8254, "wgArticleId": 2292, "wgIsArticle": true, "wgAction": "view", "wgUserName": null, "wgUserGroups": ["*"], "wgCategories": ["ABI Compliance Checker"], "wgBreakFrames": false, "wgRestrictionEdit": [], "wgRestrictionMove": []}); } </script><script>if(window.mw){ mw.loader.load(["mediawiki.page.startup"]); @@ -92,7 +92,7 @@ <h2> <span class="mw-headline" id="Downloads"> Downloads </span></h2> <h3> <span class="mw-headline" id="Releases"> Releases </span></h3> <p>All releases can be downloaded from <b><a href="Changes.html" title="ABI Compliance Checker Downloads">this page</a></b> or <b><a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/">github.com</a></b>. -</p><p>Latest release: <a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/abi-compliance-checker-1.98.7.tar.gz">1.98.7</a> +</p><p>Latest release: <a rel="nofollow" class="external text" href="https://github.com/lvc/abi-compliance-checker/archive/1.98.8.tar.gz">1.98.8</a> </p> <h3> <span class="mw-headline" id="Git"> Git </span></h3> <p>Read-only access to the latest development version:<br /> @@ -118,7 +118,7 @@ </li></ul> </li></ul> <ul><li><b>Mac OS X</b> -<ul><li> <a rel="nofollow" class="external text" href="http://developer.apple.com/technologies/tools/xcode.html">Xcode</a> (gcc, c++filt, otool, nm) +<ul><li> <a rel="nofollow" class="external text" href="http://developer.apple.com/technologies/tools/xcode.html">Xcode</a> (gcc, c++filt, nm, otool) </li><li> <a rel="nofollow" class="external text" href="http://ctags.sourceforge.net/">Ctags</a> (5.8 or newer) </li></ul> </li></ul> @@ -129,7 +129,7 @@ </li><li> Sigcheck v1.71 or newer </li><li> <a rel="nofollow" class="external text" href="http://ctags.sourceforge.net/">Ctags</a> (5.8 or newer) </li><li> Info-ZIP 3.0 (zip, unzip) -</li><li> Add gcc.exe path (C:\MinGW\bin\) to your system PATH variable +</li><li> Add tool locations to the PATH environment variable </li><li> Run vsvars32.bat script (C:\Microsoft Visual Studio 9.0\Common7\Tools\) </li></ul> </li></ul> @@ -473,6 +473,7 @@ Check client application portability between libssh versions:<br /> </li><li> <a rel="nofollow" class="external text" href="http://accu.org/index.php/journals/1718"><b>"Interface Versioning in C++"</b></a>, ACCU </li><li> <a rel="nofollow" class="external text" href="http://refspecs.freestandards.org/elf/gabi41.pdf"><b>"Generic ABI Standard"</b></a>, <a rel="nofollow" class="external text" href="http://refspecs.freestandards.org/elf/"><b>"ELF and ABI Standards"</b></a>, freestandards.org </li><li> Processor ABI standards: <b><a rel="nofollow" class="external text" href="http://refspecs.freestandards.org/elf/abi386-4.pdf">Intel386</a></b>, <b><a rel="nofollow" class="external text" href="http://www.x86-64.org/documentation/abi.pdf">AMD64</a></b>, <b><a rel="nofollow" class="external text" href="http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf">ARM</a></b>, <b><a rel="nofollow" class="external text" href="http://refspecs.freestandards.org/elf/elfspec_ppc.pdf">PowerPC</a></b>, <b><a rel="nofollow" class="external text" href="http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/docu/l390abi0.pdf">S/390</a></b>, <b><a rel="nofollow" class="external text" href="http://refspecs.freestandards.org/elf/IA64-SysV-psABI.pdf">Itanium</a></b>, <b><a rel="nofollow" class="external text" href="http://refspecs.freestandards.org/elf/mipsabi.pdf">MIPS</a></b>, <b><a rel="nofollow" class="external text" href="http://www.sparc.org/standards/psABI3rd.pdf">SPARC</a></b>, <b><a rel="nofollow" class="external text" href="http://refspecs.freestandards.org/elf/elf-pa.pdf">PA-RISK</a></b>, <b><a rel="nofollow" class="external text" href="http://www.linux-m32r.org/cmn/m32r/M32R-elf-abi.pdf">M32R</a></b> +</li><li> <a rel="nofollow" class="external text" href="http://science.webhostinggeeks.com/abi-compliance-checker"><b>Translation of this article to Serbo-Croatian</b></a>, Jovana Milutinovich </li></ol> <!-- @@ -483,5 +484,5 @@ Template argument size: 0/2097152 bytes Expensive parser function count: 0/100 --> -<!-- Saved in parser cache with key rasispdb:pcache:idhash:2292-0!*!0!!en!*!* and timestamp 20121214111752 --> +<!-- Saved in parser cache with key rasispdb:pcache:idhash:2292-0!*!0!!en!*!* and timestamp 20130207150831 --> </div></div></div></div></div></body></html>
\ No newline at end of file diff --git a/doc/SysCheck/Descriptor.html b/doc/SysCheck/Descriptor.html index 9ad1c4b..fb4f84a 100644 --- a/doc/SysCheck/Descriptor.html +++ b/doc/SysCheck/Descriptor.html @@ -233,5 +233,5 @@ Template argument size: 0/2097152 bytes Expensive parser function count: 0/100 --> -<!-- Saved in parser cache with key rasispdb:pcache:idhash:2657-0!*!*!!*!*!* and timestamp 20121214090743 --> +<!-- Saved in parser cache with key rasispdb:pcache:idhash:2657-0!*!*!!*!*!* and timestamp 20130207150900 --> </div></div></div></div></div></body></html>
\ No newline at end of file diff --git a/doc/SysCheck/Examples.html b/doc/SysCheck/Examples.html index a37b49d..56b2a69 100644 --- a/doc/SysCheck/Examples.html +++ b/doc/SysCheck/Examples.html @@ -239,5 +239,5 @@ Template argument size: 0/2097152 bytes Expensive parser function count: 0/100 --> -<!-- Saved in parser cache with key rasispdb:pcache:idhash:2656-0!*!*!!en!*!* and timestamp 20121214092725 --> +<!-- Saved in parser cache with key rasispdb:pcache:idhash:2656-0!*!*!!en!*!* and timestamp 20130207075435 --> </div></div></div></div></div></body></html>
\ No newline at end of file diff --git a/doc/SysCheck/Usage.html b/doc/SysCheck/Usage.html index a4d2f24..dd6f6df 100644 --- a/doc/SysCheck/Usage.html +++ b/doc/SysCheck/Usage.html @@ -116,5 +116,5 @@ Template argument size: 0/2097152 bytes Expensive parser function count: 0/100 --> -<!-- Saved in parser cache with key rasispdb:pcache:idhash:2655-0!*!0!!en!*!* and timestamp 20121213115150 --> +<!-- Saved in parser cache with key rasispdb:pcache:idhash:2655-0!*!0!!en!*!* and timestamp 20130206182521 --> </div></div></div></div></div></body></html>
\ No newline at end of file diff --git a/modules/Internals/CallConv.pm b/modules/Internals/CallConv.pm index 6a65d1b..a2255e1 100644 --- a/modules/Internals/CallConv.pm +++ b/modules/Internals/CallConv.pm @@ -4,7 +4,7 @@ # Copyright (C) 2009-2010 The Linux Foundation # Copyright (C) 2009-2011 Institute for System Programming, RAS # Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2011-2012 ROSA Laboratory +# Copyright (C) 2011-2013 ROSA Laboratory # # Written by Andrey Ponomarenko # diff --git a/modules/Internals/RegTests.pm b/modules/Internals/RegTests.pm index 434d8c1..87b1eab 100644 --- a/modules/Internals/RegTests.pm +++ b/modules/Internals/RegTests.pm @@ -4,7 +4,7 @@ # Copyright (C) 2009-2010 The Linux Foundation # Copyright (C) 2009-2011 Institute for System Programming, RAS # Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2011-2012 ROSA Laboratory +# Copyright (C) 2011-2013 ROSA Laboratory # # Written by Andrey Ponomarenko # @@ -715,9 +715,9 @@ sub testCpp() int i; double j; }; - $DECL_SPEC int parameterTypeFormat(struct DType param);"; + $DECL_SPEC int parameterTypeFormat_Safe(struct DType param);"; $SOURCE1 .= " - int parameterTypeFormat(struct DType param) { return 0; }"; + int parameterTypeFormat_Safe(struct DType param) { return 0; }"; $HEADER2 .= " class DType @@ -725,9 +725,40 @@ sub testCpp() int i; double j; }; - $DECL_SPEC int parameterTypeFormat(class DType param);"; + $DECL_SPEC int parameterTypeFormat_Safe(class DType param);"; $SOURCE2 .= " - int parameterTypeFormat(class DType param) { return 0; }"; + int parameterTypeFormat_Safe(class DType param) { return 0; }"; + + # Field_Type_Format + $HEADER1 .= " + struct DType1 + { + int i; + double j[7]; + }; + struct FieldTypeFormat + { + int i; + struct DType1 j; + }; + $DECL_SPEC int fieldTypeFormat(struct FieldTypeFormat param);"; + $SOURCE1 .= " + int fieldTypeFormat(struct FieldTypeFormat param) { return 0; }"; + + $HEADER2 .= " + struct DType2 + { + double i[7]; + int j; + }; + struct FieldTypeFormat + { + int i; + struct DType2 j; + }; + $DECL_SPEC int fieldTypeFormat(struct FieldTypeFormat param);"; + $SOURCE2 .= " + int fieldTypeFormat(struct FieldTypeFormat param) { return 0; }"; # Removed_Virtual_Method (inline) $HEADER1 .= " @@ -878,6 +909,16 @@ sub testCpp() $SOURCE2 .= " int addedFunc(FUNCPTR_TYPE*const** f) { return 0; }"; + # Added (3) + $HEADER2 .= " + struct DStruct + { + int i, j, k; + }; + int addedFunc3(struct DStruct* p);"; + $SOURCE2 .= " + int addedFunc3(struct DStruct* p) { return 0; }"; + # Added_Virtual_Method $HEADER1 .= " class $DECL_SPEC AddedVirtualMethod { @@ -2525,7 +2566,7 @@ sub testCpp() $SOURCE2 .= " int unnamedTypeSize(UnnamedTypeSize param) { return 0; }"; - # constants + # Changed_Constant $HEADER1 .= " #define PUBLIC_CONSTANT \"old_value\""; $HEADER2 .= " @@ -2616,6 +2657,18 @@ sub testCpp() $SOURCE2 .= " int parameterTypedefChange(TYPEDEF_TYPE param) { return 1; }"; + # Parameter_Default_Value_Changed (safe) + # Converted from void* to const char* + $HEADER1 .= " + $DECL_SPEC int paramDefaultValue_Converted(const char* arg = 0); "; + $SOURCE1 .= " + int paramDefaultValue_Converted(const char* arg) { return 0; }"; + + $HEADER2 .= " + $DECL_SPEC int paramDefaultValue_Converted(const char* arg = (const char*)((void*) 0)); "; + $SOURCE2 .= " + int paramDefaultValue_Converted(const char* arg) { return 0; }"; + # Parameter_Default_Value_Changed # Integer $HEADER1 .= " @@ -3066,7 +3119,7 @@ sub testC() struct DType1 { int i; - double j; + double j[7]; }; $DECL_SPEC int parameterTypeFormat(struct DType1 param);"; $SOURCE1 .= " @@ -3075,13 +3128,34 @@ sub testC() $HEADER2 .= " struct DType2 { - double i; + double i[7]; int j; }; $DECL_SPEC int parameterTypeFormat(struct DType2 param);"; $SOURCE2 .= " int parameterTypeFormat(struct DType2 param) { return 0; }"; + # Field_Type_Format + $HEADER1 .= " + struct FieldTypeFormat + { + int i; + struct DType1 j; + }; + $DECL_SPEC int fieldTypeFormat(struct FieldTypeFormat param);"; + $SOURCE1 .= " + int fieldTypeFormat(struct FieldTypeFormat param) { return 0; }"; + + $HEADER2 .= " + struct FieldTypeFormat + { + int i; + struct DType2 j; + }; + $DECL_SPEC int fieldTypeFormat(struct FieldTypeFormat param);"; + $SOURCE2 .= " + int fieldTypeFormat(struct FieldTypeFormat param) { return 0; }"; + # Parameter_Type_Format (struct to union) $HEADER1 .= " struct DType @@ -4161,7 +4235,7 @@ sub testC() $SOURCE2 .= " int unnamedTypeSize(UnnamedTypeSize param) { return 0; }"; - # Changed_Constant + # Changed_Constant (#define) $HEADER1 .= " #define PUBLIC_CONSTANT \"old_value\""; $HEADER2 .= " @@ -4181,6 +4255,46 @@ sub testC() #define PRIVATE_CONSTANT \"new_value\" #undef PRIVATE_CONSTANT"; + # Changed_Constant (enum) + $HEADER1 .= " + enum { + SOME_CONSTANT=0x1 + };"; + $HEADER2 .= " + enum { + SOME_CONSTANT=0x2 + };"; + + # Added_Constant (#define) + $HEADER2 .= " + #define ADDED_CNST \"value\""; + + # Added_Constant (enum) + $HEADER1 .= " + enum { + CONSTANT1 + };"; + $HEADER2 .= " + enum { + CONSTANT1, + ADDED_CONSTANT + };"; + + # Removed_Constant (#define) + $HEADER1 .= " + #define REMOVED_CNST \"value\""; + + # Removed_Constant (enum) + $HEADER1 .= " + enum { + CONSTANT2, + REMOVED_CONSTANT + };"; + $HEADER2 .= " + enum { + CONSTANT2 + };"; + # Added_Field (union) $HEADER1 .= " union UnionTypeAddedField @@ -4528,6 +4642,14 @@ sub runTests($$$$$$$$) printMsg("INFO", "running @Cmd"); } system(@Cmd); + + my $ECode = $?>>8; + + if($ECode!~/\A[0-1]\Z/) + { # error + exitStatus("Error", "analysis has failed"); + } + my $RPath = "compat_reports/$LibName/1.0_to_2.0/compat_report.$ReportFormat"; my $NProblems = 0; if($ReportFormat eq "xml") diff --git a/modules/Internals/Styles/Report.css b/modules/Internals/Styles/Report.css index 7788703..cce5aca 100644 --- a/modules/Internals/Styles/Report.css +++ b/modules/Internals/Styles/Report.css @@ -101,10 +101,6 @@ span.sym_p { font-weight:normal; white-space:normal; } -span.sym_kind { - color:Black; - font-weight:normal; -} div.affect { padding-left:15px; padding-bottom:4px; @@ -200,6 +196,11 @@ span.mangled { span.sym_ver { color:#333333; white-space:nowrap; + font-family:"DejaVu Sans Mono", Monospace; +} +span.attr { + color:#333333; + font-weight:100; } span.color_p { font-style:italic; diff --git a/modules/Internals/SysCheck.pm b/modules/Internals/SysCheck.pm index 861cda9..c49a065 100644 --- a/modules/Internals/SysCheck.pm +++ b/modules/Internals/SysCheck.pm @@ -4,7 +4,7 @@ # Copyright (C) 2009-2010 The Linux Foundation # Copyright (C) 2009-2011 Institute for System Programming, RAS # Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2011-2012 ROSA Laboratory +# Copyright (C) 2011-2013 ROSA Laboratory # # Written by Andrey Ponomarenko # @@ -24,6 +24,7 @@ use strict; use File::Temp qw(tempdir); use Cwd qw(abs_path cwd); +use Fcntl; my ($Debug, $Quiet, $LogMode, $CheckHeadersOnly, $SystemRoot, $MODULES_DIR, $GCC_PATH, $CrossPrefix, $TargetSysInfo, $TargetLibraryName, $CrossGcc, $UseStaticLibs, $NoStdInc, diff --git a/modules/Internals/XmlDump.pm b/modules/Internals/XmlDump.pm index 23b10c6..5469d24 100644 --- a/modules/Internals/XmlDump.pm +++ b/modules/Internals/XmlDump.pm @@ -4,7 +4,7 @@ # Copyright (C) 2009-2010 The Linux Foundation # Copyright (C) 2009-2011 Institute for System Programming, RAS # Copyright (C) 2011-2012 Nokia Corporation and/or its subsidiary(-ies) -# Copyright (C) 2011-2012 ROSA Laboratory +# Copyright (C) 2011-2013 ROSA Laboratory # # Written by Andrey Ponomarenko # diff --git a/modules/RulesBin.xml b/modules/RulesBin.xml index da82ff8..5b4bbe3 100644 --- a/modules/RulesBin.xml +++ b/modules/RulesBin.xml @@ -1527,7 +1527,25 @@ Base type has been changed from @old_value to @new_value. </change> <effect> - Possible incorrect initialization of parameters by applications. + Replacement of the base data type may indicate a change in its semantic meaning. + </effect> +</rule> + +<rule> + <id> + Typedef_BaseType_Format + </id> + <severity> + Medium + </severity> + <kind> + Types + </kind> + <change> + Base type has been changed from @old_value to @new_value of different format. + </change> + <effect> + The fields or parameters of such data type may be incorrectly initialized or accessed by old client applications. </effect> </rule> @@ -1866,7 +1884,7 @@ Parameter_BaseType_And_Size </id> <severity> - Low + Medium </severity> <kind> Parameters @@ -1875,7 +1893,7 @@ Base type of @param_pos parameter @target has been changed from @old_value (@old_size) to @new_value (@new_size). </change> <effect> - Memory stored by pointer may be incorrectly initialized by applications. + This parameter may be incorrectly initialized by applications. </effect> </rule> @@ -2716,6 +2734,42 @@ <rule> <id> + Added_Constant + </id> + <severity> + Safe + </severity> + <kind> + Constants + </kind> + <change> + The constant @target with value @new_value has been added. + </change> + <effect> + No effect. + </effect> +</rule> + +<rule> + <id> + Removed_Constant + </id> + <severity> + Low + </severity> + <kind> + Constants + </kind> + <change> + The constant @target with value @old_value has been removed. + </change> + <effect> + The value of this constant may no longer be properly handled by new-version library functions. + </effect> +</rule> + +<rule> + <id> Field_Became_Volatile </id> <severity> diff --git a/modules/RulesSrc.xml b/modules/RulesSrc.xml index dfec89b..90dd532 100644 --- a/modules/RulesSrc.xml +++ b/modules/RulesSrc.xml @@ -204,7 +204,7 @@ Added_Field </id> <severity> - Safe + Low </severity> <kind> Fields @@ -213,7 +213,7 @@ Field @target has been added to this type. </change> <effect> - No effect. + This field will not be initialized or used by old client applications. </effect> </rule> @@ -399,6 +399,24 @@ <rule> <id> + Typedef_BaseType_Format + </id> + <severity> + Low + </severity> + <kind> + Types + </kind> + <change> + Base type has been changed from @old_value to @new_value of different format. + </change> + <effect> + Recompilation of a client program may be broken. + </effect> +</rule> + +<rule> + <id> Added_Symbol </id> <severity> @@ -981,6 +999,42 @@ <rule> <id> + Added_Constant + </id> + <severity> + Safe + </severity> + <kind> + Constants + </kind> + <change> + The constant @target with value @new_value has been added. + </change> + <effect> + No effect. + </effect> +</rule> + +<rule> + <id> + Removed_Constant + </id> + <severity> + Low + </severity> + <kind> + Constants + </kind> + <change> + The constant @target with value @old_value has been removed. + </change> + <effect> + Recompilation of a client program may be broken. + </effect> +</rule> + +<rule> + <id> Field_Type_Format </id> <severity> |