Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubsan fixes v2 #292

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions include/boost/archive/detail/interface_oarchive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ class interface_oarchive
typedef mpl::bool_<true> is_saving;

// return a pointer to the most derived class
#if BOOST_WORKAROUND(BOOST_GCC_VERSION,>=40900)||\
BOOST_WORKAROUND(BOOST_CLANG,>=1)&&\
(__clang_major__>3 || __clang_major__==3 && __clang_minor__ >= 8)
/* https://github.com/boostorg/poly_collection/issues/15 */

__attribute__((no_sanitize("undefined")))
#endif
Archive * This(){
return static_cast<Archive*>(this);
}
Expand Down
5 changes: 3 additions & 2 deletions include/boost/archive/impl/xml_oarchive_impl.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ BOOST_ARCHIVE_DECL
xml_oarchive_impl<Archive>::~xml_oarchive_impl(){
if(boost::core::uncaught_exceptions() > 0)
return;
if(0 == (this->get_flags() & no_header))
this->windup();
if(0 == (this->get_flags() & no_header)){
this->put("</boost_serialization>\n");
}
}

} // namespace archive
Expand Down
8 changes: 2 additions & 6 deletions include/boost/serialization/extended_type_info_no_rtti.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,9 @@ class extended_type_info_no_rtti :
}
};
public:
#if BOOST_WORKAROUND(BOOST_GCC_VERSION,>=40900)||\
BOOST_WORKAROUND(BOOST_CLANG,>=1)&&\
(__clang_major__>3 || __clang_major__==3 && __clang_minor__ >= 8)
__attribute__((no_sanitize("undefined")))
#endif
extended_type_info_no_rtti() :
no_rtti_system::extended_type_info_no_rtti_0(get_key())
no_rtti_system::extended_type_info_no_rtti_0(
action<guid_defined< T >::value >::invoke())
{
key_register();
}
Expand Down
Loading