/// cv-qualifier change.
FN_RETURN_TYPE_CV_CHANGE_CATEGORY = 1 << 15,
+ /// A diff node in this category is for a variable which type holds
+ /// a cv-qualifier change.
+ VAR_TYPE_CV_CHANGE_CATEGORY = 1 << 16,
+
/// A diff node in this category carries a change from void pointer
/// to non-void pointer.
- VOID_PTR_TO_PTR_CHANGE_CATEGORY = 1 << 16,
+ VOID_PTR_TO_PTR_CHANGE_CATEGORY = 1 << 17,
/// A diff node in this category carries a change in the size of the
/// array type of a global variable, but the ELF size of the
/// variable didn't change.
- BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY = 1 << 17,
+ BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY = 1 << 18,
/// A special enumerator that is the logical 'or' all the
/// enumerators above.
///
| FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY
| FN_PARM_TYPE_CV_CHANGE_CATEGORY
| FN_RETURN_TYPE_CV_CHANGE_CATEGORY
+ | VAR_TYPE_CV_CHANGE_CATEGORY
| VOID_PTR_TO_PTR_CHANGE_CATEGORY
| BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY
}; // enum diff_category
bool
equals(const var_decl&, const var_decl&, change_kind*);
+bool
+equals_modulo_cv_qualifier(const array_type_def*, const array_type_def*);
+
/// Abstracts a variable declaration.
class var_decl : public virtual decl_base
{
f = peel_qualified_type(f);
s = peel_qualified_type(s);
+ // If f and s are arrays, note that they can differ only by the cv
+ // qualifier of the array element type. That cv qualifier is not
+ // removed by peel_qualified_type. So we need to test this case
+ // specifically.
+ if (array_type_def *f_a = is_array_type(f))
+ if (array_type_def *s_a = is_array_type(s))
+ return equals_modulo_cv_qualifier(f_a, s_a);
+
return *f == *s;
}
return type_diff_has_cv_qual_change_only(return_type_diff);
}
+/// Test if a variable diff node carries a CV qualifier change on its type.
+///
+/// @param dif the diff node to consider. Note that if it's not of
+/// var_diff type, the function returns false.
+///
+/// @return true iff the @p dif carries a CV qualifier change on its
+/// type.
+static bool
+has_var_type_cv_qual_change(const diff* dif)
+{
+ const var_diff *var_dif = is_var_diff(dif);
+ if (!var_dif)
+ return false;
+
+ {
+ // Make sure the variable diff does carry a type change at least
+ change_kind ch_kind;
+ if (equals(*var_dif->first_var(), *var_dif->second_var(), &ch_kind))
+ return false;
+
+ if (!(ch_kind & LOCAL_TYPE_CHANGE_KIND || ch_kind & SUBTYPE_CHANGE_KIND))
+ return false;
+ }
+
+ diff *type_dif = var_dif->type_diff().get();
+ ABG_ASSERT(type_dif);
+
+ return type_diff_has_cv_qual_change_only(type_dif);
+}
+
/// Test if a diff node carries a void* to pointer type change.
///
/// Note that this function looks through typedef and qualifier types
if (has_fn_return_type_cv_qual_change(d))
category |= FN_RETURN_TYPE_CV_CHANGE_CATEGORY;
+ if (has_var_type_cv_qual_change(d))
+ category |= VAR_TYPE_CV_CHANGE_CATEGORY;
+
if (has_void_ptr_to_ptr_change(d))
category |= VOID_PTR_TO_PTR_CHANGE_CATEGORY;
| abigail::comparison::FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY
| abigail::comparison::FN_PARM_TYPE_CV_CHANGE_CATEGORY
| abigail::comparison::FN_RETURN_TYPE_CV_CHANGE_CATEGORY
+ | abigail::comparison::VAR_TYPE_CV_CHANGE_CATEGORY
| abigail::comparison::VOID_PTR_TO_PTR_CHANGE_CATEGORY
| abigail::comparison::BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY);
}
emitted_a_category |= true;
}
+ if (c & VAR_TYPE_CV_CHANGE_CATEGORY)
+ {
+ if (emitted_a_category)
+ o << "|";
+ o << "VAR_TYPE_CV_CHANGE_CATEGORY";
+ emitted_a_category |= true;
+ }
+
if (c & VOID_PTR_TO_PTR_CHANGE_CATEGORY)
{
if (emitted_a_category)
return result;
}
+/// Test if two variables are equals modulo CV qualifiers.
+///
+/// @param l the first array of the comparison.
+///
+/// @param r the second array of the comparison.
+///
+/// @return true iff @p l equals @p r or, if they are different, the
+/// difference between the too is just a matter of CV qualifiers.
+bool
+equals_modulo_cv_qualifier(const array_type_def* l, const array_type_def* r)
+{
+ if (l == r)
+ return true;
+
+ if (!l || !r)
+ return false;
+
+ l = is_array_type(peel_qualified_or_typedef_type(l));
+ r = is_array_type(peel_qualified_or_typedef_type(r));
+
+ std::vector<array_type_def::subrange_sptr > this_subs = l->get_subranges();
+ std::vector<array_type_def::subrange_sptr > other_subs = r->get_subranges();
+
+ if (this_subs.size() != other_subs.size())
+ return false;
+
+ std::vector<array_type_def::subrange_sptr >::const_iterator i,j;
+ for (i = this_subs.begin(), j = other_subs.begin();
+ i != this_subs.end() && j != other_subs.end();
+ ++i, ++j)
+ if (**i != **j)
+ return false;
+
+ type_base *first_element_type =
+ peel_qualified_or_typedef_type(l->get_element_type().get());
+ type_base *second_element_type =
+ peel_qualified_or_typedef_type(r->get_element_type().get());
+
+ if (*first_element_type != *second_element_type)
+ return false;
+
+ return true;
+}
+
/// Get the language of the array.
///
/// @return the language of the array.
test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64.rpm \
test-diff-pkg/elfutils-libs-0.171-1.el7.x86_64.rpm \
test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt \
+test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64.rpm \
+test-diff-pkg/nss-3.24.0-1.0.fc23.x86_64.rpm \
+test-diff-pkg/nss-debuginfo-3.23.0-1.0.fc23.x86_64.rpm \
+test-diff-pkg/nss-debuginfo-3.24.0-1.0.fc23.x86_64.rpm \
+test-diff-pkg/nss-devel-3.23.0-1.0.fc23.x86_64.rpm \
+test-diff-pkg/nss-devel-3.24.0-1.0.fc23.x86_64.rpm \
+test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt \
\
test-fedabipkgdiff/dbus-glib-0.104-3.fc23.x86_64.rpm \
test-fedabipkgdiff/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm \
type of '_Xtransport* _XtransConnInfo::transptr' changed:
in pointed to type 'struct _Xtransport' at Xtransint.h:158:1:
type size hasn't changed
- 5 data member changes (14 filtered):
- type of 'char* _Xtransport::TransName' changed:
- in pointed to type 'char':
- entity changed from 'char' to 'const char'
- type size hasn't changed
-
+ 3 data member changes (16 filtered):
type of 'typedef XtransConnInfo (_Xtransport*, char*, char*, char*)* _Xtransport::OpenCOTSClient' changed:
in pointed to type 'function type typedef XtransConnInfo (_Xtransport*, char*, char*, char*)':
parameter 2 of type 'char*' changed:
entity changed from 'char' to 'const char'
type size hasn't changed
- type of 'char** _Xtransport::nolisten' changed:
- in pointed to type 'char*':
- in pointed to type 'char':
- entity changed from 'char' to 'const char'
- type size hasn't changed
-
type of 'typedef XtransConnInfo (_Xtransport*, char*, char*, char*)* _Xtransport::OpenCOTSServer' changed:
in pointed to type 'function type typedef XtransConnInfo (_Xtransport*, char*, char*, char*)':
parameter 2 of type 'char*' changed:
--- /dev/null
+================ changes of 'libnss3.so'===============
+ Functions changes summary: 0 Removed, 1 Changed (62 filtered out), 0 Added functions
+ Variables changes summary: 0 Removed, 0 Changed (36 filtered out), 0 Added variables
+
+ 1 function with some indirect sub-type change:
+
+ [C]'function SECStatus CERT_AddOCSPAcceptableResponses(CERTOCSPRequest*, SECOidTag, ...)' at ocsp.c:2199:1 has some indirect sub-type changes:
+ parameter 2 of type 'typedef SECOidTag' has sub-type changes:
+ underlying type 'enum __anonymous_enum__' at secoidt.h:34:1 changed:
+ type size hasn't changed
+ 1 enumerator insertion:
+ '__anonymous_enum__::SEC_OID_TLS_ECDHE_PSK' value '347'
+
+ 1 enumerator change:
+ '__anonymous_enum__::SEC_OID_TOTAL' from value '347' to '348' at secoidt.h:34:1
+
+
+
+================ end of changes of 'libnss3.so'===============
+
+================ changes of 'libssl3.so'===============
+ Functions changes summary: 0 Removed, 2 Changed (7 filtered out), 1 Added functions
+ Variables changes summary: 0 Removed, 1 Changed, 0 Added variable
+
+ 1 Added function:
+
+ 'function SECStatus SSL_ConfigServerCert(PRFileDesc*, CERTCertificate*, SECKEYPrivateKey*, const SSLExtraServerCertData*, unsigned int)' {SSL_ConfigServerCert@@NSS_3.24}
+
+ 2 functions with some indirect sub-type change:
+
+ [C]'function SSLKEAType NSS_FindCertKEAType(CERTCertificate*)' at sslcert.c:939:1 has some indirect sub-type changes:
+ return type changed:
+ underlying type 'enum __anonymous_enum__' at sslt.h:38:1 changed:
+ type size hasn't changed
+ 1 enumerator insertion:
+ '__anonymous_enum__::ssl_kea_ecdh_psk' value '5'
+
+ 1 enumerator change:
+ '__anonymous_enum__::ssl_kea_size' from value '5' to '6' at sslt.h:40:1
+
+
+ [C]'function SECStatus SSL_GetCipherSuiteInfo(PRUint16, SSLCipherSuiteInfo*, PRUintn)' at sslinfo.c:294:1 has some indirect sub-type changes:
+ parameter 2 of type 'SSLCipherSuiteInfo*' has sub-type changes:
+ in pointed to type 'typedef SSLCipherSuiteInfo' at sslt.h:252:1:
+ underlying type 'struct SSLCipherSuiteInfoStr' at sslt.h:178:1 changed:
+ type size hasn't changed
+ 1 data member insertion:
+ 'SSLAuthType SSLCipherSuiteInfoStr::authType', at offset 736 (in bits) at sslt.h:250:1
+ 1 data member changes (1 filtered):
+ type of 'SSLAuthType SSLCipherSuiteInfoStr::authAlgorithm' changed:
+ underlying type 'enum __anonymous_enum__' at sslt.h:87:1 changed:
+ type size hasn't changed
+ 1 enumerator deletion:
+ '__anonymous_enum__::ssl_auth_rsa' value '1'
+
+ 7 enumerator insertions:
+ '__anonymous_enum__::ssl_auth_rsa_decrypt' value '1'
+ '__anonymous_enum__::ssl_auth_ecdh_rsa' value '5'
+ '__anonymous_enum__::ssl_auth_ecdh_ecdsa' value '6'
+ '__anonymous_enum__::ssl_auth_rsa_sign' value '7'
+ '__anonymous_enum__::ssl_auth_rsa_pss' value '8'
+ '__anonymous_enum__::ssl_auth_psk' value '9'
+ '__anonymous_enum__::ssl_auth_size' value '10'
+
+
+
+
+ 1 Changed variable:
+
+ [C]'PRUint16[74] const SSL_ImplementedCiphers' was changed to 'const PRUint16[69] const SSL_ImplementedCiphers' at sslenum.c:51:1:
+ size of symbol changed from 148 to 138
+ type of variable changed:
+ 'PRUint16[74] const' changed to 'const PRUint16[69] const'
+
+
+================ end of changes of 'libssl3.so'===============
+
+================ changes of 'libsmime3.so'===============
+ Functions changes summary: 0 Removed, 1 Changed (127 filtered out), 0 Added functions
+ Variables changes summary: 0 Removed, 0 Changed (2 filtered out), 0 Added variables
+
+ 1 function with some indirect sub-type change:
+
+ [C]'function PK11SymKey* NSS_CMSContentInfo_GetBulkKey(NSSCMSContentInfo*)' at cmscinfo.c:359:1 has some indirect sub-type changes:
+ parameter 1 of type 'NSSCMSContentInfo*' has sub-type changes:
+ in pointed to type 'typedef NSSCMSContentInfo' at cmst.h:54:1:
+ underlying type 'struct NSSCMSContentInfoStr' at cmst.h:131:1 changed:
+ type size hasn't changed
+ 1 data member changes (2 filtered):
+ type of 'NSSCMSContent NSSCMSContentInfoStr::content' changed:
+ underlying type 'union NSSCMSContentUnion' at cmst.h:118:1 changed:
+ type size hasn't changed
+ 1 data member changes (3 filtered):
+ type of 'NSSCMSEncryptedData* NSSCMSContentUnion::encryptedData' changed:
+ in pointed to type 'typedef NSSCMSEncryptedData' at cmst.h:65:1:
+ underlying type 'struct NSSCMSEncryptedDataStr' at cmst.h:468:1 changed:
+ type size hasn't changed
+ 1 data member changes (1 filtered):
+ type of 'NSSCMSAttribute** NSSCMSEncryptedDataStr::unprotectedAttr' changed:
+ in pointed to type 'NSSCMSAttribute*':
+ in pointed to type 'typedef NSSCMSAttribute' at cmst.h:69:1:
+ underlying type 'struct NSSCMSAttributeStr' at cmst.h:487:1 changed:
+ type size hasn't changed
+ 1 data member change:
+ type of 'SECOidData* NSSCMSAttributeStr::typeTag' changed:
+ in pointed to type 'typedef SECOidData' at secoidt.h:16:1:
+ underlying type 'struct SECOidDataStr' at secoidt.h:500:1 changed:
+ type size hasn't changed
+ 1 data member change:
+ type of 'SECOidTag SECOidDataStr::offset' changed:
+ underlying type 'enum __anonymous_enum__' at secoidt.h:34:1 changed:
+ type size hasn't changed
+ 1 enumerator insertion:
+ '__anonymous_enum__::SEC_OID_TLS_ECDHE_PSK' value '347'
+
+ 1 enumerator change:
+ '__anonymous_enum__::SEC_OID_TOTAL' from value '347' to '348' at secoidt.h:34:1
+
+
+
+
+
+
+
+
+================ end of changes of 'libsmime3.so'===============
+
type of 'RedChannel MainChannel::base' changed:
underlying type 'struct RedChannel' at red_channel.h:303:1 changed:
type size hasn't changed
- 2 data member changes (1 filtered):
- type of 'SpiceCoreInterface* RedChannel::core' changed:
- in pointed to type 'typedef SpiceCoreInterface':
- entity changed from 'typedef SpiceCoreInterface' to 'const SpiceCoreInterface'
- type size hasn't changed
-
+ 1 data member changes (2 filtered):
type of 'ChannelCbs RedChannel::channel_cbs' changed:
underlying type 'struct {channel_configure_socket_proc config_socket; channel_disconnect_proc on_disconnect; channel_send_pipe_item_proc send_item; channel_hold_pipe_item_proc hold_item; channel_release_pipe_item_proc release_item; channel_alloc_msg_recv_buf_proc alloc_recv_buf; channel_release_msg_recv_buf_proc release_recv_buf; channel_handle_migrate_flush_mark_proc handle_migrate_flush_mark; channel_handle_migrate_data_proc handle_migrate_data; channel_handle_migrate_data_get_serial_proc handle_migrate_data_get_serial;}' at red_channel.h:195:1 changed:
type size hasn't changed
"data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt",
"output/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt"
},
+ {
+ "data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64.rpm",
+ "data/test-diff-pkg/nss-3.24.0-1.0.fc23.x86_64.rpm",
+ "--fail-no-dbg",
+ "",
+ "data/test-diff-pkg/nss-debuginfo-3.23.0-1.0.fc23.x86_64.rpm",
+ "data/test-diff-pkg/nss-debuginfo-3.24.0-1.0.fc23.x86_64.rpm",
+ "data/test-diff-pkg/nss-devel-3.23.0-1.0.fc23.x86_64.rpm",
+ "data/test-diff-pkg/nss-devel-3.24.0-1.0.fc23.x86_64.rpm",
+ "data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt",
+ "output/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt"
+ },
#endif //WITH_RPM
#ifdef WITH_DEB