]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Illumos regtest: update bug487993 testcase
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 16 Feb 2025 08:36:54 +0000 (09:36 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 16 Feb 2025 08:36:54 +0000 (09:36 +0100)
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).

memcheck/tests/x86/bug487993.cpp
memcheck/tests/x86/bug487993.vgtest

index 27f43d306c07a399787ea0ef3b879204b8d9346a..e1678c9538fa864318af79b78fba9beb27e6d5f8 100644 (file)
@@ -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> test = std::make_unique<Test>();
     //std::cerr << "test " << test.get() << ' ' << (reinterpret_cast<size_t>(test.get()) & 0xfUL) << '\n';
-    assert((reinterpret_cast<size_t>(test.get()) & 0xfUL) == 0);
+    assert((reinterpret_cast<size_t>(test.get()) & alignment_mask) == 0);
 }
 
     
index a5f00a4821969fb99e97f6b7402dda6f6cf37f72..ca5db1515dc932b436192129002e1b990e90fcc9 100644 (file)
@@ -1,3 +1,3 @@
-prereq: test -e bug487993 && ! ../../../tests/os_test solaris
+prereq: test -e bug487993
 prog: bug487993
 vgopts: -q