Commit c9fd7c7b by Benjamin Kosnik

re PR libstdc++/52191 (abi_check should flag additions to released versions)

2012-02-21  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/52191
	* testsuite/util/testsuite_abi.cc (compare_symbols): Check new
	symbols added into the latest version. Mark tls entities as
	undesignated.

From-SVN: r184639
parent 19c0d7df
2012-02-21 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/52191
* testsuite/util/testsuite_abi.cc (compare_symbols): Check new
symbols added into the latest version. Mark tls entities as
undesignated.
2012-02-28 Jakub Jelinek <jakub@redhat.com> 2012-02-28 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/52414 PR bootstrap/52414
...@@ -37,7 +44,8 @@ ...@@ -37,7 +44,8 @@
2012-02-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 2012-02-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR testsuite/52201 PR testsuite/52201
* testsuite/29_atomics/atomic/operators/pointer_partial_void.cc: Require atomic builtins. * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
Require atomic builtins.
* testsuite/29_atomics/atomic/operators/51811.cc: Likewise. * testsuite/29_atomics/atomic/operators/51811.cc: Likewise.
2012-02-23 Jason Merrill <jason@redhat.com> 2012-02-23 Jason Merrill <jason@redhat.com>
...@@ -88,7 +96,7 @@ ...@@ -88,7 +96,7 @@
* testsuite/26_numerics/random/ * testsuite/26_numerics/random/
geometric_distribution/requirements/typedefs.cc: Ditto. geometric_distribution/requirements/typedefs.cc: Ditto.
2012-02-17 Benjamin Kosnik <bkoz@redhat.com> 2012-02-21 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/50349 PR libstdc++/50349
* config/abi/pre/gnu.ver: Only one local. * config/abi/pre/gnu.ver: Only one local.
......
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// This library is free software; you can redistribute it and/or // This library is free software; you can redistribute it and/or
...@@ -203,10 +203,10 @@ check_version(symbol& test, bool added) ...@@ -203,10 +203,10 @@ check_version(symbol& test, bool added)
known_versions.push_back("CXXABI_1.3.2"); known_versions.push_back("CXXABI_1.3.2");
known_versions.push_back("CXXABI_1.3.3"); known_versions.push_back("CXXABI_1.3.3");
known_versions.push_back("CXXABI_1.3.4"); known_versions.push_back("CXXABI_1.3.4");
known_versions.push_back("CXXABI_TM_1");
known_versions.push_back("CXXABI_1.3.5"); known_versions.push_back("CXXABI_1.3.5");
known_versions.push_back("CXXABI_1.3.6"); known_versions.push_back("CXXABI_1.3.6");
known_versions.push_back("CXXABI_LDBL_1.3"); known_versions.push_back("CXXABI_LDBL_1.3");
known_versions.push_back("CXXABI_TM_1");
} }
compat_list::iterator begin = known_versions.begin(); compat_list::iterator begin = known_versions.begin();
compat_list::iterator end = known_versions.end(); compat_list::iterator end = known_versions.end();
...@@ -221,12 +221,11 @@ check_version(symbol& test, bool added) ...@@ -221,12 +221,11 @@ check_version(symbol& test, bool added)
else else
test.version_status = symbol::incompatible; test.version_status = symbol::incompatible;
// Check that added symbols aren't added in the base versions. // Check that added symbols are added in the latest pre-release version.
if (added bool latestp = (test.version_name == "GLIBCXX_3.4.17"
&& (test.version_name == known_versions[0] || test.version_name == "CXXABI_1.3.6"
|| test.version_name == "CXXABI_1.3" || test.version_name == "CXXABI_TM_1");
|| test.version_name == "GLIBCXX_LDBL_3.4" if (added && !latestp)
|| test.version_name == "CXXABI_LDBL_1.3"))
test.version_status = symbol::incompatible; test.version_status = symbol::incompatible;
// Check that long double compatibility symbols demangled as // Check that long double compatibility symbols demangled as
...@@ -416,6 +415,9 @@ compare_symbols(const char* baseline_file, const char* test_file, ...@@ -416,6 +415,9 @@ compare_symbols(const char* baseline_file, const char* test_file,
typedef pair<symbol, symbol> symbol_pair; typedef pair<symbol, symbol> symbol_pair;
vector<symbol_pair> incompatible; vector<symbol_pair> incompatible;
// Fill out list of undesignated symbols.
vector<symbol> undesignated;
// Check missing names for compatibility. // Check missing names for compatibility.
for (size_t j = 0; j < missing_names.size(); ++j) for (size_t j = 0; j < missing_names.size(); ++j)
{ {
...@@ -440,10 +442,40 @@ compare_symbols(const char* baseline_file, const char* test_file, ...@@ -440,10 +442,40 @@ compare_symbols(const char* baseline_file, const char* test_file,
for (size_t l = 0; l < added_size; ++l) for (size_t l = 0; l < added_size; ++l)
{ {
symbol& stest = test[added_names[l]]; symbol& stest = test[added_names[l]];
// Mark TLS as undesignated, remove from added.
if (stest.type == symbol::tls)
{
stest.status = symbol::undesignated;
if (!check_version(stest, false))
incompatible.push_back(symbol_pair(stest, stest));
else
undesignated.push_back(stest);
}
else
{
stest.status = symbol::added; stest.status = symbol::added;
if (!check_version(stest, true)) if (!check_version(stest, true))
incompatible.push_back(symbol_pair(stest, stest)); incompatible.push_back(symbol_pair(stest, stest));
} }
}
// Normalize added names and undesignated names.
const size_t undesignated_size = undesignated.size();
for (size_t l = 0; l < undesignated_size; ++l)
{
symbol& sundes = undesignated[l];
symbol_names::iterator end = added_names.end();
symbol_names::iterator it = find(added_names.begin(), end, sundes.name);
if (it != end)
{
// Found.
added_names.erase(it);
}
else
__throw_runtime_error(sundes.name.c_str());
}
// Report results. // Report results.
if (verbose && added_names.size()) if (verbose && added_names.size())
...@@ -466,6 +498,20 @@ compare_symbols(const char* baseline_file, const char* test_file, ...@@ -466,6 +498,20 @@ compare_symbols(const char* baseline_file, const char* test_file,
} }
} }
if (verbose && undesignated.size())
{
cout << endl << undesignated.size() << " undesignated symbols " << endl;
for (size_t j = 0; j < undesignated.size() ; ++j)
{
// First, print index.
cout << j << endl;
// Second, report name.
symbol& s = undesignated[j];
s.print();
}
}
if (verbose && incompatible.size()) if (verbose && incompatible.size())
{ {
cout << endl << incompatible.size() << " incompatible symbols " << endl; cout << endl << incompatible.size() << " incompatible symbols " << endl;
...@@ -479,7 +525,7 @@ compare_symbols(const char* baseline_file, const char* test_file, ...@@ -479,7 +525,7 @@ compare_symbols(const char* baseline_file, const char* test_file,
symbol& stest = incompatible[j].second; symbol& stest = incompatible[j].second;
stest.print(); stest.print();
// Second, report reason or reasons incompatible. // Third, report reason or reasons incompatible.
check_compatible(sbase, stest, true); check_compatible(sbase, stest, true);
} }
} }
...@@ -488,6 +534,7 @@ compare_symbols(const char* baseline_file, const char* test_file, ...@@ -488,6 +534,7 @@ compare_symbols(const char* baseline_file, const char* test_file,
cout << endl; cout << endl;
cout << "# of added symbols:\t\t " << added_names.size() << endl; cout << "# of added symbols:\t\t " << added_names.size() << endl;
cout << "# of missing symbols:\t\t " << missing_names.size() << endl; cout << "# of missing symbols:\t\t " << missing_names.size() << endl;
cout << "# of undesignated symbols:\t " << undesignated.size() << endl;
cout << "# of incompatible symbols:\t " << incompatible.size() << endl; cout << "# of incompatible symbols:\t " << incompatible.size() << endl;
cout << endl; cout << endl;
cout << "using: " << baseline_file << endl; cout << "using: " << baseline_file << endl;
...@@ -563,4 +610,3 @@ demangle(const std::string& mangled) ...@@ -563,4 +610,3 @@ demangle(const std::string& mangled)
} }
return name; return name;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment