-
Notifications
You must be signed in to change notification settings - Fork 15k
[BinaryFormat] Disable MachOTest.UnalignedLC on SPARC #100086
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
Conversation
As discussed in Issue llvm#86793, the `MachOTest.UnalignedLC` test dies with SIGBUS on SPARC, a strict-alignment target. It simply cannot work there, so this patch disables it. Given that there's doubt about the test's correctnes, one might consider disabling it wholesale. Tested on `sparcv9-sun-solaris2.11` and `amd64-pc-solaris2.11`.
|
Given the test has undefined behavior on all big-endian hosts, I'd prefer to do something to fix the issue for all big-endian hosts, not just SPARC. |
|
Disabled now on big-endian in general. |
|
llvm/include/llvm/ADT/bit.h provides define |
|
I'd seen that, but based on I was under the impression that those are implementation details that cannot be relied on. |
You can test this locally with the following command:git-clang-format --diff 430b2545032db9de7898444502915f89e20f7c4c d238831d828149fb396d703f601c9783bcc37ba6 --extensions cpp -- llvm/unittests/BinaryFormat/MachOTest.cppView the diff from clang-format here.diff --git a/llvm/unittests/BinaryFormat/MachOTest.cpp b/llvm/unittests/BinaryFormat/MachOTest.cpp
index 78b20c28a9..46f42f4b7c 100644
--- a/llvm/unittests/BinaryFormat/MachOTest.cpp
+++ b/llvm/unittests/BinaryFormat/MachOTest.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/ADT/bit.h"
#include "llvm/BinaryFormat/MachO.h"
+#include "llvm/ADT/bit.h"
#include "llvm/TargetParser/Triple.h"
#include "gtest/gtest.h"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
/cherry-pick 3a226db |
As discussed in Issue llvm#86793, the `MachOTest.UnalignedLC` test dies with `SIGBUS` on SPARC, a strict-alignment target. It simply cannot work there. Besides, the test invokes undefined behaviour on big-endian targets, so this patch disables it on all of those. Tested on `sparcv9-sun-solaris2.11` and `amd64-pc-solaris2.11`. (cherry picked from commit 3a226db)
|
/pull-request #102103 |
As discussed in Issue llvm#86793, the `MachOTest.UnalignedLC` test dies with `SIGBUS` on SPARC, a strict-alignment target. It simply cannot work there. Besides, the test invokes undefined behaviour on big-endian targets, so this patch disables it on all of those. Tested on `sparcv9-sun-solaris2.11` and `amd64-pc-solaris2.11`. (cherry picked from commit 3a226db)
As discussed in Issue #86793, the
MachOTest.UnalignedLCtest dies withSIGBUSon SPARC, a strict-alignment target. It simply cannot work there. Besides, the test invokes undefined behaviour on big-endian targets, so this patch disables it on all of those.Tested on
sparcv9-sun-solaris2.11andamd64-pc-solaris2.11.