[PATCH] libstdc++: fix pointer type exception catch [PR105387]
Jakob Hasse
jakob.hasse@espressif.com
Tue May 3 10:56:46 GMT 2022
This is a patch for the bug 105387 reported in bugzilla: 105387 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105387. This report should contain all the necessary information about the issue. But the patch there was just a preliminary one.
I created a proper patch with the fix and a test case, based on TAG releases/gcc-11.2.0 (7ca388565af176bd4efd4f8db1e5e9e11e98ef45). The changelog is part of the commit message in the patch.
# TESTS
First, I tested only the test case with and without the actual fix, gcc configuration: ../configure -prefix=/usr --enable-languages=c,c++ --enable-multiarch --host=x86_64-linux-gnu --build=x86_64-linux-gnu --target=x86_64-linux-gnu --enable-cxx-flags=-fno-rtti
=== libstdc++ Summary ===
# of expected passes 1
# of unexpected failures 1
With the fix:
=== libstdc++ Summary ===
# of expected passes 2
Then, I tested without RTTI. The gcc configuration was: ../configure -prefix=/usr --enable-languages=c,c++ --enable-multiarch --host=x86_64-linux-gnu --build=x86_64-linux-gnu --target=x86_64-linux-gnu --enable-cxx-flags=-fno-rtti
Without the patch:
=== libstdc++ Summary ===
# of expected passes 14006
# of unexpected failures 114
# of expected failures 104
# of unresolved testcases 84
# of unsupported tests 663
With the patch:
=== libstdc++ Summary ===
# of expected passes 14007
# of unexpected failures 113
# of expected failures 104
# of unresolved testcases 84
# of unsupported tests 664
Number of unexpected failures went down by one and the number of unsupported tests went up by one. 17_intro/headers/c++1998/49745.cc suddenly passes, 22_locale/time_get/get_date/wchar_t/4.cc is suddenly unsupported. I don't know why.
I also tested the entire libstdc++ test suite with RTTI enabled, i.e.: ../configure -prefix=/usr --enable-languages=c,c++ --enable-multiarch --host=x86_64-linux-gnu --build=x86_64-linux-gnu --target=x86_64-linux-gnu --enable-cxx-flags=-frtti
Without patch:
=== libstdc++ Summary ===
# of expected passes 14201
# of unexpected failures 3
# of expected failures 104
# of unsupported tests 663
With patch:
=== libstdc++ Summary ===
# of expected passes 14202
# of unexpected failures 2
# of expected failures 104
# of unsupported tests 664
Same symptoms as when running the entire libstdc++ test suite without RTTI.
I'm not sure why the tests behave different, they seem unrelated.
I would be happy to receive feedback, in particular if parts have to be improved or additional information is necessary. I'm completely new to gcc, I'd appreciate concrete recommendations what to do.
Thanks,
Jakob Hasse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-v3-Check-for-ptr-in-__pbase_type_info-__do_c.patch
Type: text/x-patch
Size: 4386 bytes
Desc: 0001-libstdc-v3-Check-for-ptr-in-__pbase_type_info-__do_c.patch
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20220503/80094a99/attachment-0001.bin>
More information about the Libstdc++
mailing list