mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Enable asan workaround in optimizer test for gcc as well.
This commit is contained in:
parent
6956ea1e9e
commit
77729023a8
@ -487,11 +487,14 @@ BOOST_AUTO_TEST_CASE(constant_optimization_early_exit)
|
|||||||
double duration = std::chrono::duration<double>(std::chrono::steady_clock::now() - start).count();
|
double duration = std::chrono::duration<double>(std::chrono::steady_clock::now() - start).count();
|
||||||
// Since run time on an ASan build is not really realistic, we disable this test for those builds.
|
// Since run time on an ASan build is not really realistic, we disable this test for those builds.
|
||||||
size_t maxDuration = 20;
|
size_t maxDuration = 20;
|
||||||
#if defined(__has_feature)
|
#if !defined(__SANITIZE_ADDRESS__) && defined(__has_feature)
|
||||||
#if __has_feature(address_sanitizer)
|
#if __has_feature(address_sanitizer)
|
||||||
|
#define __SANITIZE_ADDRESS__ 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if __SANITIZE_ADDRESS__
|
||||||
maxDuration = size_t(-1);
|
maxDuration = size_t(-1);
|
||||||
BOOST_TEST_MESSAGE("Disabled constant optimizer run time check for address sanitizer build.");
|
BOOST_TEST_MESSAGE("Disabled constant optimizer run time check for address sanitizer build.");
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
BOOST_CHECK_MESSAGE(duration <= maxDuration, "Compilation of constants took longer than 20 seconds.");
|
BOOST_CHECK_MESSAGE(duration <= maxDuration, "Compilation of constants took longer than 20 seconds.");
|
||||||
compareVersions("hexEncodeTest(address)", u256(0x123456789));
|
compareVersions("hexEncodeTest(address)", u256(0x123456789));
|
||||||
|
Loading…
Reference in New Issue
Block a user