From: Paul Floyd Date: Sun, 16 Feb 2025 08:36:54 +0000 (+0100) Subject: Illumos regtest: update bug487993 testcase X-Git-Tag: VALGRIND_3_25_0~137 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=350f0028fcd8ae6db5b0500ed32fc9aa75ab9e7e;p=thirdparty%2Fvalgrind.git Illumos regtest: update bug487993 testcase As I said in bugzilla, "Not tested on Solaris". Now I've tested it and Illumos libc doesn't use 16byte alignment (or at least the assert that alignment is 16bytes fails). --- diff --git a/memcheck/tests/x86/bug487993.cpp b/memcheck/tests/x86/bug487993.cpp index 27f43d306..e1678c953 100644 --- a/memcheck/tests/x86/bug487993.cpp +++ b/memcheck/tests/x86/bug487993.cpp @@ -12,9 +12,14 @@ struct Test int main() { +#if defined(__sun__) + const auto alignment_mask{0x7UL}; +#else + const auto alignment_mask{0xfUL}; +#endif std::unique_ptr test = std::make_unique(); //std::cerr << "test " << test.get() << ' ' << (reinterpret_cast(test.get()) & 0xfUL) << '\n'; - assert((reinterpret_cast(test.get()) & 0xfUL) == 0); + assert((reinterpret_cast(test.get()) & alignment_mask) == 0); } diff --git a/memcheck/tests/x86/bug487993.vgtest b/memcheck/tests/x86/bug487993.vgtest index a5f00a482..ca5db1515 100644 --- a/memcheck/tests/x86/bug487993.vgtest +++ b/memcheck/tests/x86/bug487993.vgtest @@ -1,3 +1,3 @@ -prereq: test -e bug487993 && ! ../../../tests/os_test solaris +prereq: test -e bug487993 prog: bug487993 vgopts: -q