This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
> I'm testing it by adding a 50-integer array to the declaration of > std::nothrow_t. So tomorrow's log should show a "problem" when the > std::nothrow object has changed in size from 1 byte to 200. After verifying > that everything can work without human handholding, I'll fix the code back > and start getting real reports on Tuesday. It looks like this works, thanks. This is the test with switching the libstdc++.so binary between trees? Cool. I've attached another kind of tester. I cannot figure out how to integrate it into the libstdc++-v3/testsuite Makefile, now that this Makefile has a library as it's target. Maybe it's just late. Maybe that's the wrong place. The attached archive has a small c++ program to munge readelf output and provide output that is a bit easier for people to understand than diff. It also contains text representations of baselines for 3.2.0 and 3.3.0 exported symbol output, so that if somebody else wants to deal another way, they can. The goal is to have something that makes it exceptionally obvious when things break, and why. For instance, running this on x86/linux on the 3.3 tree gives: 0 added symbols: 3 missing symbols: _ZNSt24__default_alloc_templateILb1ELi0EE10reallocateEPvjj _ZSt24__uninitialized_copy_auxIN9__gnu_cxx17__normal_iteratorIPKSsSt6vectorISsSaISsEEEEPSsET0_T_SA_S9_12__false_type _ZSt26__uninitialized_fill_n_auxIPSsjSsET_S1_T0_RKT1_12__false_type 0 incompatible symbols: This can be improved, but hey. I think it's still useful. To that end, here is what I propose. Add 'make check-abi' in libstdc++-v3/testsuite, which is off by default. When run, the following: 1) build abi-checker app 2) generate current list of exported symbols from libstdc++.so 3) run abi-checker app against known baseline and test list, report issues Thoughts? This should allow people on x86/linux to verify changes don't mess with the "stable" 3.2.0 libstdc++ abi. Obviously, there are issues, some of which are: 1) as written, sizes of exported object are for x86/linux and may not be portable to other oses and cpu's... I'm hoping I can get somebody like Loren (please) to test on x86/BSD to see how far off I am. This isn't a super big deal to me, because all I was really trying to check was the list of exported symbols, which should remain constant across cpus (?). It's easy to change what is being compared, so comparing sizes of objects can be turned off. 2) testsuite integration (util subdir? makefile work? checking for all the readelf deps? anyway......) 3) doesn't test vtable or object layout, or alignment issues. It would be possible to add at some later date, but the formalization of the abi checking has to start somewhere. 4) generating the exported symbol list. Weak symbols cannot be completely ignored, as a bunch of the template linkage is weak. So, I've included them. I'm still not exactly sure I'm getting all the exported symbols but I think this is really close. blah blah blah. -benjamin
Attachment:
abi_checker.tar.gz
Description: GNU Zip compressed data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |