aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrey Ponomarenko <aponomarenko@rosalab.ru>2013-02-07 19:11:42 +0400
committerAndrey Ponomarenko <aponomarenko@rosalab.ru>2013-02-07 19:11:42 +0400
commit8f4b981ae1f0ff8962e14c17229f6fc512d12f6a (patch)
treec01f85b73925c2c3662fb5b91c023043192a0b35 /modules
parent74b33ee9348fd163e65f1879e860c7067ae2f61f (diff)
downloadabi-compliance-checker-8f4b981ae1f0ff8962e14c17229f6fc512d12f6a.tar.gz
ABI Compliance Checker 1.98.8
Diffstat (limited to 'modules')
-rw-r--r--modules/Internals/CallConv.pm2
-rw-r--r--modules/Internals/RegTests.pm140
-rw-r--r--modules/Internals/Styles/Report.css9
-rw-r--r--modules/Internals/SysCheck.pm3
-rw-r--r--modules/Internals/XmlDump.pm2
-rw-r--r--modules/RulesBin.xml60
-rw-r--r--modules/RulesSrc.xml58
7 files changed, 253 insertions, 21 deletions
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>