Hide Forgot
Description of problem: Almost all of the Dyninst g++ subtests fail. Version-Release number of selected component (if applicable): dyninst-testsuite-8.1.2-4.fc20.x86_64 How reproducible: 100% Steps to Reproduce: 1. cd /usr/lib64/dyninst/testsuite 2. ./runTests -all -g++ Actual results: Many report FAILED right away. Expected results: Results should be similar to "./runTests -all -gcc". The testsuite is not really robust enough to have zero failures, but compiling testcases as C or C++ shouldn't make so much difference. Additional info:
The primary difference I found is that all the testsuite/*_g++_* files were compiled with optimization, while testsuite/*_gcc_* files were not. Dyninst actually has the option to compile its testsuite at multiple optimization variants, but the default is just unoptimized. I've been advised by upstream not to bother with the optimization though, because most of the testcases are not designed well enough to deal with it. For instance, the compiler might optimize a single read for repeated access to an apparently-unchanging variable, but really some instrumentation intends to change it. Some cases like this could be solved, adding "volatile" for instance, but it would be a big undertaking to get all testcases in shape for this. Note, it's no issue for the main libraries -- they can and should be optimized like normal. This is only a concern for the testsuite binaries. I found this commit made between 8.1.1 and 8.1.2: commit 5f8c0afd6d3667a0d003cb987bfefacc5ac20787 Author: Bill Williams <bill.edu> Date: Tue May 21 11:47:46 2013 -0500 Ensure that we compile test suite and Dyninst with the same CXXFLAGS to work around gcc 4.7.2 bug That bug is the std::pair ABI break between C++98 and C++11 (which is actually gcc 4.7.0 and 4.7.1 only). In a direct build, this commit only ends up adding the global "-std=c++0x" or "-std=c++11" flag to the testsuite, but the way it's written also picks up all the rpmbuild flags, including optimization. It should be fine to just hard-code -std=c++11 for Fedora builds.