mirror of
https://github.com/boostorg/system.git
synced 2025-08-02 13:54:28 +02:00
Do not test boost::throws() under -fsanitize=undefined
This commit is contained in:
@@ -264,7 +264,7 @@ install:
|
|||||||
script:
|
script:
|
||||||
- |-
|
- |-
|
||||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||||
- ./b2 -j3 libs/system/test toolset=$TOOLSET cxxstd=$CXXSTD ${UBSAN:+cxxflags=-fsanitize=undefined} ${UBSAN:+cxxflags=-fno-sanitize-recover=undefined} ${UBSAN:+linkflags=-fsanitize=undefined}
|
- ./b2 -j3 libs/system/test toolset=$TOOLSET cxxstd=$CXXSTD ${UBSAN:+cxxflags=-fsanitize=undefined} ${UBSAN:+cxxflags=-fno-sanitize-recover=undefined} ${UBSAN:+linkflags=-fsanitize=undefined} ${UBSAN:+define=UBSAN=1}
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <boost/cerrno.hpp>
|
#include <boost/cerrno.hpp>
|
||||||
|
#include <boost/config/pragma_message.hpp>
|
||||||
|
|
||||||
// Although using directives are not the best programming practice, testing
|
// Although using directives are not the best programming practice, testing
|
||||||
// with a boost::system using directive increases use scenario coverage.
|
// with a boost::system using directive increases use scenario coverage.
|
||||||
@@ -246,8 +247,17 @@ int main( int, char ** )
|
|||||||
BOOST_TEST( econd.message() != "" );
|
BOOST_TEST( econd.message() != "" );
|
||||||
BOOST_TEST( econd.message().substr( 0, 13) != "Unknown error" );
|
BOOST_TEST( econd.message().substr( 0, 13) != "Unknown error" );
|
||||||
|
|
||||||
|
#if !defined(UBSAN)
|
||||||
|
|
||||||
|
// the current implementation of boost::throws() relies on undefined behavior
|
||||||
test_throws_usage();
|
test_throws_usage();
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE("Skipping test_throws_usage() due to UBSAN");
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BOOST_WINDOWS_API
|
#ifdef BOOST_WINDOWS_API
|
||||||
std::cout << "Windows tests...\n";
|
std::cout << "Windows tests...\n";
|
||||||
// these tests probe the Windows errc decoder
|
// these tests probe the Windows errc decoder
|
||||||
|
Reference in New Issue
Block a user